Repository navigation
docs(testing): document binary corpus preparation and path guards #59
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: Platform Compatibility | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| merge_group: | |
| workflow_dispatch: | |
| workflow_call: | |
| concurrency: | |
| group: platform-compatibility-${{ github.event.pull_request.number || github.ref }} | |
| cancel-in-progress: ${{ !startsWith(github.ref, 'refs/tags/') }} | |
| permissions: | |
| contents: read | |
| jobs: | |
| platform-and-differential: | |
| name: ${{ matrix.name }} | |
| runs-on: ${{ matrix.os }} | |
| timeout-minutes: 35 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - os: ubuntu-latest | |
| name: Linux GCC | |
| compiler: -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ | |
| fortran: true | |
| - os: ubuntu-latest | |
| name: Linux Clang | |
| compiler: -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ | |
| fortran: true | |
| - os: macos-latest | |
| name: macOS Clang | |
| compiler: -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ | |
| fortran: false | |
| - os: windows-latest | |
| name: Windows MSVC | |
| compiler: "" | |
| fortran: false | |
| steps: | |
| - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6 | |
| - uses: ./.github/actions/setup-reference-runtimes | |
| with: | |
| install-fortran: ${{ matrix.fortran }} | |
| - name: Configure | |
| run: >- | |
| cmake -S . -B build/portability | |
| -DCMAKE_BUILD_TYPE=Release | |
| -DMPF_ENABLE_WERROR=ON | |
| -DMPF_BUILD_TESTS=ON | |
| -DMPF_REQUIRE_DIFFERENTIAL_RUNTIME=ON | |
| -DMPF_FORTRAN_REFERENCE_STANDARD=f2018 | |
| ${{ matrix.compiler }} | |
| - name: Build | |
| run: cmake --build build/portability --config Release --parallel | |
| - name: Test complete platform contract | |
| run: >- | |
| ctest --test-dir build/portability -C Release --output-on-failure | |
| --label-exclude performance --parallel 2 | |
| - name: Verify install layout | |
| run: >- | |
| cmake --install build/portability --config Release | |
| --prefix build/stage | |
| - name: Preserve differential diagnostics | |
| if: failure() | |
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7 | |
| with: | |
| name: portability-${{ matrix.os }}-${{ strategy.job-index }} | |
| if-no-files-found: ignore | |
| retention-days: 7 | |
| path: | | |
| build/portability/Testing/Temporary/LastTest.log | |
| build/portability/differential/*/differential-result.txt | |
| build/portability/differential/*/generated.mjs | |
| build/portability/differential/*/generated.cpp | |
| required: | |
| name: Required | |
| if: always() | |
| needs: platform-and-differential | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 2 | |
| steps: | |
| - name: Enforce required compatibility matrix result | |
| env: | |
| RESULT: ${{ needs.platform-and-differential.result }} | |
| run: test "${RESULT}" = success |