From 05d08c3be577b7359b9e92873e02300d7dbbe6a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Tj=C3=A4der?= Date: Thu, 1 Oct 2020 16:29:55 +0000 Subject: Use latest mdBook --- .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 c687115..0f88c80 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -529,7 +529,7 @@ jobs: - name: mdBook Action uses: peaceiris/actions-mdbook@v1.1.11 with: - mdbook-version: '0.3.1' + mdbook-version: 'latest' - name: Build book in English run: cd book/en && mdbook build -- cgit v1.2.3 From 3fed6a944e73e1a077d218f77c0957cfdd508688 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Tj=C3=A4der?= Date: Mon, 5 Oct 2020 10:07:43 +0000 Subject: Use a full copy of the book instead of symlink --- .github/workflows/build.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 56183c3..b6aed4e 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -586,6 +586,8 @@ jobs: stable=$(git tag | grep "^v" | grep -v "-" | tail -n 1 | cut -c2-4) vers=( 0.5.x 0.4.x ) + echo "Stable version: $stable" + # Create directories td=$(mktemp -d) mkdir -p $td/$devver/book/ @@ -630,8 +632,8 @@ jobs: rm -rf $src done - # Create alias for the stable release - ln -s $stable $td/stable + # Copy the stable book to the stable alias + cp -r $td/$stable $td/stable # Forward CNAME file cp CNAME $td/ -- cgit v1.2.3 From a38952fbd4f972c2016093a852a35aadc479ac72 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Tj=C3=A4der?= Date: Mon, 5 Oct 2020 10:44:57 +0000 Subject: Unable to use git for tags --- .github/workflows/build.yml | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b6aed4e..1d5773e 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -579,13 +579,14 @@ jobs: run: | langs=( en ru ) devver=( dev ) - # Query git for tagged releases, all releases start with "v" - # followed by MAJOR.MINOR.PATCH, see semver.org - # Then remove all pre-releases/tags with hyphens (-). - # The latest release is last, finally trim "v" and PATCH - stable=$(git tag | grep "^v" | grep -v "-" | tail -n 1 | cut -c2-4) + # The latest stable must be the first element in the array vers=( 0.5.x 0.4.x ) + # All releases start with "v" + # followed by MAJOR.MINOR.PATCH, see semver.org + # Retain MAJOR.MINOR as $stable + stable=${vers%.*} + echo "Stable version: $stable" # Create directories -- cgit v1.2.3 From da1b31d95af9557020889917ea8a014091a44418 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Tj=C3=A4der?= Date: Mon, 5 Oct 2020 10:48:20 +0000 Subject: Also update for the deploy stage --- .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 0f88c80..e64381f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -582,8 +582,7 @@ jobs: - name: mdBook Action uses: peaceiris/actions-mdbook@v1.1.11 with: - mdbook-version: '0.3.1' - # mdbook-version: 'latest' + mdbook-version: 'latest' - name: Remove cargo-config run: rm -f .cargo/config -- cgit v1.2.3 From 7261685b7fa3d555c29a4cd9f8dd208d985c182c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Tj=C3=A4der?= Date: Mon, 5 Oct 2020 09:35:07 +0000 Subject: Separate example check and run-pass tests --- .github/workflows/build.yml | 49 ++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 48 insertions(+), 1 deletion(-) (limited to '.github/workflows') diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 1d5773e..e53672b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -85,7 +85,7 @@ jobs: command: check args: --target=${{ matrix.target }} - # Verify all examples + # Verify all examples, checks checkexamples: name: checkexamples runs-on: ubuntu-20.04 @@ -140,6 +140,51 @@ jobs: command: check args: --examples --target=${{ matrix.target }} --features __min_r1_43,${{ env.V7 }} + # Verify the example output with run-pass tests + testexamples: + name: testexamples + runs-on: ubuntu-20.04 + strategy: + matrix: + target: + - thumbv7m-none-eabi + - thumbv6m-none-eabi + toolchain: + - stable + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: Cache cargo dependencies + uses: actions/cache@v2 + with: + path: | + - ~/.cargo/bin/ + - ~/.cargo/registry/index/ + - ~/.cargo/registry/cache/ + - ~/.cargo/git/db/ + key: ${{ runner.OS }}-cargo-${{ hashFiles('**/Cargo.lock') }} + restore-keys: | + ${{ runner.OS }}-cargo-${{ hashFiles('**/Cargo.lock') }} + ${{ runner.OS }}-cargo- + + - name: Cache build output dependencies + uses: actions/cache@v2 + with: + path: target + key: ${{ runner.OS }}-build-${{ hashFiles('**/Cargo.lock') }} + restore-keys: | + ${{ runner.OS }}-build-${{ hashFiles('**/Cargo.lock') }} + ${{ runner.OS }}-build- + + - name: Install Rust ${{ matrix.toolchain }} with target (${{ matrix.target }}) + uses: actions-rs/toolchain@v1 + with: + toolchain: ${{ matrix.toolchain }} + target: ${{ matrix.target }} + override: true + components: llvm-tools-preview + # Use precompiled binutils - name: cargo install cargo-binutils uses: actions-rs/install@v0.1 @@ -657,6 +702,7 @@ jobs: - style - check - checkexamples + - testexamples - checkmacros - testv7 - testv6 @@ -673,6 +719,7 @@ jobs: - style - check - checkexamples + - testexamples - checkmacros - testv7 - testv6 -- cgit v1.2.3 From e17a1fc903c18eb4fcc1d2dd3f86d4ded830f3e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Tj=C3=A4der?= Date: Mon, 5 Oct 2020 18:37:21 +0000 Subject: Run the macro tests --- .github/workflows/build.yml | 54 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) (limited to '.github/workflows') diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e53672b..5a47a75 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -386,6 +386,56 @@ jobs: command: check args: --manifest-path macros/Cargo.toml --target=${{ matrix.target }} + # Run the macros test-suite + testmacros: + name: testmacros + runs-on: ubuntu-20.04 + strategy: + matrix: + target: + - x86_64-unknown-linux-gnu + toolchain: + - stable + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: Cache cargo dependencies + uses: actions/cache@v2 + with: + path: | + - ~/.cargo/bin/ + - ~/.cargo/registry/index/ + - ~/.cargo/registry/cache/ + - ~/.cargo/git/db/ + key: ${{ runner.OS }}-cargo-${{ hashFiles('**/Cargo.lock') }} + restore-keys: | + ${{ runner.OS }}-cargo-${{ hashFiles('**/Cargo.lock') }} + ${{ runner.OS }}-cargo- + + - name: Cache build output dependencies + uses: actions/cache@v2 + with: + path: target + key: ${{ runner.OS }}-build-${{ hashFiles('**/Cargo.lock') }} + restore-keys: | + ${{ runner.OS }}-build-${{ hashFiles('**/Cargo.lock') }} + ${{ runner.OS }}-build- + + - name: Install Rust ${{ matrix.toolchain }} with target (${{ matrix.target }}) + uses: actions-rs/toolchain@v1 + with: + toolchain: ${{ matrix.toolchain }} + target: ${{ matrix.target }} + override: true + + - name: cargo check + uses: actions-rs/cargo@v1 + with: + use-cross: false + command: test + args: --manifest-path macros/Cargo.toml --target=${{ matrix.target }} + # Run test suite for thumbv7m testv7: name: testv7 @@ -586,7 +636,9 @@ jobs: - style - check - checkexamples + - testexamples - checkmacros + - testmacros - testv7 - testv6 - docs @@ -704,6 +756,7 @@ jobs: - checkexamples - testexamples - checkmacros + - testmacros - testv7 - testv6 - docs @@ -721,6 +774,7 @@ jobs: - checkexamples - testexamples - checkmacros + - testmacros - testv7 - testv6 - docs -- cgit v1.2.3