wstd 0.6.6

An async standard library for Wasm Components and WASI 0.2
Documentation
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: check
      run: cargo check --workspace --all --bins --examples

    - name: wstd tests
      run: cargo test -p wstd -p wstd-axum --target wasm32-wasip2 -- --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

    - 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