v0.3.1 #91
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build | |
| on: | |
| - push | |
| - pull_request | |
| jobs: | |
| debian: | |
| name: Debian | |
| runs-on: ubuntu-latest | |
| container: # glibc is not forward compatible, assuming no one uses glibc older than Debian stable | |
| image: debian:stable | |
| options: --privileged | |
| steps: | |
| - name: Install dependencies | |
| run: | | |
| echo "deb-src http://deb.debian.org/debian stable main" >> /etc/apt/sources.list | |
| echo "deb-src http://deb.debian.org/debian stable-updates main" >> /etc/apt/sources.list | |
| apt-get update -y | |
| apt-get install -y build-essential cmake git xz-utils | |
| apt-get build-dep -y libsdl2-dev | |
| - name: Cache git directory | |
| uses: actions/cache@v3 | |
| with: | |
| path: .git | |
| key: ${{ runner.os }}-git | |
| - name: Checkout repository | |
| uses: actions/checkout@v3 | |
| with: | |
| submodules: recursive | |
| - name: Configure CMake | |
| run: | | |
| mkdir build | |
| cd build | |
| cmake .. -DCMAKE_BUILD_TYPE=Release -DTA_STATIC=ON | |
| - name: Build | |
| run: | | |
| cd build | |
| cmake --build . -j$(nproc) | |
| - name: Package | |
| run: | | |
| cd build | |
| cmake --install . | |
| cd output | |
| export XZ_OPT='-9' | |
| tar -cJf ../artifact.tar.xz * | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: artifact-linux | |
| path: build/artifact.tar.xz | |
| windows: | |
| name: Windows MSYS2 | |
| runs-on: windows-latest | |
| defaults: | |
| run: | |
| shell: msys2 {0} | |
| steps: | |
| - name: Setup MSYS2 | |
| uses: msys2/setup-msys2@v2 | |
| with: | |
| msystem: MINGW64 | |
| update: true | |
| install: mingw-w64-x86_64-gcc mingw-w64-x86_64-ninja mingw-w64-x86_64-cmake git | |
| - name: Cache git directory | |
| uses: actions/cache@v3 | |
| with: | |
| path: .git | |
| key: ${{ runner.os }}-git | |
| - name: Checkout repository | |
| uses: actions/checkout@v3 | |
| with: | |
| submodules: recursive | |
| - name: Configure CMake | |
| run: | | |
| mkdir build | |
| cd build | |
| cmake .. -DCMAKE_BUILD_TYPE=Release -DTA_STATIC=ON | |
| - name: Build | |
| run: | | |
| cd build | |
| cmake --build . -j$(nproc) | |
| - name: Package | |
| run: | | |
| cd build | |
| cmake --install . | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: artifact-windows | |
| path: build/output | |