Release workflow updates; use athena zlib for bintoc

This commit is contained in:
Luke Street 2021-06-11 21:50:57 -04:00
parent 9029c8e7af
commit 5097da5777
4 changed files with 117 additions and 110 deletions

View File

@ -183,6 +183,7 @@ jobs:
7z x "-o$env:RUNNER_WORKSPACE" -aos "$TempDir\$Filename"
- name: Install Intel IPP
if: 'false' # takes >10min, not worth it
run: |
$TempDir = "$env:RUNNER_WORKSPACE\temp"
$Filename = "w_ipp_oneapi_p_${env:IPP_VERSION}_offline.exe"

View File

@ -9,20 +9,28 @@ on:
- '*.md'
- '*LICENSE'
env:
BUILDCACHE_VERSION: v0.27.0
BUILDCACHE_ACCURACY: STRICT
BUILDCACHE_MAX_CACHE_SIZE: 1073741824 # 1GiB
SENTRY_DSN: ${{secrets.SENTRY_DSN}}
jobs:
build-linux:
name: Build Linux (${{matrix.name}} x86_64)
runs-on: ubuntu-20.04
env:
BUILDCACHE_DIR: ${{github.workspace}}/.buildcache
strategy:
fail-fast: false
matrix:
include:
- name: GCC
cc: gcc
cxx: g++
preset: gcc
- name: Clang
cc: clang
cxx: clang++
preset: clang
steps:
- uses: actions/checkout@v2
@ -36,14 +44,17 @@ jobs:
sudo apt-key add GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB
rm GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB
sudo add-apt-repository "deb https://apt.repos.intel.com/oneapi all main"
sudo apt-get -y install build-essential curl git cmake ninja-build clang lld python3 python-is-python3 \
sudo apt-get -y install curl git cmake ninja-build clang lld libcurl4-openssl-dev intel-oneapi-ipp-devel \
zlib1g-dev libglu1-mesa-dev libdbus-1-dev libvulkan-dev libxi-dev libxrandr-dev libasound2-dev \
libpulse-dev libudev-dev libpng-dev libncurses5-dev libx11-xcb-dev libcurl4-openssl-dev qt5-default \
llvm-11-dev libclang-11-dev clang-11 intel-oneapi-ipp-devel
libpulse-dev libudev-dev libpng-dev libncurses5-dev libx11-xcb-dev python3 python-is-python3 qt5-default
yarn global add @sentry/cli
echo "$(yarn global bin)" >> $GITHUB_PATH
# setup buildcache
curl -LSfs https://github.com/mbitsnbites/buildcache/releases/download/$BUILDCACHE_VERSION/buildcache-linux.tar.gz | tar xz -C "$RUNNER_WORKSPACE"
echo "$RUNNER_WORKSPACE"/buildcache/bin >> $GITHUB_PATH
# free up disk space
# https://github.com/actions/virtual-environments/issues/2840#issuecomment-790492173
echo Before
@ -56,19 +67,20 @@ jobs:
echo After
df -h .
- name: Create build directory
run: cmake -E make_directory ${{github.workspace}}/build
- name: Restore buildcache
uses: actions/cache@v2
with:
path: ${{env.BUILDCACHE_DIR}}
key: buildcache-ubuntu-20.04-${{matrix.preset}}
- name: Configure CMake
working-directory: ${{github.workspace}}/build
run: |
cmake $GITHUB_WORKSPACE -GNinja -DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DCMAKE_C_COMPILER=${{matrix.cc}} -DCMAKE_CXX_COMPILER=${{matrix.cxx}} \
-DSENTRY_DSN="${{secrets.SENTRY_DSN}}" -DClang_DIR=/usr/lib/cmake/clang-11
run: cmake --preset x-linux-ci-${{matrix.preset}}
- name: Build
working-directory: ${{github.workspace}}/build
run: cmake --build . --target metaforce metaforce-gui hecl visigen
run: cmake --build --preset x-linux-ci-${{matrix.preset}}
- name: Print buildcache stats
run: buildcache -s
- name: Split debug information
run: ci/split-debug-linux.sh
@ -92,8 +104,14 @@ jobs:
debug.tar.*
build-macos:
name: Build macOS (AppleClang x86_64)
name: Build macOS (AppleClang universal)
runs-on: macos-10.15
env:
Qt_VERSION: 5.15.2
IPP_VERSION: 2021.2.0.192
BUILDCACHE_DIR: ${{github.workspace}}/.buildcache
steps:
- uses: actions/checkout@v2
with:
@ -104,13 +122,20 @@ jobs:
run: |
brew update
brew upgrade --formula
brew install ninja qt@5 graphicsmagick imagemagick getsentry/tools/sentry-cli
brew link qt@5
brew install ninja graphicsmagick imagemagick getsentry/tools/sentry-cli
yarn global add create-dmg
# universal qt5 from macports
curl -LSfs https://axiodl.com/files/qt-$Qt_VERSION.mpkg -o /tmp/qt-$Qt_VERSION.mpkg
sudo installer -pkg /tmp/qt-$Qt_VERSION.mpkg -target /
# setup buildcache
curl -LSfs https://github.com/mbitsnbites/buildcache/releases/download/$BUILDCACHE_VERSION/buildcache-macos.zip -o /tmp/buildcache-macos.zip
unzip /tmp/buildcache-macos.zip -d "$RUNNER_WORKSPACE"
echo "$RUNNER_WORKSPACE"/buildcache/bin >> $GITHUB_PATH
- name: Install Intel IPP
env:
IPP_VERSION: 2021.2.0.192
if: 'false' # not supported for universal build
run: |
NAME="m_ipp_oneapi_p_${IPP_VERSION}_offline"
curl -LSfs https://registrationcenter-download.intel.com/akdlm/irc_nas/17606/$NAME.dmg -o /tmp/$NAME.dmg
@ -119,19 +144,20 @@ jobs:
sudo hdiutil detach /Volumes/$NAME -quiet
rm /tmp/$NAME.dmg
- name: Create build directory
run: cmake -E make_directory ${{github.workspace}}/build
- name: Restore buildcache
uses: actions/cache@v2
with:
path: ${{env.BUILDCACHE_DIR}}
key: buildcache-macos-10.15-universal
- name: Configure CMake
working-directory: ${{github.workspace}}/build
run: |
export PATH="/usr/local/opt/qt@5/bin:$PATH" # FIXME remove
cmake $GITHUB_WORKSPACE -GNinja -DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DSENTRY_DSN="${{secrets.SENTRY_DSN}}"
run: cmake --preset x-macos-ci
- name: Build
working-directory: ${{github.workspace}}/build
run: cmake --build . --target metaforce-gui
run: cmake --build --preset x-macos-ci
- name: Print buildcache stats
run: buildcache -s
- name: Upload debug information
env:
@ -166,28 +192,23 @@ jobs:
name: Build Windows (MSVC x86_64)
runs-on: [ self-hosted, windows, x64 ]
env:
LLVM_VERSION: 10.0.1
Qt_VERSION: 5.15.2
# IPP_VERSION: 2021.2.0.210
IPP_VERSION: 2021.2.0.210
SENTRY_CLI_VERSION: 1.63.2
BUILDCACHE_DIR: C:\buildcache
BUILD_DIR: ${{github.workspace}}/build
BUILDCACHE_MAX_CACHE_SIZE: 5368709120 # 5GiB
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
submodules: recursive
- name: Install LLVM
run: |
$TempDir = "$env:RUNNER_WORKSPACE\temp"
$Filename = "LLVM-$env:LLVM_VERSION-win64.exe"
New-Item -Path "$TempDir" -ItemType Directory -ea 0
(New-Object Net.WebClient).DownloadFile("https://axiodl.com/files/$Filename", "$TempDir\$Filename")
Start-Process "$TempDir\$Filename" -ArgumentList "/S /D=$env:RUNNER_WORKSPACE\LLVM" -Wait
- name: Install vcpkg Qt
run: |
$TempDir = "$env:RUNNER_WORKSPACE\temp"
$Filename = "vcpkg-qt-$env:Qt_VERSION.7z"
$Filename = "vcpkg-qt-$env:Qt_VERSION-full.7z"
New-Item -Path "$TempDir" -ItemType Directory -ea 0
(New-Object Net.WebClient).DownloadFile("https://axiodl.com/files/$Filename", "$TempDir\$Filename")
7z x "-o$env:RUNNER_WORKSPACE" -aos "$TempDir\$Filename"
@ -198,38 +219,26 @@ jobs:
New-Item -Path "$TempDir" -ItemType Directory -ea 0
(New-Object Net.WebClient).DownloadFile("https://github.com/getsentry/sentry-cli/releases/download/$env:SENTRY_CLI_VERSION/sentry-cli-Windows-x86_64.exe", "$TempDir\sentry-cli.exe")
# - name: Install Intel IPP
# run: |
# $TempDir = "$env:RUNNER_WORKSPACE\temp"
# $Filename = "w_ipp_oneapi_p_${env:IPP_VERSION}_offline.exe"
# New-Item -Path "$TempDir" -ItemType Directory -ea 0
# (New-Object Net.WebClient).DownloadFile("https://registrationcenter-download.intel.com/akdlm/irc_nas/$Filename", "$TempDir\$Filename")
# Start-Process "$TempDir\$Filename" -ArgumentList "--x --s --f $TempDir\ipp" -Wait
# Start-Process "$TempDir\ipp\bootstrapper.exe" -ArgumentList "--eula accept -c --action install" -Wait
# - name: Install dependencies
# run: choco install ninja vulkan-sdk
- name: Install dependencies
run: |
# set up buildcache
$TempDir = "$env:RUNNER_WORKSPACE\temp"
New-Item -Path "$TempDir" -ItemType Directory -ea 0
(New-Object Net.WebClient).DownloadFile("https://github.com/mbitsnbites/buildcache/releases/download/$env:BUILDCACHE_VERSION/buildcache-windows.zip", "$TempDir\buildcache.zip")
Expand-Archive -LiteralPath "$TempDir\buildcache.zip" -DestinationPath "$TempDir"
echo "$TempDir\buildcache\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
- name: Enable Visual Studio environment
uses: ilammy/msvc-dev-cmd@v1
- name: Create build directory
run: cmake -E make_directory ${{github.workspace}}/build
- name: Configure CMake
working-directory: ${{github.workspace}}/build
run: |
$workspace = $env:RUNNER_WORKSPACE -replace '\\', '/'
cmake $env:GITHUB_WORKSPACE -GNinja -DCMAKE_BUILD_TYPE=RelWithDebInfo `
-DCMAKE_TOOLCHAIN_FILE="$workspace/vcpkg-qt-$env:Qt_VERSION/scripts/buildsystems/vcpkg.cmake" `
-DVCPKG_TARGET_TRIPLET=x64-windows-static `
-DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreaded -DCMAKE_CXX_FLAGS= -DCMAKE_C_FLAGS= `
-DLLVM_ROOT_DIR="$workspace/LLVM" `
-DSENTRY_DSN="${{secrets.SENTRY_DSN}}"
run: cmake --preset x-windows-ci-msvc
- name: Build
working-directory: ${{github.workspace}}/build
run: cmake --build . --target metaforce metaforce-gui hecl visigen crashpad_handler
run: cmake --build --preset x-windows-ci-msvc
- name: Print buildcache stats
run: buildcache -s
- name: Upload debug information
working-directory: ${{github.workspace}}/build/install
@ -258,69 +267,70 @@ jobs:
build-windows-clang:
name: Build Windows (Clang x86_64)
if: 'false' # disabled due to header issues
runs-on: windows-2019
env:
LLVM_VERSION: 10.0.1
Qt_VERSION: 5.15.2
IPP_VERSION: 2021.2.0.210
# C: has ~90GB available space at the moment
BUILDCACHE_DIR: C:\buildcache
BUILD_DIR: C:\build
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
submodules: recursive
- name: Install LLVM
run: |
$TempDir = "$env:RUNNER_WORKSPACE\temp"
$Filename = "LLVM-$env:LLVM_VERSION-win64.exe"
New-Item -Path "$TempDir" -ItemType Directory -ea 0
(New-Object Net.WebClient).DownloadFile("https://axiodl.com/files/$Filename", "$TempDir\$Filename")
Start-Process "$TempDir\$Filename" -ArgumentList "/S /D=$env:RUNNER_WORKSPACE\LLVM" -Wait
- name: Install vcpkg Qt
run: |
$TempDir = "$env:RUNNER_WORKSPACE\temp"
$Filename = "vcpkg-qt-$env:Qt_VERSION.7z"
$Filename = "vcpkg-qt-$env:Qt_VERSION-full.7z"
New-Item -Path "$TempDir" -ItemType Directory -ea 0
(New-Object Net.WebClient).DownloadFile("https://axiodl.com/files/$Filename", "$TempDir\$Filename")
7z x "-o$env:RUNNER_WORKSPACE" -aos "$TempDir\$Filename"
# - name: Install Intel IPP
# run: |
# $TempDir = "$env:RUNNER_WORKSPACE\temp"
# $Filename = "w_ipp_oneapi_p_${env:IPP_VERSION}_offline.exe"
# New-Item -Path "$TempDir" -ItemType Directory -ea 0
# (New-Object Net.WebClient).DownloadFile("https://registrationcenter-download.intel.com/akdlm/irc_nas/17739/$Filename", "$TempDir\$Filename")
# Start-Process "$TempDir\$Filename" -ArgumentList "--x --s --f $TempDir\ipp" -Wait
# Start-Process "$TempDir\ipp\bootstrapper.exe" -ArgumentList "--eula accept -c --action install" -Wait
- name: Install Intel IPP
if: 'false' # takes >10min, not worth it
run: |
$TempDir = "$env:RUNNER_WORKSPACE\temp"
$Filename = "w_ipp_oneapi_p_${env:IPP_VERSION}_offline.exe"
New-Item -Path "$TempDir" -ItemType Directory -ea 0
(New-Object Net.WebClient).DownloadFile("https://registrationcenter-download.intel.com/akdlm/irc_nas/17739/$Filename", "$TempDir\$Filename")
Start-Process "$TempDir\$Filename" -ArgumentList "--x --s --f $TempDir\ipp" -Wait
Start-Process "$TempDir\ipp\bootstrapper.exe" -ArgumentList "--eula accept -c --action install" -Wait
- name: Install dependencies
run: choco install ninja vulkan-sdk
run: |
choco install ninja vulkan-sdk
# set up buildcache
$TempDir = "$env:RUNNER_WORKSPACE\temp"
New-Item -Path "$TempDir" -ItemType Directory -ea 0
(New-Object Net.WebClient).DownloadFile("https://github.com/mbitsnbites/buildcache/releases/download/$env:BUILDCACHE_VERSION/buildcache-windows.zip", "$TempDir\buildcache.zip")
Expand-Archive -LiteralPath "$TempDir\buildcache.zip" -DestinationPath "$TempDir"
echo "$TempDir\buildcache\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
# check available disk space
Get-PSDrive
- name: Restore buildcache
uses: actions/cache@v2
with:
path: ${{env.BUILDCACHE_DIR}}
key: buildcache-windows-2019-clang
- name: Enable Visual Studio environment
uses: ilammy/msvc-dev-cmd@v1
- name: Create build directory
run: cmake -E make_directory ${{github.workspace}}/build
- name: Configure CMake
working-directory: ${{github.workspace}}/build
run: |
$workspace = $env:RUNNER_WORKSPACE -replace '\\', '/'
cmake $env:GITHUB_WORKSPACE -GNinja -DCMAKE_BUILD_TYPE=RelWithDebInfo `
-DCMAKE_TOOLCHAIN_FILE="$workspace/vcpkg-qt-$env:Qt_VERSION/scripts/buildsystems/vcpkg.cmake" `
-DVCPKG_TARGET_TRIPLET=x64-windows-static `
-DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreaded `
-DCMAKE_C_COMPILER=clang-cl `
-DCMAKE_CXX_COMPILER=clang-cl `
-DCMAKE_LINKER=lld-link `
-DLLVM_ROOT_DIR="$workspace/LLVM" `
-DSENTRY_DSN="${{secrets.SENTRY_DSN}}"
run: cmake --preset x-windows-ci-clang
- name: Build
working-directory: ${{github.workspace}}/build
run: cmake --build . --target metaforce metaforce-gui hecl visigen crashpad_handler
run: cmake --build --preset x-windows-ci-clang
- name: Print buildcache stats
run: buildcache -s
- name: Compress PDBs
working-directory: ${{github.workspace}}/build/install

View File

@ -201,10 +201,6 @@
"cacheVariables": {
"CMAKE_C_COMPILER_LAUNCHER": "buildcache",
"CMAKE_CXX_COMPILER_LAUNCHER": "buildcache",
"Clang_DIR": {
"type": "FILEPATH",
"value": "/usr/lib/cmake/clang-11"
},
"BUILD_ATDNA": {
"type": "BOOL",
"value": false

View File

@ -3,7 +3,7 @@ cmake_policy(VERSION 3.15...3.20)
project(bintoc LANGUAGES C)
add_executable(bintoc bintoc.c)
find_package(ZLIB REQUIRED)
target_link_libraries(bintoc PRIVATE ZLIB::ZLIB)
add_subdirectory(../../extern/athena/extern/zlib zlib)
target_link_libraries(bintoc PRIVATE ${ZLIB_LIBRARIES})
install(TARGETS bintoc DESTINATION bin)
install(TARGETS bintoc DESTINATION bin)