Skip to content

argh

argh #1707

Workflow file for this run

name: Etterna CI
on:
push:
pull_request:
release:
types: [published]
jobs:
linux-x64:
name: Linux x64 (${{matrix.cfg.cxx}})
runs-on: ${{matrix.cfg.os}}
strategy:
fail-fast: false
matrix:
cfg:
- { os: ubuntu-22.04, apt: g++-8, cxx: g++-8, cc: gcc-8, dist: false}
- { os: ubuntu-22.04, apt: g++-9, cxx: g++-9, cc: gcc-9, dist: false}
- { os: ubuntu-22.04, apt: g++-10, cxx: g++-10, cc: gcc-10, dist: false}
- { os: ubuntu-22.04, apt: g++-13, cxx: g++-13, cc: gcc-13, dist: false}
- { os: ubuntu-22.04, apt: clang-9, cxx: clang++-9, cc: clang-9, dist: false}
- { os: ubuntu-22.04, apt: clang-10, cxx: clang++-10, cc: clang-10, dist: false}
- { os: ubuntu-22.04, apt: clang-11, cxx: clang++-11, cc: clang-11, dist: false}
- { os: ubuntu-22.04, apt: clang-12, cxx: clang++-12, cc: clang-12, dist: true}
- { os: ubuntu-22.04, apt: clang-16, cxx: clang++-16, cc: clang-16, dist: false}
steps:
- name: Checkout Etterna
uses: actions/checkout@v3
with:
path: main
- name: Checkout CrashpadTools
uses: actions/checkout@v3
with:
repository: etternagame/CrashpadTools
path: tools
- name: Install apt packages
run: sudo apt update && sudo apt install ${{ matrix.cfg.cpp-version }} nasm ninja-build libglew-dev libxrandr-dev libxtst-dev libpulse-dev libasound-dev libogg-dev libvorbis-dev xorg-dev libcurl4-openssl-dev
- name: Generate CMake
run: mkdir main/build && cd main/build && cmake -G Ninja -DCMAKE_BUILD_TYPE=RelWithDebInfo ..
env:
CXX: ${{matrix.cfg.cpp-version}}
- name: Build Project
run: cd main/build && ninja
- name: Generate binary
if: ${{matrix.cfg.dist}}
run: cd main/build && cpack
- name: Upload Binary
if: ${{matrix.cfg.dist}}
uses: actions/upload-artifact@v3
with:
name: "Etterna - Linux x64"
path: '${{github.workspace}}/main/build/*.tar.gz'
- name: Update Environment Variables
if: ${{matrix.cfg.dist}}
run: echo "${{github.workspace}}/tools/linux" >> $GITHUB_PATH
- name: Generate Symbols
if: ${{matrix.cfg.dist}}
run: |
echo "Running objcopy..."
mkdir ${{github.workspace}}/sym
objcopy --only-keep-debug ${{github.workspace}}/main/Etterna ${{github.workspace}}/sym/Etterna
echo "Dumping Symbols..."
dump_syms ${{github.workspace}}/sym/Etterna ${{github.workspace}}/main/Etterna > ${{github.workspace}}/sym/Etterna.sym
echo "Stripping debug symbols from binary..."
strip ${{github.workspace}}/main/Etterna
- name: Prepare symbols for upload artifacts
if: ${{matrix.cfg.dist}}
run: cd ${{github.workspace}}/sym && ${{github.workspace}}/main/.ci/prepare_symbols.py
- name: Upload Symbols to action artifacts
if: ${{matrix.cfg.dist}}
uses: actions/upload-artifact@v3
with:
name: Etterna Symbols - ${{github.sha}}
path: '${{github.workspace}}/sym/EtternaSymbolsUploadDir'
- name: Get version for CrashServer Upload
id: get_version
if: ${{ matrix.cfg.dist && github.event_name == 'release' && github.event.action == 'published' }}
run: |
echo ::set-output name=VERSION::${GITHUB_REF#refs/tags/}
- name: Upload Symbols to Crash Server
if: ${{ matrix.cfg.dist && github.event_name == 'release' && github.event.action == 'published' }}
run: symupload ${{github.workspace}}/sym/Etterna.sym "https://crash.etterna.dev/api/symbol/upload?api_key=${{secrets.CRASHSERVER_API_KEY}}&version=${{steps.get_version.outputs.VERSION}}"
- name: Upload files to Release
uses: softprops/action-gh-release@v1
if: ${{ matrix.cfg.dist && github.event_name == 'release' && github.event.action == 'published' }}
with:
files: ${{github.workspace}}/main/build/*.tar.gz
macos_aarch64:
name: macOS aarch64 ${{matrix.cfg.name}}
runs-on: ${{matrix.cfg.os}}
strategy:
fail-fast: false
matrix:
cfg:
- { os: macos-14, name: "Sonoma", dist: true }
steps:
- name: Checkout Etterna
uses: actions/checkout@v3
with:
path: main
- name: Checkout CrashpadTools
uses: actions/checkout@v3
with:
repository: etternagame/CrashpadTools
path: tools
- name: Install homebrew packages
run: brew install cmake nasm ninja openssl
- name: Setup Python 3
uses: actions/setup-python@v4
with:
python-version: '3.12'
- name: Generate CMake
run: mkdir main/build && cd main/build && cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -DWITH_CRASHPAD=OFF -G Ninja ..
- name: Build Project
run: cd main/build && ninja
- name: Generate binary
if: ${{matrix.cfg.dist}}
run: cd main/build && cpack
- name: Upload Binary
if: ${{matrix.cfg.dist}}
uses: actions/upload-artifact@v3
with:
name: "Etterna - macOS aarch64"
path: '${{github.workspace}}/main/build/*.dmg'
- name: Update Environment Variables
if: ${{matrix.cfg.dist}}
run: |
echo "${{github.workspace}}/tools/mac" >> $GITHUB_PATH
echo "ETTERNA_ARCH=aarch64" >> $GITHUB_ENV
- name: Generate Symbols
if: ${{matrix.cfg.dist}}
run: |
echo "Running dsymutil..."
dsymutil -o ${{github.workspace}}/main/Etterna.dsym main/Etterna.app/Contents/MacOS/Etterna > /dev/null
echo "Dumping Symbols..."
dump_syms ${{github.workspace}}/main/Etterna.dsym main/Etterna.app/Contents/MacOS/Etterna > ${{github.workspace}}/main/Etterna.sym
echo "Stripping debug symbols from binary..."
strip main/Etterna.app/Contents/MacOS/Etterna
- name: Prepare symbols for upload artifacts
if: ${{matrix.cfg.dist}}
run: cd main && ${{github.workspace}}/main/.ci/prepare_symbols.py
- name: Upload Symbols to action artifacts
if: ${{matrix.cfg.dist}}
uses: actions/upload-artifact@v3
with:
name: Etterna Symbols - ${{github.sha}}
path: '${{github.workspace}}/main/EtternaSymbolsUploadDir'
- name: Get version for CrashServer Upload
id: get_version
if: ${{ matrix.cfg.dist && github.event_name == 'release' && github.event.action == 'published' }}
run: |
echo ::set-output name=VERSION::${GITHUB_REF#refs/tags/}
- name: Upload Symbols to Crash Server
if: ${{ matrix.cfg.dist && github.event_name == 'release' && github.event.action == 'published' }}
run: symupload ${{github.workspace}}/main/Etterna.sym "https://crash.etterna.dev/api/symbol/upload?api_key=${{secrets.CRASHSERVER_API_KEY}}&version=${{ steps.get_version.outputs.VERSION }}"
- name: Upload files to Release
uses: softprops/action-gh-release@v1
if: ${{ matrix.cfg.dist && github.event_name == 'release' && github.event.action == 'published' }}
with:
files: ${{github.workspace}}/main/build/*.dmg
macos:
name: macOS x64 ${{matrix.cfg.name}}
runs-on: ${{matrix.cfg.os}}
strategy:
fail-fast: false
matrix:
cfg:
#- { os: macos-10.15, name: "Catalina", dist: false} # rendered useless by GHA
- { os: macos-13, name: "Ventura", dist: false}
- { os: macos-12, name: "Monterey", dist: true}
#- { os: macos-11, name: "Big Sur", dist: true}
steps:
- name: Checkout Etterna
uses: actions/checkout@v3
with:
path: main
- name: Checkout CrashpadTools
uses: actions/checkout@v3
with:
repository: etternagame/CrashpadTools
path: tools
- name: Install homebrew packages
run: brew install cmake nasm ninja openssl
- name: Setup Python 2.7
uses: MatteoH2O1999/[email protected]
with:
python-version: '2.7'
- name: Setup Python 3
uses: actions/setup-python@v4
with:
python-version: '3.8'
- name: Generate CMake
run: mkdir main/build && cd main/build && cmake -DOPENSSL_ROOT_DIR=/usr/local/opt/openssl -DCMAKE_BUILD_TYPE=RelWithDebInfo -G Ninja ..
- name: Build Project
run: cd main/build && ninja
- name: Generate binary
if: ${{matrix.cfg.dist}}
run: cd main/build && cpack
- name: Upload Binary
if: ${{matrix.cfg.dist}}
uses: actions/upload-artifact@v3
with:
name: "Etterna - macOS x64"
path: '${{github.workspace}}/main/build/*.dmg'
- name: Update Environment Variables
if: ${{matrix.cfg.dist}}
run: |
echo "${{github.workspace}}/tools/mac" >> $GITHUB_PATH
echo "ETTERNA_ARCH=x64" >> $GITHUB_ENV
- name: Generate Symbols
if: ${{matrix.cfg.dist}}
run: |
echo "Running dsymutil..."
dsymutil -o ${{github.workspace}}/main/Etterna.dsym main/Etterna.app/Contents/MacOS/Etterna > /dev/null
echo "Dumping Symbols..."
dump_syms ${{github.workspace}}/main/Etterna.dsym main/Etterna.app/Contents/MacOS/Etterna > ${{github.workspace}}/main/Etterna.sym
echo "Stripping debug symbols from binary..."
strip main/Etterna.app/Contents/MacOS/Etterna
- name: Prepare symbols for upload artifacts
if: ${{matrix.cfg.dist}}
run: cd main && ${{github.workspace}}/main/.ci/prepare_symbols.py
- name: Upload Symbols to action artifacts
if: ${{matrix.cfg.dist}}
uses: actions/upload-artifact@v3
with:
name: Etterna Symbols - ${{github.sha}}
path: '${{github.workspace}}/main/EtternaSymbolsUploadDir'
- name: Get version for CrashServer Upload
id: get_version
if: ${{ matrix.cfg.dist && github.event_name == 'release' && github.event.action == 'published' }}
run: |
echo ::set-output name=VERSION::${GITHUB_REF#refs/tags/}
- name: Upload Symbols to Crash Server
if: ${{ matrix.cfg.dist && github.event_name == 'release' && github.event.action == 'published' }}
run: symupload ${{github.workspace}}/main/Etterna.sym "https://crash.etterna.dev/api/symbol/upload?api_key=${{secrets.CRASHSERVER_API_KEY}}&version=${{ steps.get_version.outputs.VERSION }}"
- name: Upload files to Release
uses: softprops/action-gh-release@v1
if: ${{ matrix.cfg.dist && github.event_name == 'release' && github.event.action == 'published' }}
with:
files: ${{github.workspace}}/main/build/*.dmg
macos_high_sierra:
name: macOS High Sierra (Legacy) ${{matrix.cfg.name}}
runs-on: ${{matrix.cfg.os}}
strategy:
fail-fast: false
matrix:
cfg:
#- { os: macos-10.15, name: "Catalina", dist: false} # rendered useless by GHA
#- { os: macos-13, name: "Ventura", dist: false} # known to work, disabled for concurrent build space
- { os: macos-12, name: "Monterey", dist: true}
#- { os: macos-11, name: "Big Sur", dist: true}
steps:
- name: Checkout Etterna
uses: actions/checkout@v3
with:
path: main
- name: Checkout CrashpadTools
uses: actions/checkout@v3
with:
repository: etternagame/CrashpadTools
path: tools
- name: Install homebrew packages
run: brew install cmake nasm ninja && brew tap etternagame/etterna && brew update && HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK=1 brew install etternagame/etterna/[email protected]_osx_high_sierra
- name: Generate CMake
run: mkdir main/build && cd main/build && cmake -DOPENSSL_ROOT_DIR=/usr/local/opt/[email protected]_osx_high_sierra -DWITH_CRASHPAD=OFF -DCMAKE_BUILD_TYPE=RelWithDebInfo -G Ninja ..
- name: Build Project
run: cd main/build && ninja
- name: Generate binary
if: ${{matrix.cfg.dist}}
run: cd main/build && cpack
- name: Upload Binary
if: ${{matrix.cfg.dist}}
uses: actions/upload-artifact@v3
with:
name: "Etterna - OSX High Sierra (Legacy)"
path: '${{github.workspace}}/main/build/*.dmg'
- name: Update Environment Variables
if: ${{matrix.cfg.dist}}
run: |
echo "${{github.workspace}}/tools/mac" >> $GITHUB_PATH
echo "ETTERNA_ARCH=x64" >> $GITHUB_ENV
- name: Generate Symbols
if: ${{matrix.cfg.dist}}
run: |
echo "Running dsymutil..."
dsymutil -o ${{github.workspace}}/main/Etterna.dsym main/Etterna.app/Contents/MacOS/Etterna > /dev/null
echo "Dumping Symbols..."
dump_syms ${{github.workspace}}/main/Etterna.dsym main/Etterna.app/Contents/MacOS/Etterna > ${{github.workspace}}/main/Etterna.sym
echo "Stripping debug symbols from binary..."
strip main/Etterna.app/Contents/MacOS/Etterna
- name: Prepare symbols for upload artifacts
if: ${{matrix.cfg.dist}}
run: cd main && ${{github.workspace}}/main/.ci/prepare_symbols.py
- name: Upload Symbols to action artifacts
if: ${{matrix.cfg.dist}}
uses: actions/upload-artifact@v3
with:
name: Etterna Symbols - ${{github.sha}}
path: '${{github.workspace}}/main/EtternaSymbolsUploadDir'
- name: Get version for CrashServer Upload
id: get_version
if: ${{ matrix.cfg.dist && github.event_name == 'release' && github.event.action == 'published' }}
run: |
echo ::set-output name=VERSION::${GITHUB_REF#refs/tags/}
- name: Upload Symbols to Crash Server
if: ${{ matrix.cfg.dist && github.event_name == 'release' && github.event.action == 'published' }}
run: symupload ${{github.workspace}}/main/Etterna.sym "https://crash.etterna.dev/api/symbol/upload?api_key=${{secrets.CRASHSERVER_API_KEY}}&version=${{ steps.get_version.outputs.VERSION }}"
- name: Upload files to Release
uses: softprops/action-gh-release@v1
if: ${{ matrix.cfg.dist && github.event_name == 'release' && github.event.action == 'published' }}
with:
files: ${{github.workspace}}/main/build/*.dmg
windows: # Windows x64 and x86 build matrix
strategy:
fail-fast: false # Don't cancel other matrix jobs if one fails
matrix:
cfg:
- { name: i386, arch: x86, ssl-dir: 'C:\Program Files (x86)\OpenSSL-Win32' }
- { name: x64, arch: x64, ssl-dir: 'C:\Program Files\OpenSSL-Win64'}
name: "Windows ${{matrix.cfg.name}}"
runs-on: windows-2019
steps:
- name: Checkout Etterna
uses: actions/checkout@v3
with:
path: main
- name: Checkout CrashpadTools
uses: actions/checkout@v3
with:
repository: etternagame/CrashpadTools
path: tools
- name: Checkout DirectX SDK
uses: actions/checkout@v3
with:
repository: nico-abram/dxsdk
path: dxsdk
- name: Update Environment Variables
run: |
echo "${{github.workspace}}/tools/win/" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
echo "ETTERNA_ARCH=${{matrix.cfg.name}}" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
- name: Setup Python 3
uses: actions/setup-python@v4
with:
python-version: '3.8'
- name: Setup Python 2.7
uses: MatteoH2O1999/[email protected]
with:
python-version: '2.7'
- name: Install chocolatey packages (i386)
if: ${{ matrix.cfg.arch == 'x86' }}
run: choco install ninja nsis curl -y --x86
- name: Install openSSL (i386)
if: ${{ matrix.cfg.arch == 'x86' }}
run: choco install openssl --version=1.1.1.2100 -y --x86
- name: Install chocolatey packages (x64)
if: ${{ matrix.cfg.arch == 'x64' }}
run: choco install ninja nsis curl -y
- name: Install openSSL (x64)
if: ${{ matrix.cfg.arch == 'x64' }}
run: choco install openssl --version=1.1.1.2100 -y
- name: Configure MSBuild
uses: ilammy/msvc-dev-cmd@v1
with:
arch: ${{ matrix.cfg.arch }}
- name: Generate CMake
run: mkdir main/build && cd main/build && cmake -G Ninja -DCMAKE_BUILD_TYPE=RelWithDebInfo ..
env:
DXSDK_DIR: "${{github.workspace}}/dxsdk/"
- name: Build Project
run: cd main/build && ninja
- name: Generate binary
run: cd main/build && cpack
- name: Upload Binary
uses: actions/upload-artifact@v3
with:
name: "Etterna - Windows ${{matrix.cfg.name}}"
path: '${{github.workspace}}/main/build/*.exe'
- name: Generate Symbols
run: |
echo "Dumping Symbols..."
dump_syms.exe main/Program/Etterna.pdb > ${{github.workspace}}/main/Etterna.sym
- name: Setup Python 3
uses: actions/setup-python@v4
with:
python-version: '3.8'
- name: Prepare symbols for action artifacts
run: cd main && python ${{github.workspace}}/main/.ci/prepare_symbols.py
- name: Upload Symbols to action artifacts
uses: actions/upload-artifact@v3
with:
name: Etterna Symbols - ${{github.sha}}
path: '${{github.workspace}}/main/EtternaSymbolsUploadDir'
- name: Get version for CrashServer Upload
id: get_version
if: ${{ github.event_name == 'release' && github.event.action == 'published' }}
run: $tag="${{ github.ref }}".Split('/')[-1]; echo "::set-output name=VERSION::$tag"
- name: Upload Symbols to Crash Server
if: ${{ github.event_name == 'release' && github.event.action == 'published' }}
run: curl --request POST -F symbol_file=@${{github.workspace}}/main/Etterna.sym "https://crash.etterna.dev/api/symbol/upload?api_key=${{ secrets.CRASHSERVER_API_KEY }}&version=${{ steps.get_version.outputs.VERSION }}"
- name: Upload files to Release
uses: softprops/action-gh-release@v1
if: ${{ github.event_name == 'release' && github.event.action == 'published' }}
with:
files: |
${{github.workspace}}/main/build/*.exe