@ -0,0 +1,25 @@ |
|||||
|
# Runs build related jobs. |
||||
|
|
||||
|
name: build |
||||
|
|
||||
|
on: |
||||
|
push: |
||||
|
branches: [main, next] |
||||
|
pull_request: |
||||
|
types: [opened, reopened, synchronize] |
||||
|
|
||||
|
jobs: |
||||
|
no-std: |
||||
|
name: Build for no-std |
||||
|
runs-on: ubuntu-latest |
||||
|
strategy: |
||||
|
fail-fast: false |
||||
|
matrix: |
||||
|
toolchain: [stable, nightly] |
||||
|
steps: |
||||
|
- uses: actions/checkout@main |
||||
|
- name: Build for no-std |
||||
|
run: | |
||||
|
rustup update --no-self-update ${{ matrix.toolchain }} |
||||
|
rustup target add wasm32-unknown-unknown |
||||
|
make build-no-std |
@ -0,0 +1,23 @@ |
|||||
|
# Runs changelog related jobs. |
||||
|
# CI job heavily inspired by: https://github.com/tarides/changelog-check-action |
||||
|
|
||||
|
name: changelog |
||||
|
|
||||
|
on: |
||||
|
pull_request: |
||||
|
types: [opened, reopened, synchronize, labeled, unlabeled] |
||||
|
|
||||
|
jobs: |
||||
|
changelog: |
||||
|
runs-on: ubuntu-latest |
||||
|
steps: |
||||
|
- name: Checkout code |
||||
|
uses: actions/checkout@main |
||||
|
with: |
||||
|
fetch-depth: 0 |
||||
|
- name: Check for changes in changelog |
||||
|
env: |
||||
|
BASE_REF: ${{ github.event.pull_request.base.ref }} |
||||
|
NO_CHANGELOG_LABEL: ${{ contains(github.event.pull_request.labels.*.name, 'no changelog') }} |
||||
|
run: ./scripts/check-changelog.sh "${{ inputs.changelog }}" |
||||
|
shell: bash |
@ -1,31 +0,0 @@ |
|||||
# Runs documentation related jobs. |
|
||||
|
|
||||
name: doc |
|
||||
|
|
||||
on: |
|
||||
push: |
|
||||
branches: |
|
||||
- main |
|
||||
pull_request: |
|
||||
types: [opened, reopened, synchronize] |
|
||||
|
|
||||
jobs: |
|
||||
docs: |
|
||||
name: Verify the docs on ${{matrix.toolchain}} |
|
||||
runs-on: ubuntu-latest |
|
||||
strategy: |
|
||||
fail-fast: false |
|
||||
matrix: |
|
||||
toolchain: [stable] |
|
||||
steps: |
|
||||
- uses: actions/checkout@v4 |
|
||||
with: |
|
||||
submodules: recursive |
|
||||
- name: Install rust |
|
||||
uses: actions-rs/toolchain@v1 |
|
||||
with: |
|
||||
toolchain: ${{matrix.toolchain}} |
|
||||
override: true |
|
||||
- uses: davidB/rust-cargo-make@v1 |
|
||||
- name: cargo make - doc |
|
||||
run: cargo make doc |
|
@ -1,32 +0,0 @@ |
|||||
# Runs no-std related jobs. |
|
||||
|
|
||||
name: no-std |
|
||||
|
|
||||
on: |
|
||||
push: |
|
||||
branches: |
|
||||
- main |
|
||||
pull_request: |
|
||||
types: [opened, reopened, synchronize] |
|
||||
|
|
||||
jobs: |
|
||||
no-std: |
|
||||
name: build ${{matrix.toolchain}} no-std for wasm32-unknown-unknown |
|
||||
runs-on: ubuntu-latest |
|
||||
strategy: |
|
||||
fail-fast: false |
|
||||
matrix: |
|
||||
toolchain: [stable, nightly] |
|
||||
steps: |
|
||||
- uses: actions/checkout@v4 |
|
||||
with: |
|
||||
submodules: recursive |
|
||||
- name: Install rust |
|
||||
uses: actions-rs/toolchain@v1 |
|
||||
with: |
|
||||
toolchain: ${{matrix.toolchain}} |
|
||||
override: true |
|
||||
- run: rustup target add wasm32-unknown-unknown |
|
||||
- uses: davidB/rust-cargo-make@v1 |
|
||||
- name: cargo make - build-no-std |
|
||||
run: cargo make build-no-std |
|
@ -1,34 +1,28 @@ |
|||||
# Runs testing related jobs |
|
||||
|
# Runs test related jobs. |
||||
|
|
||||
name: test |
name: test |
||||
|
|
||||
on: |
on: |
||||
push: |
push: |
||||
branches: |
|
||||
- main |
|
||||
|
branches: [main, next] |
||||
pull_request: |
pull_request: |
||||
types: [opened, reopened, synchronize] |
types: [opened, reopened, synchronize] |
||||
|
|
||||
jobs: |
jobs: |
||||
test: |
test: |
||||
name: test ${{matrix.toolchain}} on ${{matrix.os}} with ${{matrix.features}} |
|
||||
|
name: test ${{matrix.toolchain}} on ${{matrix.os}} with ${{matrix.args}} |
||||
runs-on: ${{matrix.os}}-latest |
runs-on: ${{matrix.os}}-latest |
||||
strategy: |
strategy: |
||||
fail-fast: false |
fail-fast: false |
||||
matrix: |
matrix: |
||||
toolchain: [stable, nightly] |
toolchain: [stable, nightly] |
||||
os: [ubuntu] |
os: [ubuntu] |
||||
features: ["test", "test-no-default-features"] |
|
||||
|
args: [default, no-default] |
||||
timeout-minutes: 30 |
timeout-minutes: 30 |
||||
steps: |
steps: |
||||
- uses: actions/checkout@v4 |
|
||||
with: |
|
||||
submodules: recursive |
|
||||
- name: Install rust |
|
||||
uses: actions-rs/toolchain@v1 |
|
||||
with: |
|
||||
toolchain: ${{matrix.toolchain}} |
|
||||
override: true |
|
||||
- uses: davidB/rust-cargo-make@v1 |
|
||||
- name: cargo make - test |
|
||||
run: cargo make ${{matrix.features}} |
|
||||
|
- uses: actions/checkout@main |
||||
|
- uses: taiki-e/install-action@nextest |
||||
|
- name: Perform tests |
||||
|
run: | |
||||
|
rustup update --no-self-update ${{matrix.toolchain}} |
||||
|
make test-${{matrix.args}} |
@ -0,0 +1,21 @@ |
|||||
|
#!/bin/bash |
||||
|
set -uo pipefail |
||||
|
|
||||
|
CHANGELOG_FILE="${1:-CHANGELOG.md}" |
||||
|
|
||||
|
if [ "${NO_CHANGELOG_LABEL}" = "true" ]; then |
||||
|
# 'no changelog' set, so finish successfully |
||||
|
echo "\"no changelog\" label has been set" |
||||
|
exit 0 |
||||
|
else |
||||
|
# a changelog check is required |
||||
|
# fail if the diff is empty |
||||
|
if git diff --exit-code "origin/${BASE_REF}" -- "${CHANGELOG_FILE}"; then |
||||
|
>&2 echo "Changes should come with an entry in the \"CHANGELOG.md\" file. This behavior |
||||
|
can be overridden by using the \"no changelog\" label, which is used for changes |
||||
|
that are trivial / explicitely stated not to require a changelog entry." |
||||
|
exit 1 |
||||
|
fi |
||||
|
|
||||
|
echo "The \"CHANGELOG.md\" file has been updated." |
||||
|
fi |