fix release CI #336
Workflow file for this run
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: Test | |
| on: | |
| pull_request: | |
| branches: [main] | |
| paths-ignore: | |
| - "examples/**" | |
| - "README.md" | |
| - "CONTRIBUTING.md" | |
| workflow_dispatch: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| env: | |
| CARGO_TERM_COLOR: always | |
| WASI_SDK_VERSION: 33 | |
| jobs: | |
| linux: | |
| name: Populate cache | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: "recursive" | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.14.0" | |
| - name: Install latest Rust stable toolchain | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| targets: wasm32-wasip2 | |
| components: clippy, rustfmt | |
| - uses: Swatinem/rust-cache@v2 | |
| with: | |
| shared-key: "rust-cache-${{ hashFiles('./Cargo.lock') }}" | |
| cache-on-failure: false | |
| - name: Install WASI-SDK | |
| shell: bash | |
| run: | | |
| cd /tmp | |
| curl -LO https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-${WASI_SDK_VERSION}/wasi-sdk-${WASI_SDK_VERSION}.0-x86_64-linux.tar.gz | |
| tar xf wasi-sdk-${WASI_SDK_VERSION}.0-x86_64-linux.tar.gz | |
| mv wasi-sdk-${WASI_SDK_VERSION}.0-x86_64-linux /opt/wasi-sdk | |
| - name: Build | |
| shell: bash | |
| run: cargo build --release | |
| - name: Upload CPython builddir | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: cpython-wasi | |
| path: cpython/builddir/wasi | |
| test: | |
| name: Test | |
| needs: linux | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| config: | |
| - { os: "ubuntu-latest", wasiSDK: "x86_64-linux" } | |
| - { os: "macos-latest", wasiSDK: "arm64-macos" } | |
| - { os: "windows-latest", wasiSDK: "x86_64-windows" } | |
| runs-on: ${{ matrix.config.os }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: "recursive" | |
| - name: Install latest Rust stable toolchain | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| targets: wasm32-wasip2 | |
| components: clippy, rustfmt | |
| - uses: Swatinem/rust-cache@v2 | |
| with: | |
| shared-key: "rust-cache-${{ hashFiles('./Cargo.lock') }}" | |
| cache-on-failure: false | |
| - name: Download WASI-SDK | |
| shell: bash | |
| run: | | |
| cd /tmp | |
| curl -LO https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-${WASI_SDK_VERSION}/wasi-sdk-${WASI_SDK_VERSION}.0-${{ matrix.config.wasiSDK }}.tar.gz | |
| tar xf wasi-sdk-${WASI_SDK_VERSION}.0-${{ matrix.config.wasiSDK }}.tar.gz | |
| - name: Install WASI-SDK | |
| if: runner.os != 'Windows' | |
| shell: bash | |
| run: sudo mv /tmp/wasi-sdk-${WASI_SDK_VERSION}.0-${{ matrix.config.wasiSDK }} /opt/wasi-sdk | |
| - name: Install WASI-SDK on Windows | |
| if: runner.os == 'Windows' | |
| shell: bash | |
| run: echo "WASI_SDK_PATH=$(cygpath -m /tmp/wasi-sdk-${WASI_SDK_VERSION}.0-${{ matrix.config.wasiSDK }})" >> ${GITHUB_ENV} | |
| - name: Restore CPython | |
| uses: actions/download-artifact@v5 | |
| with: | |
| name: cpython-wasi | |
| path: cpython/builddir/wasi | |
| - name: Lint | |
| shell: bash | |
| run: bash .github/workflows/lint.sh | |
| - uses: taiki-e/install-action@v2 | |
| with: | |
| tool: wasmtime-cli@43.0.0 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.14.0" | |
| - name: Test | |
| shell: bash | |
| run: COMPONENTIZE_PY_TEST_COUNT=20 PROPTEST_MAX_SHRINK_ITERS=0 cargo test --release |