diff --git a/.github/workflows/compilation.yml b/.github/workflows/compilation.yml index a2215f041..b382472d1 100644 --- a/.github/workflows/compilation.yml +++ b/.github/workflows/compilation.yml @@ -84,6 +84,68 @@ 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 gcc + + - name: Build openomf + run: | + cmake -DCMAKE_BUILD_TYPE=Release \ + -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: