Skip to content

Update changelog and tag release manifest #988

Update changelog and tag release manifest

Update changelog and tag release manifest #988

Workflow file for this run

on:
push:
branches:
- main
- fix-ci
workflow_dispatch:
name: CI
env:
SDK_BATCH_COUNT: 32
EXAMPLES_BATCH_COUNT: 4
RUST_VERSIONS: "stable"
RUST_VERSION: "stable"
jobs:
generate-test-sdk-matrix:
runs-on: ubuntu-latest
name: Generate Test Matrix (SDK)
steps:
- uses: actions/checkout@v3
- name: Generate the matrix
id: generate-matrix
# Run the `crate-range.py` script to calculate a matrix for the `test-sdk` job.
# This script outputs JSON that GitHub Actions can consume as a matrix definition.
# Rust versions to test against are arguments to this script.
run: echo "matrix=$(./tools/ci/crate-range.py generate-matrix -b ${SDK_BATCH_COUNT} --folder sdk ${RUST_VERSIONS})" >> "${GITHUB_OUTPUT}"
outputs:
matrix: ${{ steps.generate-matrix.outputs.matrix }}
test-sdk:
needs: generate-test-sdk-matrix
runs-on: ubuntu-latest
name: Compile & Test SDK
env:
CARGO_INCREMENTAL: "0"
RUSTFLAGS: ""
RUSTDOCFLAGS: ""
strategy:
# Use the matrix generated by the previous job
matrix: ${{ fromJson(needs.generate-test-sdk-matrix.outputs.matrix) }}
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.rust_version }}
# Pinned to the commit hash of v2.1.0
- uses: Swatinem/rust-cache@b894d59a8d236e2979b247b80dac8d053ab340dd
with:
shared-key: test
- name: Cargo Test
run: ./tools/ci/crate-range.py run ${{ matrix.crate_range }} --folder sdk -- cargo test --all-features
- name: Cargo Doc
run: ./tools/ci/crate-range.py run ${{ matrix.crate_range }} --folder sdk -- cargo doc --all-features --no-deps
# Psuedo-job that depends on the test job so that we don't have to enter
# the myriad of crate range combinations into GitHub's protected branch rules
require-test-sdk:
needs: test-sdk
# Run this job even if its dependency jobs fail
if: always()
runs-on: ubuntu-latest
name: Test Matrix Success (SDK)
steps:
- name: Verify jobs succeeded
# Pinned to commit hash of v1.2.2
uses: re-actors/alls-green@05ac9388f0aebcb5727afa17fcccfecd6f8ec5fe
with:
jobs: ${{ toJSON(needs) }}
generate-check-examples-matrix:
runs-on: ubuntu-latest
name: Generate Check Matrix (examples)
steps:
- uses: actions/checkout@v3
- name: Generate the matrix
id: generate-matrix
# Run the `crate-range.py` script to calculate a matrix for the `check-examples` job.
# This script outputs JSON that GitHub Actions can consume as a matrix definition.
# Rust versions to check against are arguments to this script.
run: echo "matrix=$(./tools/ci/crate-range.py generate-matrix -b ${EXAMPLES_BATCH_COUNT} --folder examples ${RUST_VERSIONS})" >> "${GITHUB_OUTPUT}"
outputs:
matrix: ${{ steps.generate-matrix.outputs.matrix }}
check-examples:
needs: generate-check-examples-matrix
runs-on: ubuntu-latest
name: Check Examples
env:
CARGO_INCREMENTAL: "0"
RUSTFLAGS: ""
RUSTDOCFLAGS: ""
strategy:
# Use the matrix generated by the previous job
matrix: ${{ fromJson(needs.generate-check-examples-matrix.outputs.matrix) }}
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.rust_version }}
targets: wasm32-unknown-unknown
# Pinned to the commit hash of v2.1.0
- uses: Swatinem/rust-cache@b894d59a8d236e2979b247b80dac8d053ab340dd
with:
shared-key: check
- name: Cargo Check
run: ./tools/ci/crate-range.py run ${{ matrix.crate_range }} --folder examples -- cargo check --all-features
# Psuedo-job that depends on the check job so that we don't have to enter
# the myriad of crate range combinations into GitHub's protected branch rules
require-check-examples:
needs: check-examples
# Run this job even if its dependency jobs fail
if: always()
runs-on: ubuntu-latest
name: Check Matrix Success (examples)
steps:
- name: Verify jobs succeeded
# Pinned to commit hash of v1.2.2
uses: re-actors/alls-green@05ac9388f0aebcb5727afa17fcccfecd6f8ec5fe
with:
jobs: ${{ toJSON(needs) }}
check-manifests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v3
with:
repository: awslabs/smithy-rs
path: smithy-rs
- uses: dtolnay/rust-toolchain@master
with:
toolchain: "${{ env.RUST_VERSION }}"
# Pinned to the commit hash of v2.1.0
- uses: Swatinem/rust-cache@b894d59a8d236e2979b247b80dac8d053ab340dd
with:
shared-key: check-manifests
- name: check manifests
working-directory: smithy-rs/tools/ci-build/publisher
run: cargo run fix-manifests --check --location ../../../../sdk