CI #3
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: CI | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| workflow_dispatch: | |
| jobs: | |
| build: | |
| name: conformance | |
| runs-on: ubuntu-24.04 | |
| timeout-minutes: 30 | |
| env: | |
| # A version verified to build this package, not a measured minimum. The | |
| # package uses modules, exported extern "C" declarations and ordinary | |
| # dependencies, none of which is recent; the pin exists for reproducibility | |
| # rather than because an older mcpp is known to fail. | |
| MCPP_VERSION: 2026.8.19.3 | |
| XLINGS_VERSION: v2026.8.17.2 | |
| XLINGS_NON_INTERACTIVE: '1' | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install xlings | |
| run: | | |
| curl -fsSL https://raw.githubusercontent.com/openxlings/xlings/main/tools/other/quick_install.sh \ | |
| | bash -s "$XLINGS_VERSION" | |
| echo "$HOME/.xlings/subos/current/bin" >> "$GITHUB_PATH" | |
| - name: Install mcpp | |
| run: | | |
| xlings update | |
| xlings install "mcpp@$MCPP_VERSION" -y -g | |
| mcpp --version | |
| mcpp self config --mirror GLOBAL | |
| - name: Conformance | |
| run: | | |
| mcpp test 2>&1 | tee conformance.log | |
| # A suite that discovered nothing reports success. Both cases are | |
| # asserted to have run. | |
| grep -q 'conformance_stream ... ok' conformance.log | |
| grep -q 'conformance_memory ... ok' conformance.log | |
| - name: The exported surface matches the specification | |
| env: | |
| OPENKAL_VERSION: 0.1.0 | |
| run: | | |
| # Clause 9.3. The list is fetched from the specification repository at | |
| # the version this implementation is written against, so that the | |
| # comparison has one source rather than a copy that can drift. | |
| base="https://raw.githubusercontent.com/mcpplibs/openkal/$OPENKAL_VERSION" | |
| curl -fsSL --retry 3 --retry-all-errors -o SURFACE.txt "$base/SURFACE.txt" | |
| curl -fsSL --retry 3 --retry-all-errors -o check-surface.sh "$base/tools/check-surface.sh" | |
| bash check-surface.sh SURFACE.txt $(find target -name '*.o' | tr '\n' ' ') | |
| - name: The example runs | |
| working-directory: examples/hello | |
| run: | | |
| mcpp run 2>&1 | tee run.log | |
| grep -q 'openkal: hello' run.log | |
| grep -q 'openkal: allocation succeeded' run.log | |
| grep -q 'openkal: vectored writes unavailable' run.log |