feat: test against wit-bingen tests #188
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: MacOS | |
| on: | |
| push: | |
| branches: | |
| - trunk | |
| - main | |
| pull_request: | |
| branches: | |
| - trunk | |
| - main | |
| workflow_dispatch: | |
| env: | |
| CTEST_OUTPUT_ON_FAILURE: 1 | |
| jobs: | |
| build: | |
| strategy: | |
| matrix: | |
| include: | |
| # - os: "macos-13" | |
| - os: "macos-14" | |
| fail-fast: false | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| - name: Cache Cargo registry | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.cargo/bin/ | |
| ~/.cargo/registry/index/ | |
| ~/.cargo/registry/cache/ | |
| ~/.cargo/git/db/ | |
| target/ | |
| key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} | |
| - name: Cache vcpkg registry | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| build/vcpkg_installed/ | |
| build/vcpkg_packages/ | |
| key: ${{ runner.os }}-vcpkg-${{ hashFiles('./vcpkg*.json') }} | |
| restore-keys: | | |
| ${{ runner.os }}-vcpkg- | |
| - name: install dependencies | |
| run: | | |
| brew install pkg-config autoconf autoconf-archive automake coreutils libtool cmake ninja | |
| - name: Install rust dependencies | |
| run: | | |
| cargo install wasm-tools wit-bindgen-cli || true | |
| - name: configure | |
| run: | | |
| cmake --preset linux-ninja-Debug | |
| - name: build | |
| run: | | |
| cmake --build --preset linux-ninja-Debug | |
| - name: test | |
| working-directory: build | |
| run: | | |
| ctest -VV -E "wit-stub-generation-test" | |
| - name: test-stubs-full (allowed to fail) | |
| working-directory: build | |
| continue-on-error: true | |
| run: | | |
| echo "Running wit-stub-generation-test (failures expected and will be reported)..." | |
| ctest -VV -R "wit-stub-generation-test" | |
| - name: Upload error logs | |
| if: ${{ failure() || cancelled() }} | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ${{ matrix.os }}-logs | |
| path: ./**/*.log |