Added GitHub Actions build. #10
This file contains 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: 🐧 Linux | |
on: [push, pull_request] | |
jobs: | |
linux: | |
name: Linux | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
build-type: | |
- Release | |
- Debug | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Dependencies | |
run: sudo apt-get update && sudo apt-get install cmake libsdl2-dev libopenal-dev | |
- name: CMake | |
run: cmake -S ./neo -B build -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=${{ matrix.build-type }} | |
- name: Build | |
run: cmake --build build --parallel 2 --target all --config ${{ matrix.build-type }} -- -j2 | |
- name: Package | |
if: startsWith(github.ref, 'refs/tags/') | |
run: tar -zcvf build/qengine4.tar.gz build/qengine4 | |
- name: Upload packages | |
if: startsWith(github.ref, 'refs/tags/') | |
uses: actions/upload-artifact@v3 | |
with: | |
name: 'qengine4-${{ github.job }}-${{ github.sha }}' | |
path: build/*.tar.gz |