diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2023-04-10 04:43:00 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2023-04-10 04:43:26 +0200 |
commit | 2ab5b7181f37bd401c805dc76edab6ced17e0f89 (patch) | |
tree | 3305f7c30d3e22f024caa4e822b8a1e677d139e6 /.github | |
parent | 6e215256128aca58e2dc3c2efa369198d5016871 (diff) |
ci: run all 3 runners on tags
Diffstat (limited to '.github')
-rw-r--r-- | .github/workflows/cmake-tag.yml | 66 | ||||
-rw-r--r-- | .github/workflows/cmake.yml | 2 |
2 files changed, 66 insertions, 2 deletions
diff --git a/.github/workflows/cmake-tag.yml b/.github/workflows/cmake-tag.yml new file mode 100644 index 00000000..ddbab622 --- /dev/null +++ b/.github/workflows/cmake-tag.yml @@ -0,0 +1,66 @@ +name: CMake + +on: + push: + tags: + - '*' + +env: + BUILD_TYPE: RELEASE + +jobs: + build: + runs-on: ${{ matrix.os }} + strategy: + fail-fast: true + matrix: + os: [ubuntu-22.04, windows-latest, macos-12] + include: + - os: ubuntu-22.04 + cmake: /usr/bin/env CC=gcc-12 CXX=g++-12 cmake + - os: macos-12 + cmake: /usr/bin/env CC="$(brew --prefix llvm@15)/bin/clang" CXX="$(brew --prefix llvm@16)/bin/clang++" cmake + - os: windows-latest + cmake: .\.github\workflows\build-windows.bat cmake + + steps: + - uses: actions/checkout@v3 + with: + submodules: recursive + + - uses: abdes/gha-setup-ninja@master + with: + version: 1.11.1 + if: matrix.os != 'ubuntu-22.04' + + - name: Install Linux dependencies + run: | + sudo apt -q=2 update + sudo apt install g++-12 gdb ninja-build + sudo apt -q install libgl1-mesa-dri libgl-dev libglx-dev xorg-dev xvfb libopencv-dev + sudo apt -q install libsdl2-dev + if: matrix.os == 'ubuntu-22.04' + + - name: Install OSX dependencies + run: | + brew install SDL2 llvm@15 + if: matrix.os == 'macos-12' + + - name: Configure + run: ${{matrix.cmake}} -G "Ninja" -S ${{github.workspace}}/ -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DFLOORMAT_PRECOMPILED-HEADERS:BOOL=OFF + + - name: Build + run: ${{matrix.cmake}} --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} --target install + + - name: Test + run: | + cd ${{github.workspace}}/build/install + export LD_LIBRARY_PATH="$PWD/lib" ASAN_OPTIONS="detect_leaks=0:abort_on_error=1" + xvfb-run gdb -q -batch -x ../../.github/gdbscript.py --args bin/floormat-test </dev/null + if: matrix.os == 'ubuntu-22.04' + +# - name: Upload build +# uses: actions/upload-artifact@v2.2.4 +# with: +# name: buildoutput +# path: ${{github.workspace}}/build/ diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index 97d44da5..3eab386b 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -3,8 +3,6 @@ name: CMake on: push: branches: [ master ] - tags: - - '*' pull_request: branches: [ master ] |