Repository navigation
Implement http for WASIp3
#389
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: | |
| pull_request: | |
| push: | |
| branches: | |
| - staging | |
| - trying | |
| env: | |
| RUSTFLAGS: -Dwarnings | |
| # required for AWS oidc | |
| permissions: | |
| id-token: write | |
| jobs: | |
| build_and_test: | |
| name: Build and test | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| rust: [msrv, stable, nightly] | |
| steps: | |
| - uses: actions/checkout@master | |
| - uses: ./.github/actions/install-rust | |
| with: | |
| toolchain: ${{ matrix.rust }} | |
| - name: Install wasmtime | |
| uses: bytecodealliance/actions/wasmtime/setup@v1 | |
| # pchickey made a role `wstd-aws-ci-role` and bucket `wstd-example-bucket` | |
| # on his personal aws account 313377415443. The role only provides | |
| # ListBucket and GetObject for the example bucket, which is enough to pass | |
| # the single integration test. The role is configured to trust GitHub | |
| # actions for the bytecodealliance/wstd repo. This action will set the | |
| # AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, and AWS_SESSION_TOKEN | |
| # environment variables. | |
| - name: get aws credentials | |
| id: creds | |
| uses: aws-actions/configure-aws-credentials@v5.1.0 | |
| continue-on-error: true | |
| with: | |
| aws-region: us-west-2 | |
| role-to-assume: arn:aws:iam::313377415443:role/wstd-aws-ci-role | |
| role-session-name: github-ci | |
| - name: rust version | |
| run: cargo --version | |
| - name: check p2 | |
| run: cargo check --workspace --all --bins --examples --target wasm32-wasip2 | |
| # TODO: remove all nightly conditions for p3 targets once wasm32-wasip3 is | |
| # stable. | |
| - name: check p3 | |
| if: matrix.rust == 'nightly' | |
| run: cargo check --workspace --all --bins --examples --target wasm32-wasip3 | |
| - name: wstd p2 tests | |
| run: cargo test -p wstd -p wstd-axum --target wasm32-wasip2 -- --nocapture | |
| - name: wstd p3 tests | |
| if: matrix.rust == 'nightly' | |
| run: cargo test -p wstd -p wstd-axum --target wasm32-wasip3 -- --nocapture | |
| - name: test-programs tests | |
| run: cargo test -p test-programs -- --nocapture | |
| if: steps.creds.outcome == 'success' | |
| - name: test-programs tests (no aws) | |
| run: cargo test -p test-programs --features no-aws -- --nocapture | |
| if: steps.creds.outcome != 'success' | |
| check_fmt_and_docs: | |
| name: Checking fmt and docs | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@master | |
| - uses: ./.github/actions/install-rust | |
| with: | |
| toolchain: nightly | |
| - name: fmt | |
| run: cargo fmt --all -- --check | |
| - name: Docs | |
| run: | | |
| cargo doc --target wasm32-wasip2 | |
| cargo doc --target wasm32-wasip3 | |
| - name: Clippy | |
| run: | | |
| cargo clippy --workspace --exclude test-programs --target wasm32-wasip2 | |
| cargo clippy --workspace --exclude test-programs --target wasm32-wasip3 | |
| cargo clippy -p test-programs | |
| verify-publish: | |
| name: Verify publish | |
| if: github.repository_owner == 'bytecodealliance' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@master | |
| - uses: ./.github/actions/install-rust | |
| with: | |
| toolchain: nightly | |
| - run: rustc ci/publish.rs | |
| # Make sure we can bump version numbers for the next release | |
| - run: ./publish bump | |
| # Make sure the tree is publish-able as-is | |
| - run: ./publish verify |