From 0b328ac1b7ebca02df1c7476cfbe5df12a2029f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martti=20Rannanj=C3=A4rvi?= Date: Tue, 10 Dec 2024 00:07:41 +0200 Subject: [PATCH] github: Add back a gcc build --- .github/workflows/compilation.yml | 64 +++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) diff --git a/.github/workflows/compilation.yml b/.github/workflows/compilation.yml index a2215f041..9f90dc900 100644 --- a/.github/workflows/compilation.yml +++ b/.github/workflows/compilation.yml @@ -84,6 +84,70 @@ jobs: - name: Run pytest tests run: ./run_pytest.sh build-test ./Debug/openomf + # Run unittests on gcc build + # ----------------------------------------------------------------------------------------------- + unittest_gcc: + needs: [unittest] + name: Unittests on gcc + runs-on: ubuntu-24.04 + + steps: + - uses: actions/checkout@v4 + + - name: Install dependencies + uses: Eeems-Org/apt-cache-action@v1.3 + with: + packages: ninja-build libargtable2-dev libcunit1-dev libsdl2-mixer-dev + libconfuse-dev libenet-dev libsdl2-dev libxmp-dev libpng-dev + libepoxy-dev + + - name: Build tests + run: | + cmake -DCMAKE_C_COMPILER=gcc \ + -DCMAKE_BUILD_TYPE=Debug \ + -DUSE_TIDY=On \ + -DUSE_TESTS=On \ + -DUSE_SANITIZERS=On \ + -DUSE_FATAL_SANITIZERS=On \ + -DUSE_TOOLS=On \ + -G "Ninja Multi-Config" \ + -S . -B build-test + cmake --build build-test -j $(getconf _NPROCESSORS_ONLN) + + - name: Run tests + run: | + cd build-test + ctest --verbose --output-on-failure + + - name: Restore omf2097-assets.zip + id: cache-assets + uses: actions/cache/restore@v4 + with: + path: omf2097-assets.zip + key: omf2097-assets.zip + + - name: Download omf 2097 assets + if: steps.cache-assets.outputs.cache-hit != 'true' + run: wget -q "${{ env.OPENOMF_ASSETS_URL }}" + + - name: Cache omf2097-assets.zip + if: steps.cache-assets.outputs.cache-hit != 'true' + uses: actions/cache/save@v4 + with: + path: omf2097-assets.zip + key: omf2097-assets.zip + + - name: Extract omf 2097 assets + run: unzip -j omf2097-assets.zip -d build-test/resources + + - name: Install pytest requirements + run: | + pipx install poetry + poetry install + + - name: Run pytest tests + run: ./run_pytest.sh build-test ./Debug/openomf + # Build windows release artifacts with MSVC # ----------------------------------------------------------------------------------------------- build_msvc: