Repository navigation
Matlab Reference #1
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: Matlab Reference | |
| on: | |
| workflow_dispatch: | |
| workflow_call: | |
| concurrency: | |
| group: matlab-reference-${{ github.ref }} | |
| cancel-in-progress: false | |
| permissions: | |
| contents: read | |
| jobs: | |
| native-r2024b: | |
| name: R2024b invocation parity and output observations | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 45 | |
| steps: | |
| - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6 | |
| - name: Verify public batch-licensing capability | |
| env: | |
| REPOSITORY_PRIVATE: ${{ github.event.repository.private }} | |
| run: test "$REPOSITORY_PRIVATE" = false | |
| - uses: ./.github/actions/setup-reference-runtimes | |
| - name: Configure compiler and strict generated-code checks | |
| run: >- | |
| cmake -S . -B build/matlab-reference | |
| -DCMAKE_BUILD_TYPE=Release -DMPF_ENABLE_WERROR=ON | |
| -DMPF_BUILD_TESTS=ON -DMPF_REQUIRE_DIFFERENTIAL_RUNTIME=ON | |
| - name: Build independent target compiler | |
| run: cmake --build build/matlab-reference --target mpfc --parallel | |
| - name: Execute both generated targets | |
| run: >- | |
| ctest --test-dir build/matlab-reference --output-on-failure | |
| -R '^mpf\.differential\.matlab-invocation-context$' | |
| - name: Set up actual MATLAB R2024b | |
| uses: matlab-actions/setup-matlab@f9e43010f1ae678f7cfa0542fe2a4f60f7d1ad8d # v3 | |
| with: | |
| release: R2024b | |
| - name: Execute original source and native semantic probes | |
| uses: matlab-actions/run-command@bfa857648f4895aa98a446fe41c85e0788421ed5 # v3 | |
| with: | |
| command: >- | |
| addpath(fullfile(pwd, 'tests', 'reference', 'matlab')); | |
| mpf_run_reference(pwd, fullfile(pwd, 'build', 'matlab-reference', 'official')); | |
| - name: Verify native provenance and target parity | |
| env: | |
| SOURCE_REVISION: ${{ github.sha }} | |
| run: >- | |
| cmake -DSOURCE_DIR="$PWD" | |
| -DREFERENCE_DIR="$PWD/build/matlab-reference/official" | |
| -DDIFFERENTIAL_RESULT="$PWD/build/matlab-reference/differential/matlab-invocation-context/differential-result.txt" | |
| -DSOURCE_REVISION="$SOURCE_REVISION" | |
| -P tests/cmake/verify_matlab_reference.cmake | |
| - name: Preserve original source, native observations, and target execution | |
| if: always() | |
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7 | |
| with: | |
| name: matlab-r2024b-reference | |
| if-no-files-found: warn | |
| retention-days: 30 | |
| path: | | |
| build/matlab-reference/official | |
| build/matlab-reference/differential/matlab-invocation-context/differential-result.txt | |
| build/matlab-reference/differential/matlab-invocation-context/generated.mjs | |
| build/matlab-reference/differential/matlab-invocation-context/generated.cpp | |
| build/matlab-reference/Testing/Temporary/LastTest.log |