From 95e494968053a17ac05a0c1cec9d8b2c7d450296 Mon Sep 17 00:00:00 2001 From: Emil Fresk Date: Sun, 8 Jan 2023 21:33:44 +0100 Subject: Start CI, disable docs building --- .github/workflows/build.yml | 552 ++++++++++++++++++++++---------------------- 1 file changed, 276 insertions(+), 276 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 5e1467c..35c0bff 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -39,7 +39,7 @@ jobs: - thumbv6m-none-eabi - x86_64-unknown-linux-gnu toolchain: - - stable + - nightly steps: - name: Checkout uses: actions/checkout@v3 @@ -93,7 +93,7 @@ jobs: - thumbv8m.base-none-eabi - thumbv8m.main-none-eabi toolchain: - - stable + - nightly steps: - name: Checkout uses: actions/checkout@v3 @@ -125,7 +125,7 @@ jobs: - thumbv7m-none-eabi - thumbv6m-none-eabi toolchain: - - stable + - nightly steps: - name: Checkout uses: actions/checkout@v3 @@ -168,7 +168,7 @@ jobs: target: - x86_64-unknown-linux-gnu toolchain: - - stable + - nightly steps: - name: Checkout uses: actions/checkout@v3 @@ -224,276 +224,276 @@ jobs: - name: Run cargo test run: cargo test --test tests - # Build documentation, check links - docs: - name: docs - runs-on: ubuntu-22.04 - steps: - - name: Checkout - uses: actions/checkout@v3 - - - name: Cache pip installed linkchecker - uses: actions/cache@v3 - with: - path: ~/.cache/pip - key: ${{ runner.os }}-pip - restore-keys: | - ${{ runner.os }}-pip- - - - name: Set up Python 3.x - uses: actions/setup-python@v4 - with: - # Semantic version range syntax or exact version of a Python version - python-version: '3.x' - - # You can test your matrix by printing the current Python version - - name: Display Python version - run: python -c "import sys; print(sys.version)" - - - name: Install dependencies - run: pip install git+https://github.com/linkchecker/linkchecker.git - - - name: Remove cargo-config - run: rm -f .cargo/config - - - name: Fail on warnings - run: sed -i 's,//deny_warnings_placeholder_for_ci,#![deny(warnings)],' src/lib.rs macros/src/lib.rs - - - name: Build docs - run: cargo doc - - - name: Check links - run: | - td=$(mktemp -d) - cp -r target/doc $td/api - linkchecker $td/api/rtic/ - linkchecker $td/api/cortex_m_rtic_macros/ - - # Build the books - mdbook: - name: mdbook - runs-on: ubuntu-22.04 - steps: - - name: Checkout - uses: actions/checkout@v3 - - name: Set up Python 3.x - uses: actions/setup-python@v4 - with: - # Semantic version range syntax or exact version of a Python version - python-version: '3.x' - - # You can test your matrix by printing the current Python version - - name: Display Python version - run: python -c "import sys; print(sys.version)" - - - name: Install dependencies - run: pip install git+https://github.com/linkchecker/linkchecker.git - - - name: mdBook Action - uses: peaceiris/actions-mdbook@v1 - with: - mdbook-version: 'latest' - - - name: Build book in English - shell: 'script --return --quiet --command "bash {0}"' - run: cd book/en && if mdbook build |& tee /dev/tty | grep "\[ERROR\]"; then exit 1; else exit 0; fi - - - name: Build book in Russian - shell: 'script --return --quiet --command "bash {0}"' - run: cd book/ru && if mdbook build |& tee /dev/tty | grep "\[ERROR\]"; then echo "Russian book needs updating!"; else exit 0; fi - - - name: Check links - run: | - td=$(mktemp -d) - mkdir $td/book - cp -r book/en/book $td/book/en - cp -r book/ru/book $td/book/ru - cp LICENSE-* $td/book/en - cp LICENSE-* $td/book/ru - - linkchecker $td/book/en/ - linkchecker $td/book/ru/ - - # Update stable branch - # - # This needs to run before book is built - mergetostablebranch: - name: If CI passes, merge master branch into release/vX - runs-on: ubuntu-22.04 - needs: - - style - - check - - clippy - - checkexamples - - testexamples - - checkmacros - - testmacros - - tests - - docs - - mdbook - - # Only run this when pushing to master branch - if: github.ref == 'refs/heads/master' - steps: - - uses: actions/checkout@v3 - - - name: Get crate version and print output branch release/vX - id: crateversionbranch - # Parse metadata for version number, extract the Semver Major - run: | - VERSION=$(cargo metadata --format-version 1 --no-deps --offline | jq -r '.packages[] | select(.name =="cortex-m-rtic") | .version') - VERSIONMAJOR=${VERSION%.*.*} - echo "branch=release/v$VERSIONMAJOR" >> $GITHUB_ENV - echo "versionmajor=$VERSIONMAJOR" >> $GITHUB_ENV - echo "version=$VERSION" >> $GITHUB_ENV - - - uses: everlytic/branch-merge@1.1.5 - with: - github_token: ${{ github.token }} - source_ref: 'master' - target_branch: ${{ env.branch }} - commit_message_template: '[Bors] Merged {source_ref} into target {target_branch}' - - # Only runs when pushing to master branch - # Bors run CI against staging branch, - # if that succeeds Borst tries against master branch - # If all tests pass, then deploy stage is run - deploy: - name: deploy - runs-on: ubuntu-22.04 - needs: - mergetostablebranch - - # Only run this when pushing to master branch - if: github.ref == 'refs/heads/master' - steps: - - uses: actions/checkout@v3 - - - name: Set up Python 3.x - uses: actions/setup-python@v4 - with: - # Semantic version range syntax or exact version of a Python version - python-version: '3.x' - - # You can test your matrix by printing the current Python version - - name: Display Python version - run: python -c "import sys; print(sys.version)" - - - name: mdBook Action - uses: peaceiris/actions-mdbook@v1 - with: - mdbook-version: 'latest' - - - name: Get crate version - id: crateversion - # Parse metadata for version number, extract the Semver Major - run: | - VERSION=$(cargo metadata --format-version 1 --no-deps --offline | jq -r '.packages[] | select(.name =="cortex-m-rtic") | .version') - VERSIONMAJOR=${VERSION%.*.*} - echo "branch=release/v$VERSIONMAJOR" >> $GITHUB_ENV - echo "versionmajor=$VERSIONMAJOR" >> $GITHUB_ENV - echo "version=$VERSION" >> $GITHUB_ENV - - - name: Remove cargo-config - run: rm -f .cargo/config - - - name: Build docs - run: cargo doc - - - name: Build books - shell: 'script --return --quiet --command "bash {0}"' - run: | - langs=( en ru ) - devver=( dev ) - # The latest stable must be the first element in the array - vers=( "1" "0.5" "0.4" ) - - # All releases start with "v" - # followed by MAJOR.MINOR.PATCH, see semver.org - # Store first in array as stable - stable=${vers} - crateversion={{ env.versionmajor }} - - echo "Latest stable version: $stable" - echo "Current crate version: $crateversion" - - # Create directories - td=$(mktemp -d) - mkdir -p $td/$devver/book/ - cp -r target/doc $td/$devver/api - - # Redirect rtic.rs/meeting/index.html to hackmd - mkdir $td/meeting - sed "s|URL|https://hackmd.io/c_mFUZL-Q2C6614MlrrxOg|g" redirect.html > $td/meeting/index.html - sed -i "s|Page Redirection|RTIC Meeting|" $td/meeting/index.html - sed -i "s|If you|Redirecting to RTIC HackMD. If you|" $td/meeting/index.html - - # Redirect the main site to the stable release - sed "s|URL|$stable|g" redirect.html > $td/index.html - - # Create the redirects for dev-version - # If the current stable and the version being built differ, - # then there is a dev-version and the links should point to it. - if [[ "$stable" != "$crateversion" ]]; - then - sed 's|URL|rtic/index.html|g' redirect.html > $td/$devver/api/index.html - sed 's|URL|book/en|g' redirect.html > $td/$devver/index.html - else - # If the current stable and the "dev" version in master branch - # share the same major version, redirect dev/ to stable book - sed 's|URL|rtic.rs/$stable/api/rtic|g' redirect.html > $td/$devver/api/index.html - sed 's|URL|rtic.rs/$stable|g' redirect.html > $td/$devver/index.html - fi - - # Build books - for lang in ${langs[@]}; do - ( cd book/$lang && - if mdbook build |& tee /dev/tty | grep "\[ERROR\]"; then exit 1; else exit 0; fi - ) - cp -r book/$lang/book $td/$devver/book/$lang - cp LICENSE-* $td/$devver/book/$lang/ - done - - # Build older versions, including stable - root=$(pwd) - for ver in ${vers[@]}; do - prefix=${ver} - - mkdir -p $td/$prefix/book - src=$(mktemp -d) - curl -L https://github.com/rtic-rs/cortex-m-rtic/archive/release/v${ver}.tar.gz | tar xz --strip-components 1 -C $src - - pushd $src - rm -f .cargo/config - cargo doc || cargo doc --features timer-queue - cp -r target/doc $td/$prefix/api - sed 's|URL|rtic/index.html|g' $root/redirect.html > $td/$prefix/api/index.html - for lang in ${langs[@]}; do - ( cd book/$lang && - if mdbook build |& tee /dev/tty | grep "\[ERROR\]"; then exit 1; else exit 0; fi - ) - cp -r book/$lang/book $td/$prefix/book/$lang - cp LICENSE-* $td/$prefix/book/$lang/ - done - sed 's|URL|book/en|g' $root/redirect.html > $td/$prefix/index.html - popd - - rm -rf $src - done - - # Copy the stable book to the stable alias - cp -r $td/$stable $td/stable - - # Forward CNAME file - cp CNAME $td/ - mv $td/ bookstodeploy - - - name: Deploy to GH-pages - uses: peaceiris/actions-gh-pages@v3 - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - publish_dir: ./bookstodeploy - force_orphan: true +# # Build documentation, check links +# docs: +# name: docs +# runs-on: ubuntu-22.04 +# steps: +# - name: Checkout +# uses: actions/checkout@v3 +# +# - name: Cache pip installed linkchecker +# uses: actions/cache@v3 +# with: +# path: ~/.cache/pip +# key: ${{ runner.os }}-pip +# restore-keys: | +# ${{ runner.os }}-pip- +# +# - name: Set up Python 3.x +# uses: actions/setup-python@v4 +# with: +# # Semantic version range syntax or exact version of a Python version +# python-version: '3.x' +# +# # You can test your matrix by printing the current Python version +# - name: Display Python version +# run: python -c "import sys; print(sys.version)" +# +# - name: Install dependencies +# run: pip install git+https://github.com/linkchecker/linkchecker.git +# +# - name: Remove cargo-config +# run: rm -f .cargo/config +# +# - name: Fail on warnings +# run: sed -i 's,//deny_warnings_placeholder_for_ci,#![deny(warnings)],' src/lib.rs macros/src/lib.rs +# +# - name: Build docs +# run: cargo doc +# +# - name: Check links +# run: | +# td=$(mktemp -d) +# cp -r target/doc $td/api +# linkchecker $td/api/rtic/ +# linkchecker $td/api/cortex_m_rtic_macros/ +# +# # Build the books +# mdbook: +# name: mdbook +# runs-on: ubuntu-22.04 +# steps: +# - name: Checkout +# uses: actions/checkout@v3 +# - name: Set up Python 3.x +# uses: actions/setup-python@v4 +# with: +# # Semantic version range syntax or exact version of a Python version +# python-version: '3.x' +# +# # You can test your matrix by printing the current Python version +# - name: Display Python version +# run: python -c "import sys; print(sys.version)" +# +# - name: Install dependencies +# run: pip install git+https://github.com/linkchecker/linkchecker.git +# +# - name: mdBook Action +# uses: peaceiris/actions-mdbook@v1 +# with: +# mdbook-version: 'latest' +# +# - name: Build book in English +# shell: 'script --return --quiet --command "bash {0}"' +# run: cd book/en && if mdbook build |& tee /dev/tty | grep "\[ERROR\]"; then exit 1; else exit 0; fi +# +# - name: Build book in Russian +# shell: 'script --return --quiet --command "bash {0}"' +# run: cd book/ru && if mdbook build |& tee /dev/tty | grep "\[ERROR\]"; then echo "Russian book needs updating!"; else exit 0; fi +# +# - name: Check links +# run: | +# td=$(mktemp -d) +# mkdir $td/book +# cp -r book/en/book $td/book/en +# cp -r book/ru/book $td/book/ru +# cp LICENSE-* $td/book/en +# cp LICENSE-* $td/book/ru +# +# linkchecker $td/book/en/ +# linkchecker $td/book/ru/ +# +# # Update stable branch +# # +# # This needs to run before book is built +# mergetostablebranch: +# name: If CI passes, merge master branch into release/vX +# runs-on: ubuntu-22.04 +# needs: +# - style +# - check +# - clippy +# - checkexamples +# - testexamples +# - checkmacros +# - testmacros +# - tests +# - docs +# - mdbook +# +# # Only run this when pushing to master branch +# if: github.ref == 'refs/heads/master' +# steps: +# - uses: actions/checkout@v3 +# +# - name: Get crate version and print output branch release/vX +# id: crateversionbranch +# # Parse metadata for version number, extract the Semver Major +# run: | +# VERSION=$(cargo metadata --format-version 1 --no-deps --offline | jq -r '.packages[] | select(.name =="cortex-m-rtic") | .version') +# VERSIONMAJOR=${VERSION%.*.*} +# echo "branch=release/v$VERSIONMAJOR" >> $GITHUB_ENV +# echo "versionmajor=$VERSIONMAJOR" >> $GITHUB_ENV +# echo "version=$VERSION" >> $GITHUB_ENV +# +# - uses: everlytic/branch-merge@1.1.5 +# with: +# github_token: ${{ github.token }} +# source_ref: 'master' +# target_branch: ${{ env.branch }} +# commit_message_template: '[Bors] Merged {source_ref} into target {target_branch}' +# +# # Only runs when pushing to master branch +# # Bors run CI against staging branch, +# # if that succeeds Borst tries against master branch +# # If all tests pass, then deploy stage is run +# deploy: +# name: deploy +# runs-on: ubuntu-22.04 +# needs: +# mergetostablebranch +# +# # Only run this when pushing to master branch +# if: github.ref == 'refs/heads/master' +# steps: +# - uses: actions/checkout@v3 +# +# - name: Set up Python 3.x +# uses: actions/setup-python@v4 +# with: +# # Semantic version range syntax or exact version of a Python version +# python-version: '3.x' +# +# # You can test your matrix by printing the current Python version +# - name: Display Python version +# run: python -c "import sys; print(sys.version)" +# +# - name: mdBook Action +# uses: peaceiris/actions-mdbook@v1 +# with: +# mdbook-version: 'latest' +# +# - name: Get crate version +# id: crateversion +# # Parse metadata for version number, extract the Semver Major +# run: | +# VERSION=$(cargo metadata --format-version 1 --no-deps --offline | jq -r '.packages[] | select(.name =="cortex-m-rtic") | .version') +# VERSIONMAJOR=${VERSION%.*.*} +# echo "branch=release/v$VERSIONMAJOR" >> $GITHUB_ENV +# echo "versionmajor=$VERSIONMAJOR" >> $GITHUB_ENV +# echo "version=$VERSION" >> $GITHUB_ENV +# +# - name: Remove cargo-config +# run: rm -f .cargo/config +# +# - name: Build docs +# run: cargo doc +# +# - name: Build books +# shell: 'script --return --quiet --command "bash {0}"' +# run: | +# langs=( en ru ) +# devver=( dev ) +# # The latest stable must be the first element in the array +# vers=( "1" "0.5" "0.4" ) +# +# # All releases start with "v" +# # followed by MAJOR.MINOR.PATCH, see semver.org +# # Store first in array as stable +# stable=${vers} +# crateversion={{ env.versionmajor }} +# +# echo "Latest stable version: $stable" +# echo "Current crate version: $crateversion" +# +# # Create directories +# td=$(mktemp -d) +# mkdir -p $td/$devver/book/ +# cp -r target/doc $td/$devver/api +# +# # Redirect rtic.rs/meeting/index.html to hackmd +# mkdir $td/meeting +# sed "s|URL|https://hackmd.io/c_mFUZL-Q2C6614MlrrxOg|g" redirect.html > $td/meeting/index.html +# sed -i "s|Page Redirection|RTIC Meeting|" $td/meeting/index.html +# sed -i "s|If you|Redirecting to RTIC HackMD. If you|" $td/meeting/index.html +# +# # Redirect the main site to the stable release +# sed "s|URL|$stable|g" redirect.html > $td/index.html +# +# # Create the redirects for dev-version +# # If the current stable and the version being built differ, +# # then there is a dev-version and the links should point to it. +# if [[ "$stable" != "$crateversion" ]]; +# then +# sed 's|URL|rtic/index.html|g' redirect.html > $td/$devver/api/index.html +# sed 's|URL|book/en|g' redirect.html > $td/$devver/index.html +# else +# # If the current stable and the "dev" version in master branch +# # share the same major version, redirect dev/ to stable book +# sed 's|URL|rtic.rs/$stable/api/rtic|g' redirect.html > $td/$devver/api/index.html +# sed 's|URL|rtic.rs/$stable|g' redirect.html > $td/$devver/index.html +# fi +# +# # Build books +# for lang in ${langs[@]}; do +# ( cd book/$lang && +# if mdbook build |& tee /dev/tty | grep "\[ERROR\]"; then exit 1; else exit 0; fi +# ) +# cp -r book/$lang/book $td/$devver/book/$lang +# cp LICENSE-* $td/$devver/book/$lang/ +# done +# +# # Build older versions, including stable +# root=$(pwd) +# for ver in ${vers[@]}; do +# prefix=${ver} +# +# mkdir -p $td/$prefix/book +# src=$(mktemp -d) +# curl -L https://github.com/rtic-rs/cortex-m-rtic/archive/release/v${ver}.tar.gz | tar xz --strip-components 1 -C $src +# +# pushd $src +# rm -f .cargo/config +# cargo doc || cargo doc --features timer-queue +# cp -r target/doc $td/$prefix/api +# sed 's|URL|rtic/index.html|g' $root/redirect.html > $td/$prefix/api/index.html +# for lang in ${langs[@]}; do +# ( cd book/$lang && +# if mdbook build |& tee /dev/tty | grep "\[ERROR\]"; then exit 1; else exit 0; fi +# ) +# cp -r book/$lang/book $td/$prefix/book/$lang +# cp LICENSE-* $td/$prefix/book/$lang/ +# done +# sed 's|URL|book/en|g' $root/redirect.html > $td/$prefix/index.html +# popd +# +# rm -rf $src +# done +# +# # Copy the stable book to the stable alias +# cp -r $td/$stable $td/stable +# +# # Forward CNAME file +# cp CNAME $td/ +# mv $td/ bookstodeploy +# +# - name: Deploy to GH-pages +# uses: peaceiris/actions-gh-pages@v3 +# with: +# github_token: ${{ secrets.GITHUB_TOKEN }} +# publish_dir: ./bookstodeploy +# force_orphan: true # Refs: https://github.com/rust-lang/crater/blob/9ab6f9697c901c4a44025cf0a39b73ad5b37d198/.github/workflows/bors.yml#L125-L149 # @@ -511,8 +511,8 @@ jobs: - checkmacros - testmacros - tests - - docs - - mdbook +# - docs +# - mdbook runs-on: ubuntu-22.04 steps: - name: Mark the job as a success -- cgit v1.2.3 From a3f48a524b94107a6e250f41f87f29c1c0d65821 Mon Sep 17 00:00:00 2001 From: Emil Fresk Date: Mon, 23 Jan 2023 20:14:50 +0100 Subject: Does CI work again? --- .github/workflows/build.yml | 19 ++++++++++++++++++- .github/workflows/changelog.yml | 22 ++++++++++++++++++++-- 2 files changed, 38 insertions(+), 3 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 35c0bff..1493c3f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -22,10 +22,11 @@ jobs: uses: actions/checkout@v3 - name: Fail on warnings + working-directory: ./rtic run: sed -i 's,//deny_warnings_placeholder_for_ci,#![deny(warnings)],' src/lib.rs macros/src/lib.rs - - name: cargo fmt --check + working-directory: ./rtic run: cargo fmt --all -- --check # Compilation check @@ -45,20 +46,24 @@ jobs: uses: actions/checkout@v3 - name: Install Rust ${{ matrix.toolchain }} + working-directory: ./rtic run: | rustup set profile minimal rustup override set ${{ matrix.toolchain }} - name: Configure Rust target (${{ matrix.target }}) + working-directory: ./rtic run: rustup target add ${{ matrix.target }} - name: Fail on warnings + working-directory: ./rtic run: sed -i 's,//deny_warnings_placeholder_for_ci,#![deny(warnings)],' src/lib.rs macros/src/lib.rs - name: Cache Dependencies uses: Swatinem/rust-cache@v2 - name: cargo check + working-directory: ./rtic run: cargo check --target=${{ matrix.target }} # Clippy @@ -70,15 +75,18 @@ jobs: uses: actions/checkout@v3 - name: Fail on warnings + working-directory: ./rtic run: sed -i 's,//deny_warnings_placeholder_for_ci,#![deny(warnings)],' src/lib.rs macros/src/lib.rs - name: Add Rust component clippy + working-directory: ./rtic run: rustup component add clippy - name: Cache Dependencies uses: Swatinem/rust-cache@v2 - name: cargo clippy + working-directory: ./rtic run: cargo clippy # Verify all examples, checks @@ -113,6 +121,7 @@ jobs: uses: Swatinem/rust-cache@v2 - name: Check the examples + working-directory: ./rtic run: cargo check --examples --target=${{ matrix.target }} # Verify the example output with run-pass tests @@ -154,9 +163,11 @@ jobs: sudo apt install -y qemu-system-arm - name: Fail on warnings + working-directory: ./rtic run: sed -i 's,//deny_warnings_placeholder_for_ci,#![deny(warnings)],' src/lib.rs macros/src/lib.rs - name: Run-pass tests + working-directory: ./rtic run: cargo xtask --target ${{ matrix.target }} # Check the correctness of macros/ crate @@ -185,9 +196,11 @@ jobs: uses: Swatinem/rust-cache@v2 - name: Fail on warnings + working-directory: ./rtic run: sed -i 's,//deny_warnings_placeholder_for_ci,#![deny(warnings)],' src/lib.rs macros/src/lib.rs - name: cargo check + working-directory: ./rtic run: cargo check --manifest-path macros/Cargo.toml --target=${{ matrix.target }} # Run the macros test-suite @@ -202,9 +215,11 @@ jobs: uses: Swatinem/rust-cache@v2 - name: Fail on warnings + working-directory: ./rtic run: sed -i 's,//deny_warnings_placeholder_for_ci,#![deny(warnings)],' src/lib.rs macros/src/lib.rs - name: cargo check + working-directory: ./rtic run: cargo test --manifest-path macros/Cargo.toml # Run test suite @@ -219,9 +234,11 @@ jobs: uses: Swatinem/rust-cache@v2 - name: Fail on warnings + working-directory: ./rtic run: sed -i 's,//deny_warnings_placeholder_for_ci,#![deny(warnings)],' src/lib.rs macros/src/lib.rs - name: Run cargo test + working-directory: ./rtic run: cargo test --test tests # # Build documentation, check links diff --git a/.github/workflows/changelog.yml b/.github/workflows/changelog.yml index 74b821d..6e23a7a 100644 --- a/.github/workflows/changelog.yml +++ b/.github/workflows/changelog.yml @@ -18,10 +18,28 @@ jobs: - name: Checkout sources uses: actions/checkout@v3 - - name: Check that changelog updated + - name: Check that changelog updated (rtic) uses: dangoslen/changelog-enforcer@v3 with: - changeLogPath: CHANGELOG.md + changeLogPath: ./rtic/CHANGELOG.md + skipLabels: 'needs-changelog, skip-changelog' + missingUpdateErrorMessage: 'Please add a changelog entry in the CHANGELOG.md file.' + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Check that changelog updated (rtic-timer) + uses: dangoslen/changelog-enforcer@v3 + with: + changeLogPath: ./rtic-timer/CHANGELOG.md + skipLabels: 'needs-changelog, skip-changelog' + missingUpdateErrorMessage: 'Please add a changelog entry in the CHANGELOG.md file.' + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Check that changelog updated (rtic-monotonics) + uses: dangoslen/changelog-enforcer@v3 + with: + changeLogPath: ./rtic-monotonics/CHANGELOG.md skipLabels: 'needs-changelog, skip-changelog' missingUpdateErrorMessage: 'Please add a changelog entry in the CHANGELOG.md file.' env: -- cgit v1.2.3 From 2af2cbf637fdc9f9b8d533ad0cc00b928a209659 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Tj=C3=A4der?= Date: Fri, 27 Jan 2023 12:09:39 +0100 Subject: Experiment with changelog enforcer per path --- .github/workflows/changelog.yml | 70 ++++++++++++++++++++++++++--------------- 1 file changed, 45 insertions(+), 25 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/changelog.yml b/.github/workflows/changelog.yml index 6e23a7a..5616180 100644 --- a/.github/workflows/changelog.yml +++ b/.github/workflows/changelog.yml @@ -18,29 +18,49 @@ jobs: - name: Checkout sources uses: actions/checkout@v3 - - name: Check that changelog updated (rtic) - uses: dangoslen/changelog-enforcer@v3 + - name: Check which component is modified + uses: dorny/paths-filter@v2 + id: changes with: - changeLogPath: ./rtic/CHANGELOG.md - skipLabels: 'needs-changelog, skip-changelog' - missingUpdateErrorMessage: 'Please add a changelog entry in the CHANGELOG.md file.' - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - - name: Check that changelog updated (rtic-timer) - uses: dangoslen/changelog-enforcer@v3 - with: - changeLogPath: ./rtic-timer/CHANGELOG.md - skipLabels: 'needs-changelog, skip-changelog' - missingUpdateErrorMessage: 'Please add a changelog entry in the CHANGELOG.md file.' - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - - name: Check that changelog updated (rtic-monotonics) - uses: dangoslen/changelog-enforcer@v3 - with: - changeLogPath: ./rtic-monotonics/CHANGELOG.md - skipLabels: 'needs-changelog, skip-changelog' - missingUpdateErrorMessage: 'Please add a changelog entry in the CHANGELOG.md file.' - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file + filters: | + rtic: + - 'rtic/**' + rtic-timer: + - 'rtic-timer/**' + rtic-monotonics: + - 'rtic-monotonics/**' + + # run only if some file in matching folder was changed + - if: steps.changes.outputs.rtic == 'true' + steps: + + - name: Check that changelog updated (rtic) + uses: dangoslen/changelog-enforcer@v3 + with: + changeLogPath: ./rtic/CHANGELOG.md + skipLabels: 'needs-changelog, skip-changelog' + missingUpdateErrorMessage: 'Please add a changelog entry in the rtic/CHANGELOG.md file.' + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - if: steps.changes.outputs.rtic-timer == 'true' + steps: + - name: Check that changelog updated (rtic-timer) + uses: dangoslen/changelog-enforcer@v3 + with: + changeLogPath: ./rtic-timer/CHANGELOG.md + skipLabels: 'needs-changelog, skip-changelog' + missingUpdateErrorMessage: 'Please add a changelog entry in the rtic-timer/CHANGELOG.md file.' + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - if: steps.changes.outputs.rtic-monotonics == 'true' + steps: + - name: Check that changelog updated (rtic-monotonics) + uses: dangoslen/changelog-enforcer@v3 + with: + changeLogPath: ./rtic-monotonics/CHANGELOG.md + skipLabels: 'needs-changelog, skip-changelog' + missingUpdateErrorMessage: 'Please add a changelog entry in the rtic-monotonics/CHANGELOG.md file.' + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file -- cgit v1.2.3 From 67b16594bfc35ad6fd5ed170c61384b7bdcee406 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Tj=C3=A4der?= Date: Fri, 27 Jan 2023 12:28:32 +0100 Subject: CI: Changelog fix syntax --- .github/workflows/changelog.yml | 63 +++++++++++++++++++---------------------- 1 file changed, 29 insertions(+), 34 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/changelog.yml b/.github/workflows/changelog.yml index 5616180..eb71572 100644 --- a/.github/workflows/changelog.yml +++ b/.github/workflows/changelog.yml @@ -30,37 +30,32 @@ jobs: rtic-monotonics: - 'rtic-monotonics/**' - # run only if some file in matching folder was changed - - if: steps.changes.outputs.rtic == 'true' - steps: - - - name: Check that changelog updated (rtic) - uses: dangoslen/changelog-enforcer@v3 - with: - changeLogPath: ./rtic/CHANGELOG.md - skipLabels: 'needs-changelog, skip-changelog' - missingUpdateErrorMessage: 'Please add a changelog entry in the rtic/CHANGELOG.md file.' - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - - if: steps.changes.outputs.rtic-timer == 'true' - steps: - - name: Check that changelog updated (rtic-timer) - uses: dangoslen/changelog-enforcer@v3 - with: - changeLogPath: ./rtic-timer/CHANGELOG.md - skipLabels: 'needs-changelog, skip-changelog' - missingUpdateErrorMessage: 'Please add a changelog entry in the rtic-timer/CHANGELOG.md file.' - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - - if: steps.changes.outputs.rtic-monotonics == 'true' - steps: - - name: Check that changelog updated (rtic-monotonics) - uses: dangoslen/changelog-enforcer@v3 - with: - changeLogPath: ./rtic-monotonics/CHANGELOG.md - skipLabels: 'needs-changelog, skip-changelog' - missingUpdateErrorMessage: 'Please add a changelog entry in the rtic-monotonics/CHANGELOG.md file.' - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file + - name: Check that changelog updated (rtic) + if: steps.changes.outputs.rtic == 'true' + uses: dangoslen/changelog-enforcer@v3 + with: + changeLogPath: ./rtic/CHANGELOG.md + skipLabels: 'needs-changelog, skip-changelog' + missingUpdateErrorMessage: 'Please add a changelog entry in the rtic/CHANGELOG.md file.' + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Check that changelog updated (rtic-timer) + if: steps.changes.outputs.rtic-timer == 'true' + uses: dangoslen/changelog-enforcer@v3 + with: + changeLogPath: ./rtic-timer/CHANGELOG.md + skipLabels: 'needs-changelog, skip-changelog' + missingUpdateErrorMessage: 'Please add a changelog entry in the rtic-timer/CHANGELOG.md file.' + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Check that changelog updated (rtic-monotonics) + if: steps.changes.outputs.rtic-monotonics == 'true' + uses: dangoslen/changelog-enforcer@v3 + with: + changeLogPath: ./rtic-monotonics/CHANGELOG.md + skipLabels: 'needs-changelog, skip-changelog' + missingUpdateErrorMessage: 'Please add a changelog entry in the rtic-monotonics/CHANGELOG.md file.' + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file -- cgit v1.2.3 From 9d3c3a89aa22ba4287e1f989222a8a31b83f97fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Tj=C3=A4der?= Date: Fri, 27 Jan 2023 12:53:08 +0100 Subject: CI: Changelog: s/timer/time/ --- .github/workflows/changelog.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/changelog.yml b/.github/workflows/changelog.yml index eb71572..5a3df0a 100644 --- a/.github/workflows/changelog.yml +++ b/.github/workflows/changelog.yml @@ -25,8 +25,8 @@ jobs: filters: | rtic: - 'rtic/**' - rtic-timer: - - 'rtic-timer/**' + rtic-time: + - 'rtic-time/**' rtic-monotonics: - 'rtic-monotonics/**' @@ -40,13 +40,13 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - name: Check that changelog updated (rtic-timer) - if: steps.changes.outputs.rtic-timer == 'true' + - name: Check that changelog updated (rtic-time) + if: steps.changes.outputs.rtic-time == 'true' uses: dangoslen/changelog-enforcer@v3 with: - changeLogPath: ./rtic-timer/CHANGELOG.md + changeLogPath: ./rtic-time/CHANGELOG.md skipLabels: 'needs-changelog, skip-changelog' - missingUpdateErrorMessage: 'Please add a changelog entry in the rtic-timer/CHANGELOG.md file.' + missingUpdateErrorMessage: 'Please add a changelog entry in the rtic-time/CHANGELOG.md file.' env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} -- cgit v1.2.3 From f62d0d17b2a1fb05635fc7468a80f9151b514d6f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Tj=C3=A4der?= Date: Fri, 27 Jan 2023 12:55:26 +0100 Subject: CI: Clippy for time, monotonics, channel --- .github/workflows/build.yml | 69 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 69 insertions(+) (limited to '.github/workflows') diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 1493c3f..6c51d89 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -89,6 +89,72 @@ jobs: working-directory: ./rtic run: cargo clippy + clippytime: + name: Cargo clippy rtic-time + runs-on: ubuntu-22.04 + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Fail on warnings + working-directory: ./rtic-time + run: sed -i 's,//deny_warnings_placeholder_for_ci,#![deny(warnings)],' src/lib.rs + + - name: Add Rust component clippy + working-directory: ./rtic-time + run: rustup component add clippy + + - name: Cache Dependencies + uses: Swatinem/rust-cache@v2 + + - name: cargo clippy + working-directory: ./rtic-time + run: cargo clippy + + clippymonotonics: + name: Cargo clippy rtic-monotonics + runs-on: ubuntu-22.04 + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Fail on warnings + working-directory: ./rtic-monotonics + run: sed -i 's,//deny_warnings_placeholder_for_ci,#![deny(warnings)],' src/lib.rs + + - name: Add Rust component clippy + working-directory: ./rtic-monotonics + run: rustup component add clippy + + - name: Cache Dependencies + uses: Swatinem/rust-cache@v2 + + - name: cargo clippy + working-directory: ./rtic-monotonics + run: cargo clippy + + clippychannel: + name: Cargo clippy rtic-channel + runs-on: ubuntu-22.04 + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Fail on warnings + working-directory: ./rtic-channel + run: sed -i 's,//deny_warnings_placeholder_for_ci,#![deny(warnings)],' src/lib.rs + + - name: Add Rust component clippy + working-directory: ./rtic-channel + run: rustup component add clippy + + - name: Cache Dependencies + uses: Swatinem/rust-cache@v2 + + - name: cargo clippy + working-directory: ./rtic-channel + run: cargo clippy + # Verify all examples, checks checkexamples: name: checkexamples @@ -523,6 +589,9 @@ jobs: - style - check - clippy + - clippytime + - clippymonotonics + - clippychannel - checkexamples - testexamples - checkmacros -- cgit v1.2.3 From ff12a02d020965956ae8f9bda75ef243b3d1dd3a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Tj=C3=A4der?= Date: Sat, 28 Jan 2023 11:28:59 +0100 Subject: CI: Add rtic-channel to Changelog, remove defunct changelog --- .github/workflows/changelog.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to '.github/workflows') diff --git a/.github/workflows/changelog.yml b/.github/workflows/changelog.yml index 5a3df0a..0eb4cf6 100644 --- a/.github/workflows/changelog.yml +++ b/.github/workflows/changelog.yml @@ -25,6 +25,8 @@ jobs: filters: | rtic: - 'rtic/**' + rtic-channel: + - 'rtic-channel/**' rtic-time: - 'rtic-time/**' rtic-monotonics: @@ -40,6 +42,16 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Check that changelog updated (rtic-channel) + if: steps.changes.outputs.rtic-channel == 'true' + uses: dangoslen/changelog-enforcer@v3 + with: + changeLogPath: ./rtic-channel/CHANGELOG.md + skipLabels: 'needs-changelog, skip-changelog' + missingUpdateErrorMessage: 'Please add a changelog entry in the rtic-channel/CHANGELOG.md file.' + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Check that changelog updated (rtic-time) if: steps.changes.outputs.rtic-time == 'true' uses: dangoslen/changelog-enforcer@v3 -- cgit v1.2.3 From 07c11b071d048ef9f31e76584484719587e3ed71 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Tj=C3=A4der?= Date: Sat, 28 Jan 2023 11:42:24 +0100 Subject: CI: Cargo fmt for channel, mono., time --- .github/workflows/build.yml | 48 ++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 47 insertions(+), 1 deletion(-) (limited to '.github/workflows') diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 6c51d89..a709fb9 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -15,7 +15,7 @@ env: jobs: # Run cargo fmt --check, includes macros/ style: - name: style + name: cargo fmt runs-on: ubuntu-22.04 steps: - name: Checkout @@ -29,6 +29,52 @@ jobs: working-directory: ./rtic run: cargo fmt --all -- --check + stylechannel: + name: cargo fmt rtic-channel + runs-on: ubuntu-22.04 + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Fail on warnings + working-directory: ./rtic-channel + run: sed -i 's,//deny_warnings_placeholder_for_ci,#![deny(warnings)],' src/lib.rs + + - name: cargo fmt --check + working-directory: ./rtic-channel + run: cargo fmt --all -- --check + + stylemonotonics: + name: cargo fmt rtic-monotonics + runs-on: ubuntu-22.04 + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Fail on warnings + working-directory: ./rtic-monotonics + run: sed -i 's,//deny_warnings_placeholder_for_ci,#![deny(warnings)],' src/lib.rs + + - name: cargo fmt --check + working-directory: ./rtic-monotonics + run: cargo fmt --all -- --check + + styletime: + name: cargo fmt rtic-time + runs-on: ubuntu-22.04 + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Fail on warnings + working-directory: ./rtic-time + run: sed -i 's,//deny_warnings_placeholder_for_ci,#![deny(warnings)],' src/lib.rs + + - name: cargo fmt --check + working-directory: ./rtic-time + run: cargo fmt --all -- --check + + # Compilation check check: name: check -- cgit v1.2.3 From 8cb05049bea710dce441a7221ed3a541e5f4f7b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Tj=C3=A4der?= Date: Sat, 28 Jan 2023 11:42:56 +0100 Subject: CI: Alphabetical sort of clippy jobs --- .github/workflows/build.yml | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a709fb9..9f7d221 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -135,28 +135,29 @@ jobs: working-directory: ./rtic run: cargo clippy - clippytime: - name: Cargo clippy rtic-time + clippychannel: + name: Cargo clippy rtic-channel runs-on: ubuntu-22.04 steps: - name: Checkout uses: actions/checkout@v3 - name: Fail on warnings - working-directory: ./rtic-time + working-directory: ./rtic-channel run: sed -i 's,//deny_warnings_placeholder_for_ci,#![deny(warnings)],' src/lib.rs - name: Add Rust component clippy - working-directory: ./rtic-time + working-directory: ./rtic-channel run: rustup component add clippy - name: Cache Dependencies uses: Swatinem/rust-cache@v2 - name: cargo clippy - working-directory: ./rtic-time + working-directory: ./rtic-channel run: cargo clippy + clippymonotonics: name: Cargo clippy rtic-monotonics runs-on: ubuntu-22.04 @@ -178,27 +179,27 @@ jobs: - name: cargo clippy working-directory: ./rtic-monotonics run: cargo clippy - - clippychannel: - name: Cargo clippy rtic-channel + + clippytime: + name: Cargo clippy rtic-time runs-on: ubuntu-22.04 steps: - name: Checkout uses: actions/checkout@v3 - name: Fail on warnings - working-directory: ./rtic-channel + working-directory: ./rtic-time run: sed -i 's,//deny_warnings_placeholder_for_ci,#![deny(warnings)],' src/lib.rs - name: Add Rust component clippy - working-directory: ./rtic-channel + working-directory: ./rtic-time run: rustup component add clippy - name: Cache Dependencies uses: Swatinem/rust-cache@v2 - name: cargo clippy - working-directory: ./rtic-channel + working-directory: ./rtic-time run: cargo clippy # Verify all examples, checks -- cgit v1.2.3 From 6021aa2df8cbcf74910ea4b19ad24036f529710f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Tj=C3=A4der?= Date: Sat, 28 Jan 2023 14:02:54 +0100 Subject: CI: Check and tests for all crates --- .github/workflows/build.yml | 176 +++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 172 insertions(+), 4 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 9f7d221..2e3f2b7 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -15,7 +15,7 @@ env: jobs: # Run cargo fmt --check, includes macros/ style: - name: cargo fmt + name: cargo fmt rtic runs-on: ubuntu-22.04 steps: - name: Checkout @@ -77,7 +77,7 @@ jobs: # Compilation check check: - name: check + name: check rtic runs-on: ubuntu-22.04 strategy: matrix: @@ -112,9 +112,120 @@ jobs: working-directory: ./rtic run: cargo check --target=${{ matrix.target }} + # Compilation check + checkchannel: + name: check rtic-channel + runs-on: ubuntu-22.04 + strategy: + matrix: + target: + - thumbv7m-none-eabi + - thumbv6m-none-eabi + - x86_64-unknown-linux-gnu + toolchain: + - nightly + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Install Rust ${{ matrix.toolchain }} + working-directory: ./rtic-channel + run: | + rustup set profile minimal + rustup override set ${{ matrix.toolchain }} + + - name: Configure Rust target (${{ matrix.target }}) + working-directory: ./rtic-channel + run: rustup target add ${{ matrix.target }} + + - name: Fail on warnings + working-directory: ./rtic-channel + run: sed -i 's,//deny_warnings_placeholder_for_ci,#![deny(warnings)],' src/lib.rs + + - name: Cache Dependencies + uses: Swatinem/rust-cache@v2 + + - name: cargo check + working-directory: ./rtic-channel + run: cargo check --target=${{ matrix.target }} + + # Compilation check + checkmonotonics: + name: check rtic-monotonics + runs-on: ubuntu-22.04 + strategy: + matrix: + target: + - thumbv7m-none-eabi + - thumbv6m-none-eabi + - x86_64-unknown-linux-gnu + toolchain: + - nightly + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Install Rust ${{ matrix.toolchain }} + working-directory: ./rtic-monotonics + run: | + rustup set profile minimal + rustup override set ${{ matrix.toolchain }} + + - name: Configure Rust target (${{ matrix.target }}) + working-directory: ./rtic-monotonics + run: rustup target add ${{ matrix.target }} + + - name: Fail on warnings + working-directory: ./rtic-monotonics + run: sed -i 's,//deny_warnings_placeholder_for_ci,#![deny(warnings)],' src/lib.rs + + - name: Cache Dependencies + uses: Swatinem/rust-cache@v2 + + - name: cargo check + working-directory: ./rtic-monotonics + run: cargo check --target=${{ matrix.target }} + + # Compilation check + checktime: + name: check rtic-time + runs-on: ubuntu-22.04 + strategy: + matrix: + target: + - thumbv7m-none-eabi + - thumbv6m-none-eabi + - x86_64-unknown-linux-gnu + toolchain: + - nightly + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Install Rust ${{ matrix.toolchain }} + working-directory: ./rtic-time + run: | + rustup set profile minimal + rustup override set ${{ matrix.toolchain }} + + - name: Configure Rust target (${{ matrix.target }}) + working-directory: ./rtic-time + run: rustup target add ${{ matrix.target }} + + - name: Fail on warnings + working-directory: ./rtic-time + run: sed -i 's,//deny_warnings_placeholder_for_ci,#![deny(warnings)],' src/lib.rs + + - name: Cache Dependencies + uses: Swatinem/rust-cache@v2 + + - name: cargo check + working-directory: ./rtic-time + run: cargo check --target=${{ matrix.target }} + # Clippy clippy: - name: Cargo clippy + name: Cargo clippy rtic runs-on: ubuntu-22.04 steps: - name: Checkout @@ -337,7 +448,7 @@ jobs: # Run test suite tests: - name: tests + name: tests rtic runs-on: ubuntu-22.04 steps: - name: Checkout @@ -354,6 +465,63 @@ jobs: working-directory: ./rtic run: cargo test --test tests + # Run test suite + testschannel: + name: tests rtic-channel + runs-on: ubuntu-22.04 + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Cache Dependencies + uses: Swatinem/rust-cache@v2 + + - name: Fail on warnings + working-directory: ./rtic-channel + run: sed -i 's,//deny_warnings_placeholder_for_ci,#![deny(warnings)],' src/lib.rs + + - name: Run cargo test + working-directory: ./rtic-channel + run: cargo test --test tests + + # Run test suite + testsmonotonics: + name: tests rtic-monotonics + runs-on: ubuntu-22.04 + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Cache Dependencies + uses: Swatinem/rust-cache@v2 + + - name: Fail on warnings + working-directory: ./rtic-monotonics + run: sed -i 's,//deny_warnings_placeholder_for_ci,#![deny(warnings)],' src/lib.rs + + - name: Run cargo test + working-directory: ./rtic-monotonics + run: cargo test --test tests + + # Run test suite + teststime: + name: tests rtic-time + runs-on: ubuntu-22.04 + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Cache Dependencies + uses: Swatinem/rust-cache@v2 + + - name: Fail on warnings + working-directory: ./rtic-time + run: sed -i 's,//deny_warnings_placeholder_for_ci,#![deny(warnings)],' src/lib.rs + + - name: Run cargo test + working-directory: ./rtic-time + run: cargo test --test tests + # # Build documentation, check links # docs: # name: docs -- cgit v1.2.3 From 48ac310036bb0053d36d9cfce191351028808651 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Tj=C3=A4der?= Date: Sat, 28 Jan 2023 14:12:32 +0100 Subject: CI: Check/build the docs Still no publish or further steps --- .github/workflows/build.yml | 184 ++++++++++++++++++++++---------------------- 1 file changed, 94 insertions(+), 90 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 2e3f2b7..004a5ec 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -522,96 +522,100 @@ jobs: working-directory: ./rtic-time run: cargo test --test tests -# # Build documentation, check links -# docs: -# name: docs -# runs-on: ubuntu-22.04 -# steps: -# - name: Checkout -# uses: actions/checkout@v3 -# -# - name: Cache pip installed linkchecker -# uses: actions/cache@v3 -# with: -# path: ~/.cache/pip -# key: ${{ runner.os }}-pip -# restore-keys: | -# ${{ runner.os }}-pip- -# -# - name: Set up Python 3.x -# uses: actions/setup-python@v4 -# with: -# # Semantic version range syntax or exact version of a Python version -# python-version: '3.x' -# -# # You can test your matrix by printing the current Python version -# - name: Display Python version -# run: python -c "import sys; print(sys.version)" -# -# - name: Install dependencies -# run: pip install git+https://github.com/linkchecker/linkchecker.git -# -# - name: Remove cargo-config -# run: rm -f .cargo/config -# -# - name: Fail on warnings -# run: sed -i 's,//deny_warnings_placeholder_for_ci,#![deny(warnings)],' src/lib.rs macros/src/lib.rs -# -# - name: Build docs -# run: cargo doc -# -# - name: Check links -# run: | -# td=$(mktemp -d) -# cp -r target/doc $td/api -# linkchecker $td/api/rtic/ -# linkchecker $td/api/cortex_m_rtic_macros/ -# -# # Build the books -# mdbook: -# name: mdbook -# runs-on: ubuntu-22.04 -# steps: -# - name: Checkout -# uses: actions/checkout@v3 -# - name: Set up Python 3.x -# uses: actions/setup-python@v4 -# with: -# # Semantic version range syntax or exact version of a Python version -# python-version: '3.x' -# -# # You can test your matrix by printing the current Python version -# - name: Display Python version -# run: python -c "import sys; print(sys.version)" -# -# - name: Install dependencies -# run: pip install git+https://github.com/linkchecker/linkchecker.git -# -# - name: mdBook Action -# uses: peaceiris/actions-mdbook@v1 -# with: -# mdbook-version: 'latest' -# -# - name: Build book in English -# shell: 'script --return --quiet --command "bash {0}"' -# run: cd book/en && if mdbook build |& tee /dev/tty | grep "\[ERROR\]"; then exit 1; else exit 0; fi -# -# - name: Build book in Russian -# shell: 'script --return --quiet --command "bash {0}"' -# run: cd book/ru && if mdbook build |& tee /dev/tty | grep "\[ERROR\]"; then echo "Russian book needs updating!"; else exit 0; fi -# -# - name: Check links -# run: | -# td=$(mktemp -d) -# mkdir $td/book -# cp -r book/en/book $td/book/en -# cp -r book/ru/book $td/book/ru -# cp LICENSE-* $td/book/en -# cp LICENSE-* $td/book/ru -# -# linkchecker $td/book/en/ -# linkchecker $td/book/ru/ -# + # Build documentation, check links + docs: + name: docs + runs-on: ubuntu-22.04 + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Cache pip installed linkchecker + uses: actions/cache@v3 + with: + path: ~/.cache/pip + key: ${{ runner.os }}-pip + restore-keys: | + ${{ runner.os }}-pip- + + - name: Set up Python 3.x + uses: actions/setup-python@v4 + with: + # Semantic version range syntax or exact version of a Python version + python-version: '3.x' + + # You can test your matrix by printing the current Python version + - name: Display Python version + run: python -c "import sys; print(sys.version)" + + - name: Install dependencies + run: pip install git+https://github.com/linkchecker/linkchecker.git + + - name: Remove cargo-config + working-directory: ./rtic + run: rm -f .cargo/config + + - name: Fail on warnings + working-directory: ./rtic + run: sed -i 's,//deny_warnings_placeholder_for_ci,#![deny(warnings)],' src/lib.rs macros/src/lib.rs + + - name: Build docs + working-directory: ./rtic + run: cargo doc + + - name: Check links + working-directory: ./rtic + run: | + td=$(mktemp -d) + cp -r target/doc $td/api + linkchecker $td/api/rtic/ + linkchecker $td/api/rtic_macros/ + + # Build the books + mdbook: + name: mdbook + runs-on: ubuntu-22.04 + steps: + - name: Checkout + uses: actions/checkout@v3 + - name: Set up Python 3.x + uses: actions/setup-python@v4 + with: + # Semantic version range syntax or exact version of a Python version + python-version: '3.x' + + # You can test your matrix by printing the current Python version + - name: Display Python version + run: python -c "import sys; print(sys.version)" + + - name: Install dependencies + run: pip install git+https://github.com/linkchecker/linkchecker.git + + - name: mdBook Action + uses: peaceiris/actions-mdbook@v1 + with: + mdbook-version: 'latest' + + - name: Build book in English + shell: 'script --return --quiet --command "bash {0}"' + run: cd book/en && if mdbook build |& tee /dev/tty | grep "\[ERROR\]"; then exit 1; else exit 0; fi + + - name: Build book in Russian + shell: 'script --return --quiet --command "bash {0}"' + run: cd book/ru && if mdbook build |& tee /dev/tty | grep "\[ERROR\]"; then echo "Russian book needs updating!"; else exit 0; fi + + - name: Check links + run: | + td=$(mktemp -d) + mkdir $td/book + cp -r book/en/book $td/book/en + cp -r book/ru/book $td/book/ru + cp LICENSE-* $td/book/en + cp LICENSE-* $td/book/ru + + linkchecker $td/book/en/ + linkchecker $td/book/ru/ + # # Update stable branch # # # # This needs to run before book is built -- cgit v1.2.3 From bef6c359a0802cb93c7bf0963d0fca7db540f64b Mon Sep 17 00:00:00 2001 From: Emil Fresk Date: Sat, 28 Jan 2023 20:54:34 +0100 Subject: Fix CI for rtic-channel --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '.github/workflows') diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 004a5ec..650fc53 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -482,7 +482,7 @@ jobs: - name: Run cargo test working-directory: ./rtic-channel - run: cargo test --test tests + run: cargo test --features testing # Run test suite testsmonotonics: -- cgit v1.2.3 From f2e0cd342ee11ab1a2e480b67a1a91d3b277932b Mon Sep 17 00:00:00 2001 From: Emil Fresk Date: Mon, 30 Jan 2023 21:24:12 +0100 Subject: Added testing to rtic-arbiter --- .github/workflows/build.yml | 93 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 93 insertions(+) (limited to '.github/workflows') diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 650fc53..3ef7d52 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -29,6 +29,21 @@ jobs: working-directory: ./rtic run: cargo fmt --all -- --check + stylearbiter: + name: cargo fmt rtic-arbiter + runs-on: ubuntu-22.04 + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Fail on warnings + working-directory: ./rtic-arbiter + run: sed -i 's,//deny_warnings_placeholder_for_ci,#![deny(warnings)],' src/lib.rs + + - name: cargo fmt --check + working-directory: ./rtic-arbiter + run: cargo fmt --all -- --check + stylechannel: name: cargo fmt rtic-channel runs-on: ubuntu-22.04 @@ -112,6 +127,43 @@ jobs: working-directory: ./rtic run: cargo check --target=${{ matrix.target }} + # Compilation check + checkarbiter: + name: check rtic-arbiter + runs-on: ubuntu-22.04 + strategy: + matrix: + target: + - thumbv7m-none-eabi + - thumbv6m-none-eabi + - x86_64-unknown-linux-gnu + toolchain: + - nightly + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Install Rust ${{ matrix.toolchain }} + working-directory: ./rtic-arbiter + run: | + rustup set profile minimal + rustup override set ${{ matrix.toolchain }} + + - name: Configure Rust target (${{ matrix.target }}) + working-directory: ./rtic-arbiter + run: rustup target add ${{ matrix.target }} + + - name: Fail on warnings + working-directory: ./rtic-arbiter + run: sed -i 's,//deny_warnings_placeholder_for_ci,#![deny(warnings)],' src/lib.rs + + - name: Cache Dependencies + uses: Swatinem/rust-cache@v2 + + - name: cargo check + working-directory: ./rtic-arbiter + run: cargo check --target=${{ matrix.target }} + # Compilation check checkchannel: name: check rtic-channel @@ -246,6 +298,28 @@ jobs: working-directory: ./rtic run: cargo clippy + clippyarbiter: + name: Cargo clippy rtic-arbiter + runs-on: ubuntu-22.04 + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Fail on warnings + working-directory: ./rtic-arbiter + run: sed -i 's,//deny_warnings_placeholder_for_ci,#![deny(warnings)],' src/lib.rs + + - name: Add Rust component clippy + working-directory: ./rtic-arbiter + run: rustup component add clippy + + - name: Cache Dependencies + uses: Swatinem/rust-cache@v2 + + - name: cargo clippy + working-directory: ./rtic-arbiter + run: cargo clippy + clippychannel: name: Cargo clippy rtic-channel runs-on: ubuntu-22.04 @@ -465,6 +539,25 @@ jobs: working-directory: ./rtic run: cargo test --test tests + # Run test suite + testsarbiter: + name: tests rtic-arbiter + runs-on: ubuntu-22.04 + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Cache Dependencies + uses: Swatinem/rust-cache@v2 + + - name: Fail on warnings + working-directory: ./rtic-arbiter + run: sed -i 's,//deny_warnings_placeholder_for_ci,#![deny(warnings)],' src/lib.rs + + - name: Run cargo test + working-directory: ./rtic-arbiter + run: cargo test --features testing + # Run test suite testschannel: name: tests rtic-channel -- cgit v1.2.3 From 274de31a78a47b4391987e9951e6d7cef56fb0d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Tj=C3=A4der?= Date: Mon, 30 Jan 2023 22:15:43 +0100 Subject: CI: Add mdbook-mermaid --- .github/workflows/build.yml | 6 ++++++ 1 file changed, 6 insertions(+) (limited to '.github/workflows') diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3ef7d52..7df817c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -684,6 +684,9 @@ jobs: - name: Install dependencies run: pip install git+https://github.com/linkchecker/linkchecker.git + - name: Install mdbook-mermaid + run: cargo install mdbook-mermaid + - name: mdBook Action uses: peaceiris/actions-mdbook@v1 with: @@ -774,6 +777,9 @@ jobs: # - name: Display Python version # run: python -c "import sys; print(sys.version)" # +# - name: Install mdbook-mermaid +# run: cargo install mdbook-mermaid +# # - name: mdBook Action # uses: peaceiris/actions-mdbook@v1 # with: -- cgit v1.2.3 From fe4aeaf46c8a311b0741f773fad19a81136f75e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Tj=C3=A4der?= Date: Tue, 31 Jan 2023 23:11:10 +0100 Subject: CI: Require jobs to pass CI, improve job names --- .github/workflows/build.yml | 51 ++++++++++++++++++++++++++++----------------- 1 file changed, 32 insertions(+), 19 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 7df817c..550b07e 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -14,7 +14,7 @@ env: jobs: # Run cargo fmt --check, includes macros/ - style: + stylertic: name: cargo fmt rtic runs-on: ubuntu-22.04 steps: @@ -91,7 +91,7 @@ jobs: # Compilation check - check: + checkrtic: name: check rtic runs-on: ubuntu-22.04 strategy: @@ -276,7 +276,7 @@ jobs: run: cargo check --target=${{ matrix.target }} # Clippy - clippy: + clippyrtic: name: Cargo clippy rtic runs-on: ubuntu-22.04 steps: @@ -389,7 +389,7 @@ jobs: # Verify all examples, checks checkexamples: - name: checkexamples + name: Cargo check --examples runs-on: ubuntu-22.04 strategy: matrix: @@ -424,7 +424,7 @@ jobs: # Verify the example output with run-pass tests testexamples: - name: testexamples + name: Cargo xtask, test examples in QEMU runs-on: ubuntu-22.04 strategy: matrix: @@ -470,7 +470,7 @@ jobs: # Check the correctness of macros/ crate checkmacros: - name: checkmacros + name: Cargo check rtic-macros runs-on: ubuntu-22.04 strategy: matrix: @@ -503,7 +503,7 @@ jobs: # Run the macros test-suite testmacros: - name: testmacros + name: Cargo test rtic-macros runs-on: ubuntu-22.04 steps: - name: Checkout @@ -521,7 +521,7 @@ jobs: run: cargo test --manifest-path macros/Cargo.toml # Run test suite - tests: + testsrtic: name: tests rtic runs-on: ubuntu-22.04 steps: @@ -617,7 +617,7 @@ jobs: # Build documentation, check links docs: - name: docs + name: Cargo docs, check links runs-on: ubuntu-22.04 steps: - name: Checkout @@ -666,7 +666,7 @@ jobs: # Build the books mdbook: - name: mdbook + name: mdbook, check links runs-on: ubuntu-22.04 steps: - name: Checkout @@ -903,20 +903,33 @@ jobs: ci-success: name: ci if: github.event_name == 'push' && success() - needs: - - style - - check - - clippy - - clippytime - - clippymonotonics + needs: + - stylertic + - stylearbiter + - stylechannel + - stylemonotonics + - styletime + - checkrtic + - checkarbiter + - checkchannel + - checkmonotonics + - checktime + - clippyrtic + - clippyarbiter - clippychannel + - clippymonotonics + - clippytime - checkexamples - testexamples - checkmacros - testmacros - - tests -# - docs -# - mdbook + - testsrtic + - testsarbiter + - testschannel + - testsmonotonics + - teststime + - docs + - mdbook runs-on: ubuntu-22.04 steps: - name: Mark the job as a success -- cgit v1.2.3 From 4e639e1f68ea392181aafb754118ec61dfe7ffbd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Tj=C3=A4der?= Date: Wed, 1 Feb 2023 22:52:03 +0100 Subject: CI: Fix CI, missed space --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '.github/workflows') diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 550b07e..baa1996 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -903,7 +903,7 @@ jobs: ci-success: name: ci if: github.event_name == 'push' && success() - needs: + needs: - stylertic - stylearbiter - stylechannel -- cgit v1.2.3 From 0f7e0e97360d448c3021afc254e47b7d52c6c2e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Tj=C3=A4der?= Date: Sun, 5 Feb 2023 13:23:09 +0100 Subject: CI: Update to match separate rtic-macros --- .github/workflows/build.yml | 149 ++++++++++++++++++++++++++++---------------- 1 file changed, 95 insertions(+), 54 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index baa1996..3869851 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -13,7 +13,7 @@ env: CARGO_TERM_COLOR: always jobs: - # Run cargo fmt --check, includes macros/ + # Run cargo fmt --check stylertic: name: cargo fmt rtic runs-on: ubuntu-22.04 @@ -23,12 +23,27 @@ jobs: - name: Fail on warnings working-directory: ./rtic - run: sed -i 's,//deny_warnings_placeholder_for_ci,#![deny(warnings)],' src/lib.rs macros/src/lib.rs + run: sed -i 's,//deny_warnings_placeholder_for_ci,#![deny(warnings)],' src/lib.rs - name: cargo fmt --check working-directory: ./rtic run: cargo fmt --all -- --check + stylerticmacros: + name: cargo fmt rtic-macros + runs-on: ubuntu-22.04 + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Fail on warnings + working-directory: ./rtic-macros + run: sed -i 's,//deny_warnings_placeholder_for_ci,#![deny(warnings)],' src/lib.rs + + - name: cargo fmt --check + working-directory: ./rtic-macros + run: cargo fmt --all -- --check + stylearbiter: name: cargo fmt rtic-arbiter runs-on: ubuntu-22.04 @@ -118,7 +133,7 @@ jobs: - name: Fail on warnings working-directory: ./rtic - run: sed -i 's,//deny_warnings_placeholder_for_ci,#![deny(warnings)],' src/lib.rs macros/src/lib.rs + run: sed -i 's,//deny_warnings_placeholder_for_ci,#![deny(warnings)],' src/lib.rs - name: Cache Dependencies uses: Swatinem/rust-cache@v2 @@ -127,6 +142,41 @@ jobs: working-directory: ./rtic run: cargo check --target=${{ matrix.target }} + # Compilation check + checkrticmacros: + name: check rtic-macros + runs-on: ubuntu-22.04 + strategy: + matrix: + target: + - x86_64-unknown-linux-gnu + toolchain: + - nightly + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Install Rust ${{ matrix.toolchain }} + working-directory: ./rtic-macros + run: | + rustup set profile minimal + rustup override set ${{ matrix.toolchain }} + + - name: Configure Rust target (${{ matrix.target }}) + working-directory: ./rtic-macros + run: rustup target add ${{ matrix.target }} + + - name: Fail on warnings + working-directory: ./rtic-macros + run: sed -i 's,//deny_warnings_placeholder_for_ci,#![deny(warnings)],' src/lib.rs + + - name: Cache Dependencies + uses: Swatinem/rust-cache@v2 + + - name: cargo check + working-directory: ./rtic-macros + run: cargo check --target=${{ matrix.target }} + # Compilation check checkarbiter: name: check rtic-arbiter @@ -285,7 +335,7 @@ jobs: - name: Fail on warnings working-directory: ./rtic - run: sed -i 's,//deny_warnings_placeholder_for_ci,#![deny(warnings)],' src/lib.rs macros/src/lib.rs + run: sed -i 's,//deny_warnings_placeholder_for_ci,#![deny(warnings)],' src/lib.rs - name: Add Rust component clippy working-directory: ./rtic @@ -298,6 +348,28 @@ jobs: working-directory: ./rtic run: cargo clippy + clippyrticmacros: + name: Cargo clippy rtic-macros + runs-on: ubuntu-22.04 + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Fail on warnings + working-directory: ./rtic-macros + run: sed -i 's,//deny_warnings_placeholder_for_ci,#![deny(warnings)],' src/lib.rs + + - name: Add Rust component clippy + working-directory: ./rtic-macros + run: rustup component add clippy + + - name: Cache Dependencies + uses: Swatinem/rust-cache@v2 + + - name: cargo clippy + working-directory: ./rtic-macros + run: cargo clippy + clippyarbiter: name: Cargo clippy rtic-arbiter runs-on: ubuntu-22.04 @@ -424,7 +496,7 @@ jobs: # Verify the example output with run-pass tests testexamples: - name: Cargo xtask, test examples in QEMU + name: test examples in QEMU runs-on: ubuntu-22.04 strategy: matrix: @@ -462,48 +534,34 @@ jobs: - name: Fail on warnings working-directory: ./rtic - run: sed -i 's,//deny_warnings_placeholder_for_ci,#![deny(warnings)],' src/lib.rs macros/src/lib.rs + run: sed -i 's,//deny_warnings_placeholder_for_ci,#![deny(warnings)],' src/lib.rs - name: Run-pass tests working-directory: ./rtic run: cargo xtask --target ${{ matrix.target }} - # Check the correctness of macros/ crate - checkmacros: - name: Cargo check rtic-macros + # Run test suite + testsrtic: + name: tests rtic runs-on: ubuntu-22.04 - strategy: - matrix: - target: - - x86_64-unknown-linux-gnu - toolchain: - - nightly steps: - name: Checkout uses: actions/checkout@v3 - - name: Install Rust ${{ matrix.toolchain }} - run: | - rustup set profile minimal - rustup override set ${{ matrix.toolchain }} - - - name: Configure Rust target (${{ matrix.target }}) - run: rustup target add ${{ matrix.target }} - - name: Cache Dependencies uses: Swatinem/rust-cache@v2 - name: Fail on warnings working-directory: ./rtic - run: sed -i 's,//deny_warnings_placeholder_for_ci,#![deny(warnings)],' src/lib.rs macros/src/lib.rs + run: sed -i 's,//deny_warnings_placeholder_for_ci,#![deny(warnings)],' src/lib.rs - - name: cargo check + - name: Run cargo test working-directory: ./rtic - run: cargo check --manifest-path macros/Cargo.toml --target=${{ matrix.target }} + run: cargo test --test tests # Run the macros test-suite - testmacros: - name: Cargo test rtic-macros + testsrticmacros: + name: tests rtic-macros runs-on: ubuntu-22.04 steps: - name: Checkout @@ -513,31 +571,12 @@ jobs: uses: Swatinem/rust-cache@v2 - name: Fail on warnings - working-directory: ./rtic - run: sed -i 's,//deny_warnings_placeholder_for_ci,#![deny(warnings)],' src/lib.rs macros/src/lib.rs + working-directory: ./rtic-macros + run: sed -i 's,//deny_warnings_placeholder_for_ci,#![deny(warnings)],' src/lib.rs - name: cargo check - working-directory: ./rtic - run: cargo test --manifest-path macros/Cargo.toml - - # Run test suite - testsrtic: - name: tests rtic - runs-on: ubuntu-22.04 - steps: - - name: Checkout - uses: actions/checkout@v3 - - - name: Cache Dependencies - uses: Swatinem/rust-cache@v2 - - - name: Fail on warnings - working-directory: ./rtic - run: sed -i 's,//deny_warnings_placeholder_for_ci,#![deny(warnings)],' src/lib.rs macros/src/lib.rs - - - name: Run cargo test - working-directory: ./rtic - run: cargo test --test tests + working-directory: ./rtic-macros + run: cargo test # Run test suite testsarbiter: @@ -650,7 +689,7 @@ jobs: - name: Fail on warnings working-directory: ./rtic - run: sed -i 's,//deny_warnings_placeholder_for_ci,#![deny(warnings)],' src/lib.rs macros/src/lib.rs + run: sed -i 's,//deny_warnings_placeholder_for_ci,#![deny(warnings)],' src/lib.rs - name: Build docs working-directory: ./rtic @@ -905,25 +944,27 @@ jobs: if: github.event_name == 'push' && success() needs: - stylertic + - stylerticmacros - stylearbiter - stylechannel - stylemonotonics - styletime - checkrtic + - checkrticmacros - checkarbiter - checkchannel - checkmonotonics - checktime - clippyrtic + - clippyrticmacros - clippyarbiter - clippychannel - clippymonotonics - clippytime - checkexamples - testexamples - - checkmacros - - testmacros - testsrtic + - testrticmacros - testsarbiter - testschannel - testsmonotonics -- cgit v1.2.3 From 0439867baf81b946159dcc49980b39f538ac2918 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Tj=C3=A4der?= Date: Mon, 6 Feb 2023 13:22:29 +0100 Subject: CI: Use xtask for running QEMU examples --- .github/workflows/build.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3869851..ecbd7fa 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -537,8 +537,7 @@ jobs: run: sed -i 's,//deny_warnings_placeholder_for_ci,#![deny(warnings)],' src/lib.rs - name: Run-pass tests - working-directory: ./rtic - run: cargo xtask --target ${{ matrix.target }} + run: cargo xtask --verbose --target ${{ matrix.target }} qemu # Run test suite testsrtic: -- cgit v1.2.3 From 79b53ce82d1185b4ec995c42ce9ac56fb81c5274 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Tj=C3=A4der?= Date: Mon, 6 Feb 2023 13:35:05 +0100 Subject: CI: Use xtask for all checks --- .github/workflows/build.yml | 208 +++----------------------------------------- 1 file changed, 12 insertions(+), 196 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ecbd7fa..f751b8c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -106,11 +106,19 @@ jobs: # Compilation check - checkrtic: + check: name: check rtic runs-on: ubuntu-22.04 strategy: matrix: + package: + - rtic + - rtic-arbiter + - rtic-channel + - rtic-common + - rtic-macros + - rtic-monotonics + - rtic-time target: - thumbv7m-none-eabi - thumbv6m-none-eabi @@ -122,208 +130,21 @@ jobs: uses: actions/checkout@v3 - name: Install Rust ${{ matrix.toolchain }} - working-directory: ./rtic - run: | - rustup set profile minimal - rustup override set ${{ matrix.toolchain }} - - - name: Configure Rust target (${{ matrix.target }}) - working-directory: ./rtic - run: rustup target add ${{ matrix.target }} - - - name: Fail on warnings - working-directory: ./rtic - run: sed -i 's,//deny_warnings_placeholder_for_ci,#![deny(warnings)],' src/lib.rs - - - name: Cache Dependencies - uses: Swatinem/rust-cache@v2 - - - name: cargo check - working-directory: ./rtic - run: cargo check --target=${{ matrix.target }} - - # Compilation check - checkrticmacros: - name: check rtic-macros - runs-on: ubuntu-22.04 - strategy: - matrix: - target: - - x86_64-unknown-linux-gnu - toolchain: - - nightly - steps: - - name: Checkout - uses: actions/checkout@v3 - - - name: Install Rust ${{ matrix.toolchain }} - working-directory: ./rtic-macros run: | rustup set profile minimal rustup override set ${{ matrix.toolchain }} - name: Configure Rust target (${{ matrix.target }}) - working-directory: ./rtic-macros run: rustup target add ${{ matrix.target }} - name: Fail on warnings - working-directory: ./rtic-macros - run: sed -i 's,//deny_warnings_placeholder_for_ci,#![deny(warnings)],' src/lib.rs + run: sed -i 's,//deny_warnings_placeholder_for_ci,#![deny(warnings)],' ${{ matrix.package }}/src/lib.rs - name: Cache Dependencies uses: Swatinem/rust-cache@v2 - name: cargo check - working-directory: ./rtic-macros - run: cargo check --target=${{ matrix.target }} - - # Compilation check - checkarbiter: - name: check rtic-arbiter - runs-on: ubuntu-22.04 - strategy: - matrix: - target: - - thumbv7m-none-eabi - - thumbv6m-none-eabi - - x86_64-unknown-linux-gnu - toolchain: - - nightly - steps: - - name: Checkout - uses: actions/checkout@v3 - - - name: Install Rust ${{ matrix.toolchain }} - working-directory: ./rtic-arbiter - run: | - rustup set profile minimal - rustup override set ${{ matrix.toolchain }} - - - name: Configure Rust target (${{ matrix.target }}) - working-directory: ./rtic-arbiter - run: rustup target add ${{ matrix.target }} - - - name: Fail on warnings - working-directory: ./rtic-arbiter - run: sed -i 's,//deny_warnings_placeholder_for_ci,#![deny(warnings)],' src/lib.rs - - - name: Cache Dependencies - uses: Swatinem/rust-cache@v2 - - - name: cargo check - working-directory: ./rtic-arbiter - run: cargo check --target=${{ matrix.target }} - - # Compilation check - checkchannel: - name: check rtic-channel - runs-on: ubuntu-22.04 - strategy: - matrix: - target: - - thumbv7m-none-eabi - - thumbv6m-none-eabi - - x86_64-unknown-linux-gnu - toolchain: - - nightly - steps: - - name: Checkout - uses: actions/checkout@v3 - - - name: Install Rust ${{ matrix.toolchain }} - working-directory: ./rtic-channel - run: | - rustup set profile minimal - rustup override set ${{ matrix.toolchain }} - - - name: Configure Rust target (${{ matrix.target }}) - working-directory: ./rtic-channel - run: rustup target add ${{ matrix.target }} - - - name: Fail on warnings - working-directory: ./rtic-channel - run: sed -i 's,//deny_warnings_placeholder_for_ci,#![deny(warnings)],' src/lib.rs - - - name: Cache Dependencies - uses: Swatinem/rust-cache@v2 - - - name: cargo check - working-directory: ./rtic-channel - run: cargo check --target=${{ matrix.target }} - - # Compilation check - checkmonotonics: - name: check rtic-monotonics - runs-on: ubuntu-22.04 - strategy: - matrix: - target: - - thumbv7m-none-eabi - - thumbv6m-none-eabi - - x86_64-unknown-linux-gnu - toolchain: - - nightly - steps: - - name: Checkout - uses: actions/checkout@v3 - - - name: Install Rust ${{ matrix.toolchain }} - working-directory: ./rtic-monotonics - run: | - rustup set profile minimal - rustup override set ${{ matrix.toolchain }} - - - name: Configure Rust target (${{ matrix.target }}) - working-directory: ./rtic-monotonics - run: rustup target add ${{ matrix.target }} - - - name: Fail on warnings - working-directory: ./rtic-monotonics - run: sed -i 's,//deny_warnings_placeholder_for_ci,#![deny(warnings)],' src/lib.rs - - - name: Cache Dependencies - uses: Swatinem/rust-cache@v2 - - - name: cargo check - working-directory: ./rtic-monotonics - run: cargo check --target=${{ matrix.target }} - - # Compilation check - checktime: - name: check rtic-time - runs-on: ubuntu-22.04 - strategy: - matrix: - target: - - thumbv7m-none-eabi - - thumbv6m-none-eabi - - x86_64-unknown-linux-gnu - toolchain: - - nightly - steps: - - name: Checkout - uses: actions/checkout@v3 - - - name: Install Rust ${{ matrix.toolchain }} - working-directory: ./rtic-time - run: | - rustup set profile minimal - rustup override set ${{ matrix.toolchain }} - - - name: Configure Rust target (${{ matrix.target }}) - working-directory: ./rtic-time - run: rustup target add ${{ matrix.target }} - - - name: Fail on warnings - working-directory: ./rtic-time - run: sed -i 's,//deny_warnings_placeholder_for_ci,#![deny(warnings)],' src/lib.rs - - - name: Cache Dependencies - uses: Swatinem/rust-cache@v2 - - - name: cargo check - working-directory: ./rtic-time - run: cargo check --target=${{ matrix.target }} + run: cargo xtask --verbose --target=${{ matrix.target }} check ${{ matrix.package }} # Clippy clippyrtic: @@ -948,12 +769,7 @@ jobs: - stylechannel - stylemonotonics - styletime - - checkrtic - - checkrticmacros - - checkarbiter - - checkchannel - - checkmonotonics - - checktime + - check - clippyrtic - clippyrticmacros - clippyarbiter -- cgit v1.2.3 From dc0ff017d697ed4e0577b7992d5e51bb864cc18d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Tj=C3=A4der?= Date: Mon, 6 Feb 2023 13:37:33 +0100 Subject: CI: Fix macros job name --- .github/workflows/build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f751b8c..5d2fd8a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -380,7 +380,7 @@ jobs: run: cargo test --test tests # Run the macros test-suite - testsrticmacros: + testsmacros: name: tests rtic-macros runs-on: ubuntu-22.04 steps: @@ -779,7 +779,7 @@ jobs: - checkexamples - testexamples - testsrtic - - testrticmacros + - testsmacros - testsarbiter - testschannel - testsmonotonics -- cgit v1.2.3 From 8661ca2f4ba29af5183fc20a573abe00d94d332e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Tj=C3=A4der?= Date: Mon, 6 Feb 2023 13:42:32 +0100 Subject: CI: Improve naming and styling --- .github/workflows/build.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 5d2fd8a..8ad1814 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -107,7 +107,7 @@ jobs: # Compilation check check: - name: check rtic + name: check runs-on: ubuntu-22.04 strategy: matrix: @@ -143,8 +143,7 @@ jobs: - name: Cache Dependencies uses: Swatinem/rust-cache@v2 - - name: cargo check - run: cargo xtask --verbose --target=${{ matrix.target }} check ${{ matrix.package }} + - run: cargo xtask --verbose --target=${{ matrix.target }} check ${{ matrix.package }} # Clippy clippyrtic: -- cgit v1.2.3 From 865382325813653c59384066e3e460e857d478f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Tj=C3=A4der?= Date: Mon, 6 Feb 2023 13:48:52 +0100 Subject: xtask: For now test on ARM --- .github/workflows/build.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to '.github/workflows') diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 8ad1814..df58bb6 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -122,7 +122,8 @@ jobs: target: - thumbv7m-none-eabi - thumbv6m-none-eabi - - x86_64-unknown-linux-gnu + - thumbv8m.base-none-eabi + - thumbv8m.main-none-eabi toolchain: - nightly steps: -- cgit v1.2.3 From 84f5bca9d36615607d39f32243a3d55209dd9de6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Tj=C3=A4der?= Date: Wed, 8 Feb 2023 19:25:14 +0100 Subject: CI: Let xtask running the different targets --- .github/workflows/build.yml | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index df58bb6..256385f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -119,11 +119,6 @@ jobs: - rtic-macros - rtic-monotonics - rtic-time - target: - - thumbv7m-none-eabi - - thumbv6m-none-eabi - - thumbv8m.base-none-eabi - - thumbv8m.main-none-eabi toolchain: - nightly steps: @@ -132,11 +127,14 @@ jobs: - name: Install Rust ${{ matrix.toolchain }} run: | - rustup set profile minimal rustup override set ${{ matrix.toolchain }} - - name: Configure Rust target (${{ matrix.target }}) - run: rustup target add ${{ matrix.target }} + - name: Configure Rust target (v6, v7, v8.b v8.m) + run: | + rustup target add thumbv7m-none-eabi + rustup target add thumbv6m-none-eabi + rustup target add thumbv8m.base-none-eabi + rustup target add thumbv8m.main-none-eabi - name: Fail on warnings run: sed -i 's,//deny_warnings_placeholder_for_ci,#![deny(warnings)],' ${{ matrix.package }}/src/lib.rs @@ -144,7 +142,7 @@ jobs: - name: Cache Dependencies uses: Swatinem/rust-cache@v2 - - run: cargo xtask --verbose --target=${{ matrix.target }} check ${{ matrix.package }} + - run: cargo xtask --verbose check ${{ matrix.package }} # Clippy clippyrtic: -- cgit v1.2.3 From bedc9b55eb0ddd51d24ce2cbdd8f3357e8fd460f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Tj=C3=A4der?= Date: Wed, 8 Feb 2023 19:44:46 +0100 Subject: CI: Cargo clippy done via xtask --- .github/workflows/build.yml | 148 ++++++++------------------------------------ 1 file changed, 25 insertions(+), 123 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 256385f..28f7349 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -143,140 +143,47 @@ jobs: uses: Swatinem/rust-cache@v2 - run: cargo xtask --verbose check ${{ matrix.package }} - # Clippy - clippyrtic: + clippy: name: Cargo clippy rtic runs-on: ubuntu-22.04 + strategy: + matrix: + package: + - rtic + - rtic-arbiter + - rtic-channel + - rtic-common + - rtic-macros + - rtic-monotonics + - rtic-time + toolchain: + - nightly steps: - name: Checkout uses: actions/checkout@v3 - - name: Fail on warnings - working-directory: ./rtic - run: sed -i 's,//deny_warnings_placeholder_for_ci,#![deny(warnings)],' src/lib.rs - - - name: Add Rust component clippy - working-directory: ./rtic - run: rustup component add clippy - - - name: Cache Dependencies - uses: Swatinem/rust-cache@v2 - - - name: cargo clippy - working-directory: ./rtic - run: cargo clippy - - clippyrticmacros: - name: Cargo clippy rtic-macros - runs-on: ubuntu-22.04 - steps: - - name: Checkout - uses: actions/checkout@v3 - - - name: Fail on warnings - working-directory: ./rtic-macros - run: sed -i 's,//deny_warnings_placeholder_for_ci,#![deny(warnings)],' src/lib.rs - - - name: Add Rust component clippy - working-directory: ./rtic-macros - run: rustup component add clippy - - - name: Cache Dependencies - uses: Swatinem/rust-cache@v2 - - - name: cargo clippy - working-directory: ./rtic-macros - run: cargo clippy - - clippyarbiter: - name: Cargo clippy rtic-arbiter - runs-on: ubuntu-22.04 - steps: - - name: Checkout - uses: actions/checkout@v3 - - - name: Fail on warnings - working-directory: ./rtic-arbiter - run: sed -i 's,//deny_warnings_placeholder_for_ci,#![deny(warnings)],' src/lib.rs - - - name: Add Rust component clippy - working-directory: ./rtic-arbiter - run: rustup component add clippy - - - name: Cache Dependencies - uses: Swatinem/rust-cache@v2 - - - name: cargo clippy - working-directory: ./rtic-arbiter - run: cargo clippy - - clippychannel: - name: Cargo clippy rtic-channel - runs-on: ubuntu-22.04 - steps: - - name: Checkout - uses: actions/checkout@v3 - - - name: Fail on warnings - working-directory: ./rtic-channel - run: sed -i 's,//deny_warnings_placeholder_for_ci,#![deny(warnings)],' src/lib.rs - - - name: Add Rust component clippy - working-directory: ./rtic-channel - run: rustup component add clippy - - - name: Cache Dependencies - uses: Swatinem/rust-cache@v2 - - - name: cargo clippy - working-directory: ./rtic-channel - run: cargo clippy - - - clippymonotonics: - name: Cargo clippy rtic-monotonics - runs-on: ubuntu-22.04 - steps: - - name: Checkout - uses: actions/checkout@v3 + - name: Install Rust ${{ matrix.toolchain }} + run: | + rustup override set ${{ matrix.toolchain }} - - name: Fail on warnings - working-directory: ./rtic-monotonics - run: sed -i 's,//deny_warnings_placeholder_for_ci,#![deny(warnings)],' src/lib.rs + - name: Configure Rust target (v6, v7, v8.b v8.m) + run: | + rustup target add thumbv7m-none-eabi + rustup target add thumbv6m-none-eabi + rustup target add thumbv8m.base-none-eabi + rustup target add thumbv8m.main-none-eabi - name: Add Rust component clippy - working-directory: ./rtic-monotonics run: rustup component add clippy - - name: Cache Dependencies - uses: Swatinem/rust-cache@v2 - - - name: cargo clippy - working-directory: ./rtic-monotonics - run: cargo clippy - - clippytime: - name: Cargo clippy rtic-time - runs-on: ubuntu-22.04 - steps: - - name: Checkout - uses: actions/checkout@v3 - - name: Fail on warnings - working-directory: ./rtic-time - run: sed -i 's,//deny_warnings_placeholder_for_ci,#![deny(warnings)],' src/lib.rs - - - name: Add Rust component clippy - working-directory: ./rtic-time - run: rustup component add clippy + run: sed -i 's,//deny_warnings_placeholder_for_ci,#![deny(warnings)],' ${{ matrix.package }}/src/lib.rs - name: Cache Dependencies uses: Swatinem/rust-cache@v2 - - name: cargo clippy - working-directory: ./rtic-time - run: cargo clippy + - run: cargo xtask --verbose clippy ${{ matrix.package }} # Verify all examples, checks checkexamples: @@ -768,12 +675,7 @@ jobs: - stylemonotonics - styletime - check - - clippyrtic - - clippyrticmacros - - clippyarbiter - - clippychannel - - clippymonotonics - - clippytime + - clippy - checkexamples - testexamples - testsrtic -- cgit v1.2.3 From a7c213e9508e61c8835986e0bfb9e47c47e91fde Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Tj=C3=A4der?= Date: Wed, 8 Feb 2023 19:49:15 +0100 Subject: CI: Build docs for all crates --- .github/workflows/build.yml | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 28f7349..d86c279 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -409,24 +409,23 @@ jobs: run: pip install git+https://github.com/linkchecker/linkchecker.git - name: Remove cargo-config - working-directory: ./rtic run: rm -f .cargo/config - - name: Fail on warnings - working-directory: ./rtic - run: sed -i 's,//deny_warnings_placeholder_for_ci,#![deny(warnings)],' src/lib.rs - - name: Build docs - working-directory: ./rtic run: cargo doc - name: Check links - working-directory: ./rtic run: | td=$(mktemp -d) cp -r target/doc $td/api - linkchecker $td/api/rtic/ + linkchecker $td/api/rtic linkchecker $td/api/rtic_macros/ + linkchecker $td/api/rtic-arbiter/ + linkchecker $td/api/rtic-channel/ + linkchecker $td/api/rtic-common/ + linkchecker $td/api/rtic-macros/ + linkchecker $td/api/rtic-monotonics/ + linkchecker $td/api/rtic-time/ # Build the books mdbook: -- cgit v1.2.3 From fb203dc4b764c09e2143cadb1491bf523ecd8421 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Tj=C3=A4der?= Date: Wed, 8 Feb 2023 20:05:06 +0100 Subject: CI: xtask handling example tests --- .github/workflows/build.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d86c279..8c5cc04 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -187,7 +187,7 @@ jobs: # Verify all examples, checks checkexamples: - name: Cargo check --examples + name: check examples runs-on: ubuntu-22.04 strategy: matrix: @@ -204,21 +204,21 @@ jobs: - name: Install Rust ${{ matrix.toolchain }} run: | - rustup set profile minimal rustup override set ${{ matrix.toolchain }} - name: Configure Rust target (${{ matrix.target }}) run: rustup target add ${{ matrix.target }} - - name: Add Rust component llvm-tools-preview - run: rustup component add llvm-tools-preview - - name: Cache Dependencies uses: Swatinem/rust-cache@v2 - name: Check the examples - working-directory: ./rtic - run: cargo check --examples --target=${{ matrix.target }} + if: ${{ matrix.target == 'thumbv8m.base-none-eabi' }} + run: cargo xtask --verbose --target ${{ matrix.target }} --exampleexclude pool example-check + + - name: Check the examples + if: ${{ matrix.target != 'thumbv8m.base-none-eabi' }} + run: cargo xtask --verbose --target ${{ matrix.target }} example-check # Verify the example output with run-pass tests testexamples: -- cgit v1.2.3 From 22544c3ba1d8ed53e6595c020e0f709877927a2c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Tj=C3=A4der?= Date: Wed, 8 Feb 2023 20:09:37 +0100 Subject: CI: Docs use underscore, not hyphen --- .github/workflows/build.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 8c5cc04..795532e 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -418,14 +418,14 @@ jobs: run: | td=$(mktemp -d) cp -r target/doc $td/api - linkchecker $td/api/rtic + linkchecker $td/api/rtic/ linkchecker $td/api/rtic_macros/ - linkchecker $td/api/rtic-arbiter/ - linkchecker $td/api/rtic-channel/ - linkchecker $td/api/rtic-common/ - linkchecker $td/api/rtic-macros/ - linkchecker $td/api/rtic-monotonics/ - linkchecker $td/api/rtic-time/ + linkchecker $td/api/rtic_arbiter/ + linkchecker $td/api/rtic_channel/ + linkchecker $td/api/rtic_common/ + linkchecker $td/api/rtic_macros/ + linkchecker $td/api/rtic_monotonics/ + linkchecker $td/api/rtic_time/ # Build the books mdbook: -- cgit v1.2.3 From 6742936e0762c2bf3657f444d11beeab1672e913 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Tj=C3=A4der?= Date: Wed, 8 Feb 2023 20:13:26 +0100 Subject: CI: Make it clearer in GHA UI which target for QEMU --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '.github/workflows') diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 795532e..9584ef7 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -222,7 +222,7 @@ jobs: # Verify the example output with run-pass tests testexamples: - name: test examples in QEMU + name: QEMU run runs-on: ubuntu-22.04 strategy: matrix: -- cgit v1.2.3 From d248dddf7ba93fde5b1212825a94ec856b9ad1d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Tj=C3=A4der?= Date: Wed, 8 Feb 2023 22:09:44 +0100 Subject: CI: Make clippy fail on error --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '.github/workflows') diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 9584ef7..36402a1 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -178,7 +178,7 @@ jobs: run: rustup component add clippy - name: Fail on warnings - run: sed -i 's,//deny_warnings_placeholder_for_ci,#![deny(warnings)],' ${{ matrix.package }}/src/lib.rs + run: sed -i 's,//deny_warnings_placeholder_for_ci,#![deny(warnings)]\n#![deny(clippy::all)],' ${{ matrix.package }}/src/lib.rs - name: Cache Dependencies uses: Swatinem/rust-cache@v2 -- cgit v1.2.3 From 0fac17493697b14f2bb7386bf778ea42804ec514 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Tj=C3=A4der?= Date: Thu, 23 Feb 2023 23:07:06 +0100 Subject: CI: Use backend instead of target --- .github/workflows/build.yml | 40 +++++++++++++++++++++++----------------- 1 file changed, 23 insertions(+), 17 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 36402a1..0d64ef5 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -191,11 +191,11 @@ jobs: runs-on: ubuntu-22.04 strategy: matrix: - target: - - thumbv7m-none-eabi - - thumbv6m-none-eabi - - thumbv8m.base-none-eabi - - thumbv8m.main-none-eabi + backend: + - thumbv7 + - thumbv6 + - thumbv8-base + - thumbv8-main toolchain: - nightly steps: @@ -206,19 +206,23 @@ jobs: run: | rustup override set ${{ matrix.toolchain }} - - name: Configure Rust target (${{ matrix.target }}) - run: rustup target add ${{ matrix.target }} + - name: Configure Rust target (v6, v7, v8.b v8.m) + run: | + rustup target add thumbv7m-none-eabi + rustup target add thumbv6m-none-eabi + rustup target add thumbv8m.base-none-eabi + rustup target add thumbv8m.main-none-eabi - name: Cache Dependencies uses: Swatinem/rust-cache@v2 - name: Check the examples - if: ${{ matrix.target == 'thumbv8m.base-none-eabi' }} - run: cargo xtask --verbose --target ${{ matrix.target }} --exampleexclude pool example-check + if: ${{ matrix.backend == 'thumbv8m-base' }} + run: cargo xtask --verbose --backend ${{ matrix.backend }} --exampleexclude pool example-check - name: Check the examples - if: ${{ matrix.target != 'thumbv8m.base-none-eabi' }} - run: cargo xtask --verbose --target ${{ matrix.target }} example-check + if: ${{ matrix.backend != 'thumbv8m-base' }} + run: cargo xtask --verbose --backend ${{ matrix.backend }} example-check # Verify the example output with run-pass tests testexamples: @@ -226,9 +230,9 @@ jobs: runs-on: ubuntu-22.04 strategy: matrix: - target: - - thumbv7m-none-eabi - - thumbv6m-none-eabi + backend: + - thumbv7 + - thumbv6 toolchain: - nightly steps: @@ -240,8 +244,10 @@ jobs: rustup set profile minimal rustup override set ${{ matrix.toolchain }} - - name: Configure Rust target (${{ matrix.target }}) - run: rustup target add ${{ matrix.target }} + - name: Configure Rust target (v6, v7) + run: | + rustup target add thumbv7m-none-eabi + rustup target add thumbv6m-none-eabi - name: Add Rust component llvm-tools-preview run: rustup component add llvm-tools-preview @@ -263,7 +269,7 @@ jobs: run: sed -i 's,//deny_warnings_placeholder_for_ci,#![deny(warnings)],' src/lib.rs - name: Run-pass tests - run: cargo xtask --verbose --target ${{ matrix.target }} qemu + run: cargo xtask --verbose --backend ${{ matrix.backend }} qemu # Run test suite testsrtic: -- cgit v1.2.3 From 3e8a36ae2ad6e8b7b1a2f42c06c7fee884493084 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Tj=C3=A4der?= Date: Fri, 24 Feb 2023 00:10:20 +0100 Subject: CI: Use xtask for format checking --- .github/workflows/build.yml | 94 +++------------------------------------------ 1 file changed, 6 insertions(+), 88 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 0d64ef5..658fd89 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -13,9 +13,9 @@ env: CARGO_TERM_COLOR: always jobs: - # Run cargo fmt --check - stylertic: - name: cargo fmt rtic + # Run cargo xtask format-check + formatcheck: + name: cargo fmt runs-on: ubuntu-22.04 steps: - name: Checkout @@ -25,85 +25,8 @@ jobs: working-directory: ./rtic run: sed -i 's,//deny_warnings_placeholder_for_ci,#![deny(warnings)],' src/lib.rs - - name: cargo fmt --check - working-directory: ./rtic - run: cargo fmt --all -- --check - - stylerticmacros: - name: cargo fmt rtic-macros - runs-on: ubuntu-22.04 - steps: - - name: Checkout - uses: actions/checkout@v3 - - - name: Fail on warnings - working-directory: ./rtic-macros - run: sed -i 's,//deny_warnings_placeholder_for_ci,#![deny(warnings)],' src/lib.rs - - - name: cargo fmt --check - working-directory: ./rtic-macros - run: cargo fmt --all -- --check - - stylearbiter: - name: cargo fmt rtic-arbiter - runs-on: ubuntu-22.04 - steps: - - name: Checkout - uses: actions/checkout@v3 - - - name: Fail on warnings - working-directory: ./rtic-arbiter - run: sed -i 's,//deny_warnings_placeholder_for_ci,#![deny(warnings)],' src/lib.rs - - - name: cargo fmt --check - working-directory: ./rtic-arbiter - run: cargo fmt --all -- --check - - stylechannel: - name: cargo fmt rtic-channel - runs-on: ubuntu-22.04 - steps: - - name: Checkout - uses: actions/checkout@v3 - - - name: Fail on warnings - working-directory: ./rtic-channel - run: sed -i 's,//deny_warnings_placeholder_for_ci,#![deny(warnings)],' src/lib.rs - - - name: cargo fmt --check - working-directory: ./rtic-channel - run: cargo fmt --all -- --check - - stylemonotonics: - name: cargo fmt rtic-monotonics - runs-on: ubuntu-22.04 - steps: - - name: Checkout - uses: actions/checkout@v3 - - - name: Fail on warnings - working-directory: ./rtic-monotonics - run: sed -i 's,//deny_warnings_placeholder_for_ci,#![deny(warnings)],' src/lib.rs - - - name: cargo fmt --check - working-directory: ./rtic-monotonics - run: cargo fmt --all -- --check - - styletime: - name: cargo fmt rtic-time - runs-on: ubuntu-22.04 - steps: - - name: Checkout - uses: actions/checkout@v3 - - - name: Fail on warnings - working-directory: ./rtic-time - run: sed -i 's,//deny_warnings_placeholder_for_ci,#![deny(warnings)],' src/lib.rs - - - name: cargo fmt --check - working-directory: ./rtic-time - run: cargo fmt --all -- --check - + - name: cargo xtask format-check + run: cargo xtask format-check # Compilation check check: @@ -673,12 +596,7 @@ jobs: name: ci if: github.event_name == 'push' && success() needs: - - stylertic - - stylerticmacros - - stylearbiter - - stylechannel - - stylemonotonics - - styletime + - formatcheck - check - clippy - checkexamples -- cgit v1.2.3 From 60bd09117dc76e4e0bc22bdba134ad60c5f06c96 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Tj=C3=A4der?= Date: Fri, 24 Feb 2023 00:36:12 +0100 Subject: CI: Fail on any warning in any local crate --- .github/workflows/build.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 658fd89..0c3c1df 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -22,8 +22,7 @@ jobs: uses: actions/checkout@v3 - name: Fail on warnings - working-directory: ./rtic - run: sed -i 's,//deny_warnings_placeholder_for_ci,#![deny(warnings)],' src/lib.rs + run: find . -type f -name lib.rs -execdir sed -i 's,//deny_warnings_placeholder_for_ci,#![deny(warnings)],' {} + - name: cargo xtask format-check run: cargo xtask format-check -- cgit v1.2.3 From 2ea08fa84df7cf910ea1d2e30c1052f52bc77a49 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Tj=C3=A4der?= Date: Fri, 24 Feb 2023 01:24:43 +0100 Subject: CI: cargo doc needs a backend --- .github/workflows/build.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to '.github/workflows') diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 0c3c1df..3a10331 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -340,7 +340,8 @@ jobs: run: rm -f .cargo/config - name: Build docs - run: cargo doc + # TODO: Any difference between backends? + run: cargo doc --features thumbv7-backend - name: Check links run: | -- cgit v1.2.3 From 7d232aa74aa2eba61f588a339cedc6a1287ec727 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Tj=C3=A4der?= Date: Fri, 24 Feb 2023 01:25:48 +0100 Subject: CI: Iterate over backends instead of packages --- .github/workflows/build.yml | 35 ++++++++++++++--------------------- 1 file changed, 14 insertions(+), 21 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3a10331..6deecb2 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -33,14 +33,11 @@ jobs: runs-on: ubuntu-22.04 strategy: matrix: - package: - - rtic - - rtic-arbiter - - rtic-channel - - rtic-common - - rtic-macros - - rtic-monotonics - - rtic-time + backend: + - thumbv7 + - thumbv6 + - thumbv8-base + - thumbv8-main toolchain: - nightly steps: @@ -59,26 +56,22 @@ jobs: rustup target add thumbv8m.main-none-eabi - name: Fail on warnings - run: sed -i 's,//deny_warnings_placeholder_for_ci,#![deny(warnings)],' ${{ matrix.package }}/src/lib.rs + run: find . -type f -name lib.rs -execdir sed -i 's,//deny_warnings_placeholder_for_ci,#![deny(warnings)],' {} + - name: Cache Dependencies uses: Swatinem/rust-cache@v2 - - run: cargo xtask --verbose check ${{ matrix.package }} + - run: cargo xtask --verbose --backend ${{ matrix.backend }} check # Clippy clippy: - name: Cargo clippy rtic + name: clippy runs-on: ubuntu-22.04 strategy: matrix: - package: - - rtic - - rtic-arbiter - - rtic-channel - - rtic-common - - rtic-macros - - rtic-monotonics - - rtic-time + - thumbv7 + - thumbv6 + - thumbv8-base + - thumbv8-main toolchain: - nightly steps: @@ -100,12 +93,12 @@ jobs: run: rustup component add clippy - name: Fail on warnings - run: sed -i 's,//deny_warnings_placeholder_for_ci,#![deny(warnings)]\n#![deny(clippy::all)],' ${{ matrix.package }}/src/lib.rs + run: find . -type f -name lib.rs -execdir sed -i 's,//deny_warnings_placeholder_for_ci,#![deny(warnings)],' {} + - name: Cache Dependencies uses: Swatinem/rust-cache@v2 - - run: cargo xtask --verbose clippy ${{ matrix.package }} + - run: cargo xtask --verbose --backend ${{ matrix.backend }} clippy # Verify all examples, checks checkexamples: -- cgit v1.2.3 From bacdb7da597c22670ec92dca1756f27a48fdec7c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Tj=C3=A4der?= Date: Fri, 24 Feb 2023 01:54:22 +0100 Subject: CI: Basic tests rework --- .github/workflows/build.yml | 27 +++++++++++++++++++++------ 1 file changed, 21 insertions(+), 6 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 6deecb2..5687063 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -68,6 +68,7 @@ jobs: runs-on: ubuntu-22.04 strategy: matrix: + backend: - thumbv7 - thumbv6 - thumbv8-base @@ -132,11 +133,11 @@ jobs: uses: Swatinem/rust-cache@v2 - name: Check the examples - if: ${{ matrix.backend == 'thumbv8m-base' }} + if: ${{ matrix.backend == 'thumbv8-base' }} run: cargo xtask --verbose --backend ${{ matrix.backend }} --exampleexclude pool example-check - name: Check the examples - if: ${{ matrix.backend != 'thumbv8m-base' }} + if: ${{ matrix.backend != 'thumbv8-base' }} run: cargo xtask --verbose --backend ${{ matrix.backend }} example-check # Verify the example output with run-pass tests @@ -190,6 +191,14 @@ jobs: testsrtic: name: tests rtic runs-on: ubuntu-22.04 + strategy: + matrix: + backend: + - thumbv7 + - thumbv6 + - thumbv8-base + - thumbv8-main + steps: - name: Checkout uses: actions/checkout@v3 @@ -203,12 +212,18 @@ jobs: - name: Run cargo test working-directory: ./rtic - run: cargo test --test tests + run: cargo test --features ${{ matrix.backend }} --test ui - # Run the macros test-suite + # Run the macros test-suite testsmacros: name: tests rtic-macros runs-on: ubuntu-22.04 + strategy: + matrix: + backend: + - cortex-m-source-masking + - cortex-m-basepri + steps: - name: Checkout uses: actions/checkout@v3 @@ -222,7 +237,7 @@ jobs: - name: cargo check working-directory: ./rtic-macros - run: cargo test + run: cargo test --features ${{ matrix.backend }} # Run test suite testsarbiter: @@ -298,7 +313,7 @@ jobs: - name: Run cargo test working-directory: ./rtic-time - run: cargo test --test tests + run: cargo test # Build documentation, check links docs: -- cgit v1.2.3 From 57957cd66f0b70fdc87f38e0850da50bcbb3ca6b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Tj=C3=A4der?= Date: Fri, 24 Feb 2023 02:27:12 +0100 Subject: CI: Enable cache for format --- .github/workflows/build.yml | 3 +++ 1 file changed, 3 insertions(+) (limited to '.github/workflows') diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 5687063..19f679d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -24,6 +24,9 @@ jobs: - name: Fail on warnings run: find . -type f -name lib.rs -execdir sed -i 's,//deny_warnings_placeholder_for_ci,#![deny(warnings)],' {} + + - name: Cache Dependencies + uses: Swatinem/rust-cache@v2 + - name: cargo xtask format-check run: cargo xtask format-check -- cgit v1.2.3 From 26d5909345b3d4bc43df6de15321e9555eca20f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Tj=C3=A4der?= Date: Fri, 24 Feb 2023 02:28:38 +0100 Subject: CI: Features differ from xtask backends --- .github/workflows/build.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 19f679d..2badd01 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -197,10 +197,10 @@ jobs: strategy: matrix: backend: - - thumbv7 - - thumbv6 - - thumbv8-base - - thumbv8-main + - thumbv7-backend + - thumbv6-backend + - thumbv8base-backend + - thumbv8main-backend steps: - name: Checkout -- cgit v1.2.3 From 115fc3e21249e8c146d08f0fbd92e5f49233d2d6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Tj=C3=A4der?= Date: Fri, 24 Feb 2023 20:37:22 +0100 Subject: CI: Switch to lychee for linkchecking --- .github/workflows/build.yml | 59 ++++++++++++--------------------------------- 1 file changed, 16 insertions(+), 43 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 2badd01..64044c5 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -320,32 +320,14 @@ jobs: # Build documentation, check links docs: - name: Cargo docs, check links + name: Build docs runs-on: ubuntu-22.04 steps: - name: Checkout uses: actions/checkout@v3 - - name: Cache pip installed linkchecker - uses: actions/cache@v3 - with: - path: ~/.cache/pip - key: ${{ runner.os }}-pip - restore-keys: | - ${{ runner.os }}-pip- - - - name: Set up Python 3.x - uses: actions/setup-python@v4 - with: - # Semantic version range syntax or exact version of a Python version - python-version: '3.x' - - # You can test your matrix by printing the current Python version - - name: Display Python version - run: python -c "import sys; print(sys.version)" - - - name: Install dependencies - run: pip install git+https://github.com/linkchecker/linkchecker.git + - name: Install lychee + run: cargo install lychee - name: Remove cargo-config run: rm -f .cargo/config @@ -358,34 +340,25 @@ jobs: run: | td=$(mktemp -d) cp -r target/doc $td/api - linkchecker $td/api/rtic/ - linkchecker $td/api/rtic_macros/ - linkchecker $td/api/rtic_arbiter/ - linkchecker $td/api/rtic_channel/ - linkchecker $td/api/rtic_common/ - linkchecker $td/api/rtic_macros/ - linkchecker $td/api/rtic_monotonics/ - linkchecker $td/api/rtic_time/ + lychee --offline $td/api/rtic/ + lychee --offline $td/api/rtic_macros/ + lychee --offline $td/api/rtic_arbiter/ + lychee --offline $td/api/rtic_channel/ + lychee --offline $td/api/rtic_common/ + lychee --offline $td/api/rtic_macros/ + lychee --offline $td/api/rtic_monotonics/ + lychee --offline $td/api/rtic_time/ # Build the books mdbook: - name: mdbook, check links + name: build mdbook runs-on: ubuntu-22.04 steps: - name: Checkout uses: actions/checkout@v3 - - name: Set up Python 3.x - uses: actions/setup-python@v4 - with: - # Semantic version range syntax or exact version of a Python version - python-version: '3.x' - - # You can test your matrix by printing the current Python version - - name: Display Python version - run: python -c "import sys; print(sys.version)" - - name: Install dependencies - run: pip install git+https://github.com/linkchecker/linkchecker.git + - name: Install lychee + run: cargo install lychee - name: Install mdbook-mermaid run: cargo install mdbook-mermaid @@ -412,8 +385,8 @@ jobs: cp LICENSE-* $td/book/en cp LICENSE-* $td/book/ru - linkchecker $td/book/en/ - linkchecker $td/book/ru/ + lychee --offline $td/book/en/ + lychee --offline $td/book/ru/ # # Update stable branch # # -- cgit v1.2.3 From 789ddb1be163ff2e500caa9307e967535a20ef2f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Tj=C3=A4der?= Date: Fri, 24 Feb 2023 21:08:00 +0100 Subject: CI: Use precompiled tools if possible --- .github/workflows/build.yml | 27 ++++++++++----------------- 1 file changed, 10 insertions(+), 17 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 64044c5..262ce71 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -172,8 +172,8 @@ jobs: run: rustup component add llvm-tools-preview # Use precompiled binutils - - name: cargo install cargo-binutils - run: cargo install cargo-binutils + - name: Install cargo-binutils + uses: taiki-e/install-action@cargo-binutils - name: Cache Dependencies uses: Swatinem/rust-cache@v2 @@ -320,14 +320,14 @@ jobs: # Build documentation, check links docs: - name: Build docs + name: build docs runs-on: ubuntu-22.04 steps: - name: Checkout uses: actions/checkout@v3 - name: Install lychee - run: cargo install lychee + uses: taiki-e/install-action@lychee - name: Remove cargo-config run: rm -f .cargo/config @@ -358,10 +358,10 @@ jobs: uses: actions/checkout@v3 - name: Install lychee - run: cargo install lychee + uses: taiki-e/install-action@lychee - name: Install mdbook-mermaid - run: cargo install mdbook-mermaid + uses: taiki-e/install-action@mdbook-mermaid - name: mdBook Action uses: peaceiris/actions-mdbook@v1 @@ -443,18 +443,11 @@ jobs: # steps: # - uses: actions/checkout@v3 # -# - name: Set up Python 3.x -# uses: actions/setup-python@v4 -# with: -# # Semantic version range syntax or exact version of a Python version -# python-version: '3.x' -# -# # You can test your matrix by printing the current Python version -# - name: Display Python version -# run: python -c "import sys; print(sys.version)" +# - name: Install lychee +# uses: taiki-e/install-action@lychee # # - name: Install mdbook-mermaid -# run: cargo install mdbook-mermaid +# uses: taiki-e/install-action@mdbook-mermaid # # - name: mdBook Action # uses: peaceiris/actions-mdbook@v1 @@ -542,7 +535,7 @@ jobs: # # pushd $src # rm -f .cargo/config -# cargo doc || cargo doc --features timer-queue +# cargo doc --features thumbv7-backend || cargo doc --features thumbv7-backend,timer-queue # cp -r target/doc $td/$prefix/api # sed 's|URL|rtic/index.html|g' $root/redirect.html > $td/$prefix/api/index.html # for lang in ${langs[@]}; do -- cgit v1.2.3 From 032316855d8b55fc572ab7fcbd1de7ba394b2fd1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Tj=C3=A4der?= Date: Fri, 24 Feb 2023 21:19:11 +0100 Subject: CI: install-action without shorthand --- .github/workflows/build.yml | 26 +++++++++++++++++++------- 1 file changed, 19 insertions(+), 7 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 262ce71..e16e460 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -173,7 +173,9 @@ jobs: # Use precompiled binutils - name: Install cargo-binutils - uses: taiki-e/install-action@cargo-binutils + uses: taiki-e/install-action@v2 + with: + tool: cargo-binutils - name: Cache Dependencies uses: Swatinem/rust-cache@v2 @@ -327,7 +329,9 @@ jobs: uses: actions/checkout@v3 - name: Install lychee - uses: taiki-e/install-action@lychee + uses: taiki-e/install-action@v2 + with: + tool: lychee - name: Remove cargo-config run: rm -f .cargo/config @@ -358,10 +362,14 @@ jobs: uses: actions/checkout@v3 - name: Install lychee - uses: taiki-e/install-action@lychee + uses: taiki-e/install-action@v2 + with: + tool: lychee - name: Install mdbook-mermaid - uses: taiki-e/install-action@mdbook-mermaid + uses: taiki-e/install-action@v2 + with: + tool: mdbook-mermaid - name: mdBook Action uses: peaceiris/actions-mdbook@v1 @@ -444,11 +452,15 @@ jobs: # - uses: actions/checkout@v3 # # - name: Install lychee -# uses: taiki-e/install-action@lychee +# uses: taiki-e/install-action@v2 +# with: +# tool: lychee # # - name: Install mdbook-mermaid -# uses: taiki-e/install-action@mdbook-mermaid -# +# uses: taiki-e/install-action@v2 +# with: +# tool: mdbook-mermaid +# # - name: mdBook Action # uses: peaceiris/actions-mdbook@v1 # with: -- cgit v1.2.3 From 0fc86d972c0305e73252dc20d702d647eb342ee5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Tj=C3=A4der?= Date: Fri, 24 Feb 2023 21:28:13 +0100 Subject: Book: Remove RTIC v1 Russian translation --- .github/workflows/build.yml | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e16e460..cd52dee 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -380,21 +380,14 @@ jobs: shell: 'script --return --quiet --command "bash {0}"' run: cd book/en && if mdbook build |& tee /dev/tty | grep "\[ERROR\]"; then exit 1; else exit 0; fi - - name: Build book in Russian - shell: 'script --return --quiet --command "bash {0}"' - run: cd book/ru && if mdbook build |& tee /dev/tty | grep "\[ERROR\]"; then echo "Russian book needs updating!"; else exit 0; fi - - name: Check links run: | td=$(mktemp -d) mkdir $td/book cp -r book/en/book $td/book/en - cp -r book/ru/book $td/book/ru cp LICENSE-* $td/book/en - cp LICENSE-* $td/book/ru lychee --offline $td/book/en/ - lychee --offline $td/book/ru/ # # Update stable branch # # @@ -485,7 +478,7 @@ jobs: # - name: Build books # shell: 'script --return --quiet --command "bash {0}"' # run: | -# langs=( en ru ) +# langs=( en ) # devver=( dev ) # # The latest stable must be the first element in the array # vers=( "1" "0.5" "0.4" ) -- cgit v1.2.3 From 5ca63f08d643f63cdc03baa2c3901c7b3e1140a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Tj=C3=A4der?= Date: Fri, 24 Feb 2023 21:57:06 +0100 Subject: CI: Output detailed link checking errors --- .github/workflows/build.yml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index cd52dee..50807a8 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -344,14 +344,14 @@ jobs: run: | td=$(mktemp -d) cp -r target/doc $td/api - lychee --offline $td/api/rtic/ - lychee --offline $td/api/rtic_macros/ - lychee --offline $td/api/rtic_arbiter/ - lychee --offline $td/api/rtic_channel/ - lychee --offline $td/api/rtic_common/ - lychee --offline $td/api/rtic_macros/ - lychee --offline $td/api/rtic_monotonics/ - lychee --offline $td/api/rtic_time/ + lychee --offline --format detailed $td/api/rtic/ + lychee --offline --format detailed $td/api/rtic_macros/ + lychee --offline --format detailed $td/api/rtic_arbiter/ + lychee --offline --format detailed $td/api/rtic_channel/ + lychee --offline --format detailed $td/api/rtic_common/ + lychee --offline --format detailed $td/api/rtic_macros/ + lychee --offline --format detailed $td/api/rtic_monotonics/ + lychee --offline --format detailed $td/api/rtic_time/ # Build the books mdbook: @@ -387,7 +387,7 @@ jobs: cp -r book/en/book $td/book/en cp LICENSE-* $td/book/en - lychee --offline $td/book/en/ + lychee --offline --format detailed $td/book/en/ # # Update stable branch # # -- cgit v1.2.3 From b621bcf36a136fbc4c1017d2f4ca1882d49df34a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Tj=C3=A4der?= Date: Fri, 24 Feb 2023 21:58:26 +0100 Subject: CI: Store and reuse API docs --- .github/workflows/build.yml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to '.github/workflows') diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 50807a8..41731a6 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -353,9 +353,21 @@ jobs: lychee --offline --format detailed $td/api/rtic_monotonics/ lychee --offline --format detailed $td/api/rtic_time/ + - name: Archive the API docs + run: | + cp -r target/doc apidocs + tar -cf apidocs.tar apidocs + + - name: Store the API docs + uses: actions/upload-artifact@v3 + with: + name: apidocs + path: apidocs.tar + # Build the books mdbook: name: build mdbook + needs: docs runs-on: ubuntu-22.04 steps: - name: Checkout @@ -380,12 +392,21 @@ jobs: shell: 'script --return --quiet --command "bash {0}"' run: cd book/en && if mdbook build |& tee /dev/tty | grep "\[ERROR\]"; then exit 1; else exit 0; fi + - name: Download built API docs + uses: actions/download-artifact@v3 + with: + name: apidocs + + - name: Extract the API docs + run: tar -xf apidocs + - name: Check links run: | td=$(mktemp -d) mkdir $td/book cp -r book/en/book $td/book/en cp LICENSE-* $td/book/en + cp -r apidocs/ $td/api lychee --offline --format detailed $td/book/en/ -- cgit v1.2.3 From 4c2f550ee61cfd61f1877b77c7755c539232b6d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Tj=C3=A4der?= Date: Fri, 24 Feb 2023 22:15:17 +0100 Subject: CI: Fix name of downloaded tar --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '.github/workflows') diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 41731a6..3f2c8c1 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -398,7 +398,7 @@ jobs: name: apidocs - name: Extract the API docs - run: tar -xf apidocs + run: tar -xf apidocs.tar - name: Check links run: | -- cgit v1.2.3 From 073e41d03dc5412c82e954b45c01b61c94ecb934 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Tj=C3=A4der?= Date: Fri, 24 Feb 2023 22:26:33 +0100 Subject: CI: Make it clear what has been linkchecked --- .github/workflows/build.yml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to '.github/workflows') diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3f2c8c1..c264373 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -344,14 +344,30 @@ jobs: run: | td=$(mktemp -d) cp -r target/doc $td/api + echo rtic lychee --offline --format detailed $td/api/rtic/ + + echo rtic_macros lychee --offline --format detailed $td/api/rtic_macros/ + + echo rtic_arbiter lychee --offline --format detailed $td/api/rtic_arbiter/ + + echo rtic_channel lychee --offline --format detailed $td/api/rtic_channel/ + + echo rtic_common lychee --offline --format detailed $td/api/rtic_common/ + + echo rtic_macros lychee --offline --format detailed $td/api/rtic_macros/ + + echo rtic_monotonics lychee --offline --format detailed $td/api/rtic_monotonics/ + + echo rtic_time lychee --offline --format detailed $td/api/rtic_time/ + - name: Archive the API docs run: | -- cgit v1.2.3 From 1b699c656fe0d6d9fbc302116fe4d27ef3c178ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Tj=C3=A4der?= Date: Fri, 24 Feb 2023 22:26:43 +0100 Subject: CI: TODO for deploy --- .github/workflows/build.yml | 4 ++++ 1 file changed, 4 insertions(+) (limited to '.github/workflows') diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c264373..bc5161d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -475,6 +475,8 @@ jobs: # runs-on: ubuntu-22.04 # needs: # mergetostablebranch +# docs +# mdbook # # # Only run this when pushing to master branch # if: github.ref == 'refs/heads/master' @@ -509,6 +511,7 @@ jobs: # - name: Remove cargo-config # run: rm -f .cargo/config # +# # TODO: Download API docs artifacts instead # - name: Build docs # run: cargo doc # @@ -558,6 +561,7 @@ jobs: # fi # # # Build books +# # TODO: Download books artifacts instead # for lang in ${langs[@]}; do # ( cd book/$lang && # if mdbook build |& tee /dev/tty | grep "\[ERROR\]"; then exit 1; else exit 0; fi -- cgit v1.2.3 From a575266ec2da56fb202de35948650c7f11a2909d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Tj=C3=A4der?= Date: Tue, 28 Feb 2023 23:55:02 +0100 Subject: xtask: Add tests, clean a bit --- .github/workflows/build.yml | 132 +++++++------------------------------------- 1 file changed, 20 insertions(+), 112 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index bc5161d..deb20b4 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -65,6 +65,7 @@ jobs: uses: Swatinem/rust-cache@v2 - run: cargo xtask --verbose --backend ${{ matrix.backend }} check + # Clippy clippy: name: clippy @@ -193,8 +194,8 @@ jobs: run: cargo xtask --verbose --backend ${{ matrix.backend }} qemu # Run test suite - testsrtic: - name: tests rtic + tests: + name: tests runs-on: ubuntu-22.04 strategy: matrix: @@ -203,6 +204,14 @@ jobs: - thumbv6-backend - thumbv8base-backend - thumbv8main-backend + package: + - rtic + - rtic-arbiter + - rtic-channel + - rtic-common + - rtic-macros + - rtic-monotonics + - rtic-time steps: - name: Checkout @@ -211,114 +220,18 @@ jobs: - name: Cache Dependencies uses: Swatinem/rust-cache@v2 - - name: Fail on warnings - working-directory: ./rtic - run: sed -i 's,//deny_warnings_placeholder_for_ci,#![deny(warnings)],' src/lib.rs - - - name: Run cargo test - working-directory: ./rtic - run: cargo test --features ${{ matrix.backend }} --test ui - - # Run the macros test-suite - testsmacros: - name: tests rtic-macros - runs-on: ubuntu-22.04 - strategy: - matrix: - backend: - - cortex-m-source-masking - - cortex-m-basepri - - steps: - - name: Checkout - uses: actions/checkout@v3 - - - name: Cache Dependencies - uses: Swatinem/rust-cache@v2 - - - name: Fail on warnings - working-directory: ./rtic-macros - run: sed -i 's,//deny_warnings_placeholder_for_ci,#![deny(warnings)],' src/lib.rs - - - name: cargo check - working-directory: ./rtic-macros - run: cargo test --features ${{ matrix.backend }} - - # Run test suite - testsarbiter: - name: tests rtic-arbiter - runs-on: ubuntu-22.04 - steps: - - name: Checkout - uses: actions/checkout@v3 - - - name: Cache Dependencies - uses: Swatinem/rust-cache@v2 - - - name: Fail on warnings - working-directory: ./rtic-arbiter - run: sed -i 's,//deny_warnings_placeholder_for_ci,#![deny(warnings)],' src/lib.rs - - - name: Run cargo test - working-directory: ./rtic-arbiter - run: cargo test --features testing - - # Run test suite - testschannel: - name: tests rtic-channel - runs-on: ubuntu-22.04 - steps: - - name: Checkout - uses: actions/checkout@v3 - - - name: Cache Dependencies - uses: Swatinem/rust-cache@v2 - - - name: Fail on warnings - working-directory: ./rtic-channel - run: sed -i 's,//deny_warnings_placeholder_for_ci,#![deny(warnings)],' src/lib.rs - - - name: Run cargo test - working-directory: ./rtic-channel - run: cargo test --features testing - - # Run test suite - testsmonotonics: - name: tests rtic-monotonics - runs-on: ubuntu-22.04 - steps: - - name: Checkout - uses: actions/checkout@v3 - - - name: Cache Dependencies - uses: Swatinem/rust-cache@v2 - - - name: Fail on warnings - working-directory: ./rtic-monotonics - run: sed -i 's,//deny_warnings_placeholder_for_ci,#![deny(warnings)],' src/lib.rs - - - name: Run cargo test - working-directory: ./rtic-monotonics - run: cargo test --test tests - - # Run test suite - teststime: - name: tests rtic-time - runs-on: ubuntu-22.04 - steps: - - name: Checkout - uses: actions/checkout@v3 - - - name: Cache Dependencies - uses: Swatinem/rust-cache@v2 + - name: Configure Rust target (v6, v7, v8.b v8.m) + run: | + rustup target add thumbv7m-none-eabi + rustup target add thumbv6m-none-eabi + rustup target add thumbv8m.base-none-eabi + rustup target add thumbv8m.main-none-eabi - name: Fail on warnings - working-directory: ./rtic-time - run: sed -i 's,//deny_warnings_placeholder_for_ci,#![deny(warnings)],' src/lib.rs + run: find . -type f -name lib.rs -execdir sed -i 's,//deny_warnings_placeholder_for_ci,#![deny(warnings)],' {} + - name: Run cargo test - working-directory: ./rtic-time - run: cargo test + run: cargo xtask --verbose --backend ${{ matrix.backend }} test ${{ matrix.package }} # Build documentation, check links docs: @@ -624,12 +537,7 @@ jobs: - clippy - checkexamples - testexamples - - testsrtic - - testsmacros - - testsarbiter - - testschannel - - testsmonotonics - - teststime + - tests - docs - mdbook runs-on: ubuntu-22.04 -- cgit v1.2.3 From 883c5f78c6202e0dac115326c5fa5d7b9355d2a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Tj=C3=A4der?= Date: Wed, 1 Mar 2023 00:40:50 +0100 Subject: ci: fix backend names for tests --- .github/workflows/build.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index deb20b4..3846017 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -200,10 +200,10 @@ jobs: strategy: matrix: backend: - - thumbv7-backend - - thumbv6-backend - - thumbv8base-backend - - thumbv8main-backend + - thumbv7 + - thumbv6 + - thumbv8-base + - thumbv8-main package: - rtic - rtic-arbiter -- cgit v1.2.3 From e671981ae2fb251a20330cfc4c78a272e0b3422b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Tj=C3=A4der?= Date: Wed, 1 Mar 2023 00:46:00 +0100 Subject: ci: Temporary test: all tests --- .github/workflows/build.yml | 1 + 1 file changed, 1 insertion(+) (limited to '.github/workflows') diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3846017..5d264f1 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -198,6 +198,7 @@ jobs: name: tests runs-on: ubuntu-22.04 strategy: + fail-fast: false matrix: backend: - thumbv7 -- cgit v1.2.3 From ff4ddcb215b85b9d6a96c5e8f4e2bac06edd8ec8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Tj=C3=A4der?= Date: Thu, 2 Mar 2023 19:58:04 +0100 Subject: ci: rtic-sync --- .github/workflows/build.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 5d264f1..f44ed43 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -207,11 +207,10 @@ jobs: - thumbv8-main package: - rtic - - rtic-arbiter - - rtic-channel - rtic-common - rtic-macros - rtic-monotonics + - rtic-sync - rtic-time steps: -- cgit v1.2.3 From 2f8dcb1b82c85688bd55826e9a0c47827bf6cc87 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Tj=C3=A4der?= Date: Thu, 2 Mar 2023 20:09:39 +0100 Subject: ci: rtic-sync for docs --- .github/workflows/build.yml | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f44ed43..979fdab 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -263,12 +263,6 @@ jobs: echo rtic_macros lychee --offline --format detailed $td/api/rtic_macros/ - echo rtic_arbiter - lychee --offline --format detailed $td/api/rtic_arbiter/ - - echo rtic_channel - lychee --offline --format detailed $td/api/rtic_channel/ - echo rtic_common lychee --offline --format detailed $td/api/rtic_common/ @@ -277,6 +271,9 @@ jobs: echo rtic_monotonics lychee --offline --format detailed $td/api/rtic_monotonics/ + + echo rtic_sync + lychee --offline --format detailed $td/api/rtic_sync/ echo rtic_time lychee --offline --format detailed $td/api/rtic_time/ -- cgit v1.2.3 From 0a995e46c70dc193955d358d55cb111c2bba9505 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Tj=C3=A4der?= Date: Thu, 2 Mar 2023 21:56:07 +0100 Subject: ci: Fix so channel is checked --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '.github/workflows') diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 979fdab..f895b9a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -261,7 +261,7 @@ jobs: lychee --offline --format detailed $td/api/rtic/ echo rtic_macros - lychee --offline --format detailed $td/api/rtic_macros/ + lychee --offline --format detailed $td/api/rtic_channel/ echo rtic_common lychee --offline --format detailed $td/api/rtic_common/ -- cgit v1.2.3 From f03aede2f5a926bdb26d052766492c32454a60dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Tj=C3=A4der?= Date: Thu, 2 Mar 2023 22:38:25 +0100 Subject: Fixes for repo rename to rtic --- .github/workflows/matrix-bot.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/matrix-bot.yml b/.github/workflows/matrix-bot.yml index 6ef6787..bc985d9 100644 --- a/.github/workflows/matrix-bot.yml +++ b/.github/workflows/matrix-bot.yml @@ -5,7 +5,7 @@ on: jobs: new-pr: - if: github.event.action == 'opened' && github.repository == 'rtic-rs/cortex-m-rtic' + if: github.event.action == 'opened' && github.repository == 'rtic-rs/rtic' runs-on: ubuntu-latest continue-on-error: true steps: @@ -18,7 +18,7 @@ jobs: server: "matrix.org" merged-pr: - if: github.event.action == 'closed' && github.event.pull_request.merged == true && github.repository == 'rtic-rs/cortex-m-rtic' + if: github.event.action == 'closed' && github.event.pull_request.merged == true && github.repository == 'rtic-rs/rtic' runs-on: ubuntu-latest continue-on-error: true steps: @@ -31,7 +31,7 @@ jobs: server: "matrix.org" abandoned-pr: - if: github.event.action == 'closed' && github.event.pull_request.merged == false && github.repository == 'rtic-rs/cortex-m-rtic' + if: github.event.action == 'closed' && github.event.pull_request.merged == false && github.repository == 'rtic-rs/rtic' runs-on: ubuntu-latest continue-on-error: true steps: -- cgit v1.2.3 From 38a48e5d5cf8f81d53b84cee5a9109c664370fe8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Tj=C3=A4der?= Date: Sat, 4 Mar 2023 00:10:08 +0100 Subject: ci: Overhaul docs and deploy --- .github/workflows/build.yml | 436 +++++++++++++++++++++++++------------------- 1 file changed, 245 insertions(+), 191 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f895b9a..96e1540 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -11,6 +11,10 @@ on: env: CARGO_TERM_COLOR: always + DEV_VERSION: 2 + STABLE_VERSION: 1 + OLDSTABLE_VERSION: 0.5 + OLDOLDSTABLE_VERSION: 0.4 jobs: # Run cargo xtask format-check @@ -304,19 +308,18 @@ jobs: with: tool: lychee - - name: Install mdbook-mermaid + - name: Install mdbook uses: taiki-e/install-action@v2 with: - tool: mdbook-mermaid + tool: mdbook - - name: mdBook Action - uses: peaceiris/actions-mdbook@v1 + - name: Install mdbook-mermaid + uses: taiki-e/install-action@v2 with: - mdbook-version: 'latest' + tool: mdbook-mermaid - name: Build book in English - shell: 'script --return --quiet --command "bash {0}"' - run: cd book/en && if mdbook build |& tee /dev/tty | grep "\[ERROR\]"; then exit 1; else exit 0; fi + run: cargo xtask book - name: Download built API docs uses: actions/download-artifact@v3 @@ -336,190 +339,241 @@ jobs: lychee --offline --format detailed $td/book/en/ -# # Update stable branch -# # -# # This needs to run before book is built -# mergetostablebranch: -# name: If CI passes, merge master branch into release/vX -# runs-on: ubuntu-22.04 -# needs: -# - style -# - check -# - clippy -# - checkexamples -# - testexamples -# - checkmacros -# - testmacros -# - tests -# - docs -# - mdbook -# -# # Only run this when pushing to master branch -# if: github.ref == 'refs/heads/master' -# steps: -# - uses: actions/checkout@v3 -# -# - name: Get crate version and print output branch release/vX -# id: crateversionbranch -# # Parse metadata for version number, extract the Semver Major -# run: | -# VERSION=$(cargo metadata --format-version 1 --no-deps --offline | jq -r '.packages[] | select(.name =="cortex-m-rtic") | .version') -# VERSIONMAJOR=${VERSION%.*.*} -# echo "branch=release/v$VERSIONMAJOR" >> $GITHUB_ENV -# echo "versionmajor=$VERSIONMAJOR" >> $GITHUB_ENV -# echo "version=$VERSION" >> $GITHUB_ENV -# -# - uses: everlytic/branch-merge@1.1.5 -# with: -# github_token: ${{ github.token }} -# source_ref: 'master' -# target_branch: ${{ env.branch }} -# commit_message_template: '[Bors] Merged {source_ref} into target {target_branch}' -# -# # Only runs when pushing to master branch -# # Bors run CI against staging branch, -# # if that succeeds Borst tries against master branch -# # If all tests pass, then deploy stage is run -# deploy: -# name: deploy -# runs-on: ubuntu-22.04 -# needs: -# mergetostablebranch -# docs -# mdbook -# -# # Only run this when pushing to master branch -# if: github.ref == 'refs/heads/master' -# steps: -# - uses: actions/checkout@v3 -# -# - name: Install lychee -# uses: taiki-e/install-action@v2 -# with: -# tool: lychee -# -# - name: Install mdbook-mermaid -# uses: taiki-e/install-action@v2 -# with: -# tool: mdbook-mermaid -# -# - name: mdBook Action -# uses: peaceiris/actions-mdbook@v1 -# with: -# mdbook-version: 'latest' -# -# - name: Get crate version -# id: crateversion -# # Parse metadata for version number, extract the Semver Major -# run: | -# VERSION=$(cargo metadata --format-version 1 --no-deps --offline | jq -r '.packages[] | select(.name =="cortex-m-rtic") | .version') -# VERSIONMAJOR=${VERSION%.*.*} -# echo "branch=release/v$VERSIONMAJOR" >> $GITHUB_ENV -# echo "versionmajor=$VERSIONMAJOR" >> $GITHUB_ENV -# echo "version=$VERSION" >> $GITHUB_ENV -# -# - name: Remove cargo-config -# run: rm -f .cargo/config -# -# # TODO: Download API docs artifacts instead -# - name: Build docs -# run: cargo doc -# -# - name: Build books -# shell: 'script --return --quiet --command "bash {0}"' -# run: | -# langs=( en ) -# devver=( dev ) -# # The latest stable must be the first element in the array -# vers=( "1" "0.5" "0.4" ) -# -# # All releases start with "v" -# # followed by MAJOR.MINOR.PATCH, see semver.org -# # Store first in array as stable -# stable=${vers} -# crateversion={{ env.versionmajor }} -# -# echo "Latest stable version: $stable" -# echo "Current crate version: $crateversion" -# -# # Create directories -# td=$(mktemp -d) -# mkdir -p $td/$devver/book/ -# cp -r target/doc $td/$devver/api -# -# # Redirect rtic.rs/meeting/index.html to hackmd -# mkdir $td/meeting -# sed "s|URL|https://hackmd.io/c_mFUZL-Q2C6614MlrrxOg|g" redirect.html > $td/meeting/index.html -# sed -i "s|Page Redirection|RTIC Meeting|" $td/meeting/index.html -# sed -i "s|If you|Redirecting to RTIC HackMD. If you|" $td/meeting/index.html -# -# # Redirect the main site to the stable release -# sed "s|URL|$stable|g" redirect.html > $td/index.html -# -# # Create the redirects for dev-version -# # If the current stable and the version being built differ, -# # then there is a dev-version and the links should point to it. -# if [[ "$stable" != "$crateversion" ]]; -# then -# sed 's|URL|rtic/index.html|g' redirect.html > $td/$devver/api/index.html -# sed 's|URL|book/en|g' redirect.html > $td/$devver/index.html -# else -# # If the current stable and the "dev" version in master branch -# # share the same major version, redirect dev/ to stable book -# sed 's|URL|rtic.rs/$stable/api/rtic|g' redirect.html > $td/$devver/api/index.html -# sed 's|URL|rtic.rs/$stable|g' redirect.html > $td/$devver/index.html -# fi -# -# # Build books -# # TODO: Download books artifacts instead -# for lang in ${langs[@]}; do -# ( cd book/$lang && -# if mdbook build |& tee /dev/tty | grep "\[ERROR\]"; then exit 1; else exit 0; fi -# ) -# cp -r book/$lang/book $td/$devver/book/$lang -# cp LICENSE-* $td/$devver/book/$lang/ -# done -# -# # Build older versions, including stable -# root=$(pwd) -# for ver in ${vers[@]}; do -# prefix=${ver} -# -# mkdir -p $td/$prefix/book -# src=$(mktemp -d) -# curl -L https://github.com/rtic-rs/cortex-m-rtic/archive/release/v${ver}.tar.gz | tar xz --strip-components 1 -C $src -# -# pushd $src -# rm -f .cargo/config -# cargo doc --features thumbv7-backend || cargo doc --features thumbv7-backend,timer-queue -# cp -r target/doc $td/$prefix/api -# sed 's|URL|rtic/index.html|g' $root/redirect.html > $td/$prefix/api/index.html -# for lang in ${langs[@]}; do -# ( cd book/$lang && -# if mdbook build |& tee /dev/tty | grep "\[ERROR\]"; then exit 1; else exit 0; fi -# ) -# cp -r book/$lang/book $td/$prefix/book/$lang -# cp LICENSE-* $td/$prefix/book/$lang/ -# done -# sed 's|URL|book/en|g' $root/redirect.html > $td/$prefix/index.html -# popd -# -# rm -rf $src -# done -# -# # Copy the stable book to the stable alias -# cp -r $td/$stable $td/stable -# -# # Forward CNAME file -# cp CNAME $td/ -# mv $td/ bookstodeploy -# -# - name: Deploy to GH-pages -# uses: peaceiris/actions-gh-pages@v3 -# with: -# github_token: ${{ secrets.GITHUB_TOKEN }} -# publish_dir: ./bookstodeploy -# force_orphan: true + - name: Archive the book + API docs + run: | + cp -r $td bookroot + tar -cf book.tar bookroot + + - name: Store the Book + API docs + uses: actions/upload-artifact@v3 + with: + name: book + path: book.tar + + mdbookold: + name: build docs and mdbook for older releases + runs-on: ubuntu-22.04 + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Remove cargo-config + run: rm -f .cargo/config + + - name: Prepare output folder + run: mkdir -p mdbookold + + - name: Fetch and build books for older versions + run: | + # The latest stable must be the first element in the array + vers=( "${{ env.STABLE_VERSION }}" "${{ env.OLDSTABLE_VERSION }}" ) + langs=( en ) + root=$(pwd) + webroot=$(pwd)/mdbookold + + for ver in ${vers[@]}; do + + src=$(mktemp -d) + curl -L https://github.com/rtic-rs/rtic/archive/release/v${ver}.tar.gz | tar xz --strip-components 1 -C $src + + pushd $src + rm -f .cargo/config + cargo doc --features thumbv7-backend || cargo doc --features thumbv7-backend,timer-queue + cp -r target/doc $webroot/$ver/api + sed 's|URL|rtic/index.html|g' $webroot/redirect.html > $webroot/$ver/api/index.html + popd + + for lang in ${langs[@]}; do + cargo xtask book build $src/book/$lang + + cp -r book/$lang/$book $webroot/$ver/book/$lang + cp LICENSE-* $webroot/$ver/book/$lang/ + done + sed 's|URL|book/en|g' $webroot/redirect.html > $webroot/$ver/index.html + + rm -rf $src + done + + - name: Archive the old books + run: | + tar -cf mdbookold.tar mdbookold + + - name: Store the old API docs + uses: actions/upload-artifact@v3 + with: + name: mdbookold + path: mdbookold.tar + + parseversion: + # Only run this when pushing to master branch + if: github.ref == 'refs/heads/master' + steps: + - uses: actions/checkout@v3 + + - name: Get crate version and print output branch release/vX + id: crateversionbranch + # Parse metadata for version number, extract the Semver Major + run: | + VERSION=$(cargo metadata --format-version 1 --no-deps --offline | jq -r '.packages[] | select(.name =="rtic") | .version') + VERSIONMAJOR=${VERSION%.*.*} + echo "branch=release/v$VERSIONMAJOR" >> $GITHUB_ENV + echo "versionmajor=$VERSIONMAJOR" >> $GITHUB_ENV + echo "version=$VERSION" >> $GITHUB_ENV + + + # Update stable branch + # + # This is only valid when current stable resides in + # master branch. + # As master moves on to development, the work on the + # stable version will happen in release/v"stable_version". + # Thus, no need to push changes + # + # This needs to run before book is built, as bookbuilding fetches from the branch + mergetostablebranch: + name: If CI passes, merge master branch into release/vX + runs-on: ubuntu-22.04 + needs: + - parseversion + - formatcheck + - check + - clippy + - checkexamples + - testexamples + - tests + - docs + - mdbook + + # Only run this when pushing to master branch + if: github.ref == 'refs/heads/master' + steps: + - uses: actions/checkout@v3 + + - name: Push to stable release branch if master contains stable version + if: ${{ env.versionmajor == env.STABLE_VERSION }} + run: git push -u origin ${{ env.branch }} + + # Only runs when pushing to master branch + # Bors run CI against staging branch, + # if that succeeds Borst tries against master branch + # If all tests pass, then deploy stage is run + deploy: + name: deploy + runs-on: ubuntu-22.04 + needs: + - parseversion + - mergetostablebranch + - docs + - mdbookold + - mdbook + + # Only run this when pushing to master branch + if: github.ref == 'refs/heads/master' + steps: + - uses: actions/checkout@v3 + + - name: Install lychee + uses: taiki-e/install-action@v2 + with: + tool: lychee + + - name: Install mdbook-mermaid + uses: taiki-e/install-action@v2 + with: + tool: mdbook-mermaid + + - name: mdBook Action + uses: peaceiris/actions-mdbook@v1 + with: + mdbook-version: 'latest' + + - name: Remove cargo-config + run: rm -f .cargo/config + + - name: Download built dev-ver book and API docs + uses: actions/download-artifact@v3 + with: + name: book + + - name: Extract the dev-version book and API docs + run: | + tar -xf book.tar + + - name: Download built old versions of books and API docs + uses: actions/download-artifact@v3 + with: + name: mdbookold + + - name: Extract the old version books and API docs + run: | + tar -xf mdbookold.tar + + - name: Prepare books + shell: 'script --return --quiet --command "bash {0}"' + run: | + langs=( en ) + devver=( dev ) + # The latest stable must be the first element in the array + vers=( "${{ env.STABLE_VERSION }}" "${{ env.OLDSTABLE_VERSION }}" ) + + # All releases start with "v" + # followed by MAJOR.MINOR.PATCH, see semver.org + # Store first in array as stable + stable=${vers} + crateversion=${{ env.versionmajor }} + + echo "Latest stable version: $stable" + echo "Current crate version: $crateversion" + + # Create directories + td=$(mktemp -d) + mkdir -p $td/$devver/ + cp -r bookroot/* $td/$devver/ + + # Redirect rtic.rs/meeting/index.html to hackmd + mkdir $td/meeting + sed "s|URL|https://hackmd.io/c_mFUZL-Q2C6614MlrrxOg|g" redirect.html > $td/meeting/index.html + sed -i "s|Page Redirection|RTIC Meeting|" $td/meeting/index.html + sed -i "s|If you|Redirecting to RTIC HackMD. If you|" $td/meeting/index.html + + # Redirect the main site to the stable release + sed "s|URL|$stable|g" redirect.html > $td/index.html + + # Create the redirects for dev-version + # If the current stable and the version being built differ, + # then there is a dev-version and the links should point to it. + if [[ "$stable" != "$crateversion" ]]; + then + sed 's|URL|rtic/index.html|g' redirect.html > $td/$devver/api/index.html + sed 's|URL|book/en|g' redirect.html > $td/$devver/index.html + else + # If the current stable and the "dev" version in master branch + # share the same major version, redirect dev/ to stable book + # This makes sense, preferable to have doc/book updates going live directly to rtic.rs + sed 's|URL|rtic.rs/$stable/api/rtic|g' redirect.html > $td/$devver/api/index.html + sed 's|URL|rtic.rs/$stable|g' redirect.html > $td/$devver/index.html + fi + + # Package older versions, including stable + + # Copy the stable book to the stable alias + cp -r mdbookold/${{ env.STABLE_VERSION }} $td/stable + + # Copy the stable book to the webroot + cp -r mdbookold/${{ env.STABLE_VERSION }} $td/ + # Copy the old stable book to the webroot + cp -r mdbookold/${{ env.OLDSTABLE_VERSION }} $td/ + + # Forward CNAME file + cp CNAME $td/ + mv $td/ bookstodeploy + + - name: Deploy to GH-pages + uses: peaceiris/actions-gh-pages@v3 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./bookstodeploy + force_orphan: true # Refs: https://github.com/rust-lang/crater/blob/9ab6f9697c901c4a44025cf0a39b73ad5b37d198/.github/workflows/bors.yml#L125-L149 # -- cgit v1.2.3 From bf35fa3f15d3cfc63a724eb71697aa7193b9836d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Tj=C3=A4der?= Date: Sat, 4 Mar 2023 00:15:32 +0100 Subject: ci: Split out the actual GHA publish job --- .github/workflows/build.yml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to '.github/workflows') diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 96e1540..c23be68 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -568,6 +568,31 @@ jobs: cp CNAME $td/ mv $td/ bookstodeploy + - name: Archive the webroot + run: | + tar -cf bookstodeploy.tar bookstodeploy + + - name: Store the books + uses: actions/upload-artifact@v3 + with: + name: bookstodeploy + path: bookstodeploy.tar + + ghapages: + name: Publish rtic.rs + runs-on: ubuntu-22.04 + needs: + - deploy + steps: + - name: Download books + uses: actions/download-artifact@v3 + with: + name: bookstodeploy + + - name: Extract the books + run: | + tar -xf bookstodeploy.tar + - name: Deploy to GH-pages uses: peaceiris/actions-gh-pages@v3 with: -- cgit v1.2.3 From eeae3c45688950524e3b3a490317aa717a3080b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Tj=C3=A4der?= Date: Sat, 4 Mar 2023 00:23:13 +0100 Subject: ci: Always parse version, cleanup deps --- .github/workflows/build.yml | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c23be68..23a46e6 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -405,8 +405,8 @@ jobs: path: mdbookold.tar parseversion: - # Only run this when pushing to master branch - if: github.ref == 'refs/heads/master' + name: Parse the master branch RTIC version + runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v3 @@ -434,15 +434,8 @@ jobs: name: If CI passes, merge master branch into release/vX runs-on: ubuntu-22.04 needs: + - ci - parseversion - - formatcheck - - check - - clippy - - checkexamples - - testexamples - - tests - - docs - - mdbook # Only run this when pushing to master branch if: github.ref == 'refs/heads/master' @@ -461,7 +454,6 @@ jobs: name: deploy runs-on: ubuntu-22.04 needs: - - parseversion - mergetostablebranch - docs - mdbookold -- cgit v1.2.3 From c47d3ffd0e7807c08e7d39684461a259a634eb0d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Tj=C3=A4der?= Date: Sat, 4 Mar 2023 00:24:45 +0100 Subject: ci: Use ci-success --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '.github/workflows') diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 23a46e6..21b6ff4 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -434,7 +434,7 @@ jobs: name: If CI passes, merge master branch into release/vX runs-on: ubuntu-22.04 needs: - - ci + - ci-success - parseversion # Only run this when pushing to master branch -- cgit v1.2.3 From 1f0bc841e3efefb44cdc254e36542bebf1cbbbbb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Tj=C3=A4der?= Date: Sat, 4 Mar 2023 00:34:00 +0100 Subject: ci: Remove reference to rtic_channel --- .github/workflows/build.yml | 3 --- 1 file changed, 3 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 21b6ff4..b24ca32 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -264,9 +264,6 @@ jobs: echo rtic lychee --offline --format detailed $td/api/rtic/ - echo rtic_macros - lychee --offline --format detailed $td/api/rtic_channel/ - echo rtic_common lychee --offline --format detailed $td/api/rtic_common/ -- cgit v1.2.3 From 78bdc2940fb789844035bd211906b4aebb2d8fdb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Tj=C3=A4der?= Date: Sat, 4 Mar 2023 00:38:37 +0100 Subject: ci: Building older books can't use new features --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '.github/workflows') diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b24ca32..c8dc35b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -375,7 +375,7 @@ jobs: pushd $src rm -f .cargo/config - cargo doc --features thumbv7-backend || cargo doc --features thumbv7-backend,timer-queue + cargo doc || cargo doc --features timer-queue cp -r target/doc $webroot/$ver/api sed 's|URL|rtic/index.html|g' $webroot/redirect.html > $webroot/$ver/api/index.html popd -- cgit v1.2.3 From f6c73f77d97f9e9e1f0cb7e407887f5002833cfc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Tj=C3=A4der?= Date: Sat, 4 Mar 2023 00:45:08 +0100 Subject: ci: Do not need a copy, move is faster --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '.github/workflows') diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c8dc35b..ee0fad1 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -338,7 +338,7 @@ jobs: - name: Archive the book + API docs run: | - cp -r $td bookroot + mv $td bookroot tar -cf book.tar bookroot - name: Store the Book + API docs -- cgit v1.2.3 From 8e562c77c3fd15aec655ccb63cc0efeadd1b2e8e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Tj=C3=A4der?= Date: Sat, 4 Mar 2023 00:52:24 +0100 Subject: ci: mkbookold: Make sure paths exists for the books --- .github/workflows/build.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to '.github/workflows') diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ee0fad1..9ed4cf7 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -376,6 +376,7 @@ jobs: pushd $src rm -f .cargo/config cargo doc || cargo doc --features timer-queue + mkdir -p $webroot/$ver/book cp -r target/doc $webroot/$ver/api sed 's|URL|rtic/index.html|g' $webroot/redirect.html > $webroot/$ver/api/index.html popd @@ -383,7 +384,7 @@ jobs: for lang in ${langs[@]}; do cargo xtask book build $src/book/$lang - cp -r book/$lang/$book $webroot/$ver/book/$lang + cp -r $src/book/$lang/book $webroot/$ver/book/$lang cp LICENSE-* $webroot/$ver/book/$lang/ done sed 's|URL|book/en|g' $webroot/redirect.html > $webroot/$ver/index.html -- cgit v1.2.3 From 1084b5a3badd1efc99dc601a0fdbd78e45951e86 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Tj=C3=A4der?= Date: Sat, 4 Mar 2023 00:54:53 +0100 Subject: ci: local variables goes out of scope --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '.github/workflows') diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 9ed4cf7..b3c6596 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -335,10 +335,10 @@ jobs: cp -r apidocs/ $td/api lychee --offline --format detailed $td/book/en/ + mv $td bookroot - name: Archive the book + API docs run: | - mv $td bookroot tar -cf book.tar bookroot - name: Store the Book + API docs -- cgit v1.2.3 From 6ff9763a440169d74d49bd14be3a51a86cdd454b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Tj=C3=A4der?= Date: Sat, 4 Mar 2023 00:58:54 +0100 Subject: ci: Redirect file at the root --- .github/workflows/build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b3c6596..e5a9632 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -378,7 +378,7 @@ jobs: cargo doc || cargo doc --features timer-queue mkdir -p $webroot/$ver/book cp -r target/doc $webroot/$ver/api - sed 's|URL|rtic/index.html|g' $webroot/redirect.html > $webroot/$ver/api/index.html + sed 's|URL|rtic/index.html|g' $root/redirect.html > $webroot/$ver/api/index.html popd for lang in ${langs[@]}; do @@ -387,7 +387,7 @@ jobs: cp -r $src/book/$lang/book $webroot/$ver/book/$lang cp LICENSE-* $webroot/$ver/book/$lang/ done - sed 's|URL|book/en|g' $webroot/redirect.html > $webroot/$ver/index.html + sed 's|URL|book/en|g' $root/redirect.html > $webroot/$ver/index.html rm -rf $src done -- cgit v1.2.3 From 775f2d08d3e262e2610f889292780226f9c34625 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Tj=C3=A4der?= Date: Sat, 4 Mar 2023 20:43:29 +0100 Subject: ci: oldbooks simplify --- .github/workflows/build.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e5a9632..184192a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -370,7 +370,8 @@ jobs: for ver in ${vers[@]}; do - src=$(mktemp -d) + mkdir -p src/$ver + src=$root/src/$ver curl -L https://github.com/rtic-rs/rtic/archive/release/v${ver}.tar.gz | tar xz --strip-components 1 -C $src pushd $src @@ -378,15 +379,17 @@ jobs: cargo doc || cargo doc --features timer-queue mkdir -p $webroot/$ver/book cp -r target/doc $webroot/$ver/api + sed 's|URL|rtic/index.html|g' $root/redirect.html > $webroot/$ver/api/index.html popd for lang in ${langs[@]}; do cargo xtask book build $src/book/$lang - + cp -r $src/book/$lang/book $webroot/$ver/book/$lang cp LICENSE-* $webroot/$ver/book/$lang/ done + # using master branch redirect file sed 's|URL|book/en|g' $root/redirect.html > $webroot/$ver/index.html rm -rf $src -- cgit v1.2.3 From d9bf04ae153bed12dad616baf091402930a3c500 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Tj=C3=A4der?= Date: Sat, 4 Mar 2023 20:48:33 +0100 Subject: ci: mdbookold needs mdbook --- .github/workflows/build.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to '.github/workflows') diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 184192a..b031831 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -354,6 +354,16 @@ jobs: - name: Checkout uses: actions/checkout@v3 + - name: Install mdbook + uses: taiki-e/install-action@v2 + with: + tool: mdbook + + - name: Install mdbook-mermaid + uses: taiki-e/install-action@v2 + with: + tool: mdbook-mermaid + - name: Remove cargo-config run: rm -f .cargo/config -- cgit v1.2.3 From 771639c3f6c1faffa673db29c4d10884d3eba5a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Tj=C3=A4der?= Date: Sat, 4 Mar 2023 21:12:44 +0100 Subject: ci: Clearer merge branch job name --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '.github/workflows') diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b031831..b429a28 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -442,7 +442,7 @@ jobs: # # This needs to run before book is built, as bookbuilding fetches from the branch mergetostablebranch: - name: If CI passes, merge master branch into release/vX + name: Merge branch into release/vX when pushing to master runs-on: ubuntu-22.04 needs: - ci-success -- cgit v1.2.3 From e7c6bfe208df739c58a3080d31380381b58b7626 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Tj=C3=A4der?= Date: Sat, 4 Mar 2023 21:14:01 +0100 Subject: ci: mdbookold needs mergetostablebranch --- .github/workflows/build.yml | 1 + 1 file changed, 1 insertion(+) (limited to '.github/workflows') diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b429a28..300bea5 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -349,6 +349,7 @@ jobs: mdbookold: name: build docs and mdbook for older releases + needs: mergetostablebranch runs-on: ubuntu-22.04 steps: - name: Checkout -- cgit v1.2.3