ci: assume wstd-aws-ci-role #238
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: CI | ||
| on: | ||
| pull_request: | ||
| push: | ||
| branches: | ||
| - staging | ||
| - trying | ||
| env: | ||
| RUSTFLAGS: -Dwarnings | ||
| jobs: | ||
| build_and_test: | ||
| name: Build and test | ||
| runs-on: ${{ matrix.os }} | ||
| strategy: | ||
| matrix: | ||
| os: [ubuntu-latest, windows-latest, macOS-latest] | ||
| steps: | ||
| - uses: actions/checkout@master | ||
| - uses: ./.github/actions/install-rust | ||
| - name: Install wasmtime | ||
| uses: bytecodealliance/actions/wasmtime/setup@v1 | ||
| - name: check | ||
| uses: actions-rs/cargo@v1 | ||
| with: | ||
| command: check | ||
| args: --workspace --all --bins --examples | ||
| - name: wstd tests | ||
| uses: actions-rs/cargo@v1 | ||
| with: | ||
| command: test | ||
| args: -p wstd --target wasm32-wasip2 -- --nocapture | ||
| # pchickey made a role and bucket on his personal aws account | ||
| # it only provides ListBucket and GetObject for a single bucket | ||
| - name: Configure AWS Credentials | ||
| id: creds | ||
| uses: aws-actions/configure-aws-credentials@v5.1.0 | ||
| with: | ||
| aws-region: us-west-2 | ||
| role-to-assume: arn:aws:iam::313377415443:role/wstd-aws-ci-role | ||
| role-session-name: github-ci | ||
| - name: example tests | ||
| uses: actions-rs/cargo@v1 | ||
| with: | ||
| command: test | ||
| args: -p test-programs -- --nocapture | ||
| env: | ||
| AWS_REGION: us-west-2 | ||
| AWS_ACCESS_KEY_ID: ${{ steps.creds.outputs.aws-access-key-id }} | ||
| AWS_SECRET_ACCESS_KEY: ${{ steps.creds.outputs.aws-secret-access-key }} | ||
| AWS_SESSION_TOKEN: ${{ steps.creds.outputs.aws-session-token }} | ||
| WSTD_EXAMPLE_BUCKET: wstd-example-bucket | ||
| check_fmt_and_docs: | ||
| name: Checking fmt and docs | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@master | ||
| - uses: ./.github/actions/install-rust | ||
| - name: fmt | ||
| run: cargo fmt --all -- --check | ||
| - name: Docs | ||
| run: cargo doc | ||
| - name: Clippy | ||
| run: cargo clippy --all | ||
| verify-publish: | ||
| name: Verify publish | ||
| if: github.repository_owner == 'bytecodealliance' | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@master | ||
| - uses: ./.github/actions/install-rust | ||
| - 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 | ||