diff options
Diffstat (limited to '.github/workflows/ci.yml')
-rw-r--r-- | .github/workflows/ci.yml | 42 |
1 files changed, 28 insertions, 14 deletions
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 46f28cda..9c12e669 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -10,21 +10,20 @@ on: workflow_dispatch: pull_request: paths-ignore: - - 'README.md' - - 'docs/**' - - '.github/ISSUE_TEMPLATE/**' + - "README.md" + - "docs/**" + - ".github/ISSUE_TEMPLATE/**" push: branches: - master paths-ignore: - - 'README.md' - - 'docs/**' - - '.github/ISSUE_TEMPLATE/**' - - 'CHANGELOG.md' - - 'CONTRIBUTING.md' + - "README.md" + - "docs/**" + - ".github/ISSUE_TEMPLATE/**" + - "CHANGELOG.md" + - "CONTRIBUTING.md" jobs: - # Check rustfmt rustfmt: runs-on: ${{ matrix.os }} strategy: @@ -44,10 +43,9 @@ jobs: components: rustfmt - uses: Swatinem/rust-cache@v1 - + - run: cargo fmt --all -- --check - # Check clippy. Note that this doesn't check ARM. clippy: runs-on: ${{ matrix.os }} strategy: @@ -69,8 +67,6 @@ jobs: - uses: Swatinem/rust-cache@v1 - # TODO: Can probably put cache here in the future; I'm worried if this will cause issues with clippy though since cargo check breaks it; maybe wait until 1.52, when fix lands. - - run: cargo clippy --all-targets --workspace -- -D warnings # Compile/check/test. @@ -174,6 +170,14 @@ jobs: rust: stable, } + # Risc-V 64gc + - { + os: "ubuntu-latest", + target: "riscv64gc-unknown-linux-gnu", + cross: true, + rust: stable, + } + # macOS ARM - { os: "macOS-latest", @@ -194,12 +198,22 @@ jobs: target: ${{ matrix.triple.target }} - uses: Swatinem/rust-cache@v1 + with: + key: ${{ matrix.triple.target }} - name: Check uses: actions-rs/cargo@v1 with: command: check - args: --all-targets --verbose --target=${{ matrix.triple.target }} --no-default-features + args: --all-targets --verbose --target=${{ matrix.triple.target }} --features "battery" + use-cross: ${{ matrix.triple.cross }} + + - name: Check without battery feature on the main 3 + if: matrix.triple.toTest == 'true' + uses: actions-rs/cargo@v1 + with: + command: check + args: --all-targets --verbose --target=${{ matrix.triple.target }} use-cross: ${{ matrix.triple.cross }} - name: Run tests |