aboutsummaryrefslogtreecommitdiff
path: root/.github
diff options
context:
space:
mode:
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/build.yml237
1 files changed, 62 insertions, 175 deletions
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index fc07519..d69740b 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -6,6 +6,8 @@ on:
- master
- staging
- trying
+ - bors/staging
+ - bors/trying
env:
CARGO_TERM_COLOR: always
@@ -17,7 +19,7 @@ jobs:
runs-on: ubuntu-20.04
steps:
- name: Checkout
- uses: actions/checkout@v1
+ uses: actions/checkout@v2
- name: Install Rust
uses: actions-rs/toolchain@v1
@@ -52,28 +54,6 @@ jobs:
- 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:
@@ -84,6 +64,9 @@ jobs:
- name: Fail on warnings
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@v1
+
- name: cargo check
uses: actions-rs/cargo@v1
with:
@@ -91,6 +74,33 @@ jobs:
command: check
args: --target=${{ matrix.target }}
+ # Clippy
+ clippy:
+ name: Cargo clippy
+ runs-on: ubuntu-20.04
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v2
+
+ - name: Install Rust stable
+ uses: actions-rs/toolchain@v1
+ with:
+ toolchain: stable
+ target: x86_64-unknown-linux-gnu
+ override: true
+
+ - name: Fail on warnings
+ 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@v1
+
+ - name: cargo clippy
+ uses: actions-rs/cargo@v1
+ with:
+ use-cross: false
+ command: clippy
+
# Verify all examples, checks
checkexamples:
name: checkexamples
@@ -106,28 +116,6 @@ jobs:
- 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:
@@ -136,8 +124,10 @@ jobs:
override: true
components: llvm-tools-preview
+ - name: Cache Dependencies
+ uses: Swatinem/rust-cache@v1
+
- name: Check the examples
- if: matrix.target == 'thumbv7m-none-eabi'
uses: actions-rs/cargo@v1
with:
use-cross: false
@@ -159,28 +149,6 @@ jobs:
- 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:
@@ -197,6 +165,9 @@ jobs:
version: latest
use-tool-cache: true
+ - name: Cache Dependencies
+ uses: Swatinem/rust-cache@v1
+
- name: Install QEMU
run: |
sudo apt update
@@ -223,28 +194,6 @@ jobs:
- 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:
@@ -252,6 +201,9 @@ jobs:
target: ${{ matrix.target }}
override: true
+ - name: Cache Dependencies
+ uses: Swatinem/rust-cache@v1
+
- name: Fail on warnings
run: sed -i 's,//deny_warnings_placeholder_for_ci,#![deny(warnings)],' src/lib.rs macros/src/lib.rs
@@ -266,45 +218,20 @@ jobs:
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 }})
+ - name: Install Rust
uses: actions-rs/toolchain@v1
with:
- toolchain: ${{ matrix.toolchain }}
- target: ${{ matrix.target }}
+ toolchain: stable
+ target: x86_64-unknown-linux-gnu
override: true
+ - name: Cache Dependencies
+ uses: Swatinem/rust-cache@v1
+
- name: Fail on warnings
run: sed -i 's,//deny_warnings_placeholder_for_ci,#![deny(warnings)],' src/lib.rs macros/src/lib.rs
@@ -313,84 +240,43 @@ jobs:
with:
use-cross: false
command: test
- args: --manifest-path macros/Cargo.toml --target=${{ matrix.target }}
+ args: --manifest-path macros/Cargo.toml
- # Run test suite for thumbv7m
+ # Run test suite
tests:
name: tests
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-
-
- - name: Cache build output dependencies
- uses: actions/cache@v2
- with:
- path: target
- key: ${{ runner.OS }}-build-${{ hashFiles('**/Cargo.lock') }}
- restore-keys: |
- ${{ runner.OS }}-build-
-
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
- toolchain: ${{ matrix.toolchain }}
- target: ${{ matrix.target }}
+ toolchain: stable
+ target: x86_64-unknown-linux-gnu
override: true
+ - name: Cache Dependencies
+ uses: Swatinem/rust-cache@v1
+
+ - name: Fail on warnings
+ run: sed -i 's,//deny_warnings_placeholder_for_ci,#![deny(warnings)],' src/lib.rs macros/src/lib.rs
+
- uses: actions-rs/cargo@v1
with:
use-cross: false
command: test
- args: --test tests --target=${{ matrix.target }}
+ args: --test tests
# Build documentation, check links
docs:
name: docs
runs-on: ubuntu-20.04
-
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-
-
- - name: Cache build output dependencies
- uses: actions/cache@v2
- with:
- path: target
- key: ${{ runner.OS }}-build-${{ hashFiles('**/Cargo.lock') }}
- restore-keys: |
- ${{ runner.OS }}-build-
-
- name: Cache pip installed linkchecker
uses: actions/cache@v2
with:
@@ -453,7 +339,7 @@ jobs:
run: pip install git+https://github.com/linkchecker/linkchecker.git
- name: mdBook Action
- uses: peaceiris/actions-mdbook@v1.1.13
+ uses: peaceiris/actions-mdbook@v1
with:
mdbook-version: 'latest'
@@ -509,7 +395,7 @@ jobs:
run: python -c "import sys; print(sys.version)"
- name: mdBook Action
- uses: peaceiris/actions-mdbook@v1.1.13
+ uses: peaceiris/actions-mdbook@v1
with:
mdbook-version: 'latest'
@@ -610,6 +496,7 @@ jobs:
needs:
- style
- check
+ - clippy
- checkexamples
- testexamples
- checkmacros