From a199b3058f8c71289531dc777509bcce2bec87f8 Mon Sep 17 00:00:00 2001 From: Maarten de Vries Date: Tue, 9 Apr 2024 15:39:15 +0200 Subject: [PATCH] Enable CI checks for more targets and feature combinations. --- .github/workflows/rust.yml | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 3da8a5a..7948880 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -43,3 +43,38 @@ jobs: with: token: ${{ secrets.GITHUB_TOKEN }} args: --workspace --all-targets + + check_configurations: + name: Check codebase + runs-on: ubuntu-latest + env: + RUSTFLAGS: "-D warnings" + RUSTDOCFLAGS: "-D warnings" + strategy: + matrix: + target: + - "x86_64-unknown-linux-gnu" + - "aarch64-unknown-linux-gnu" + - "x86_64-pc-windows-msvc" + - "x86_64-apple-darwin" + - "x86_64-unknown-freebsd" + - "x86_64-unknown-netbsd" + with-rs4xx: ["", "--features rs4xx"] + with-unix: ["", "--features unix"] + with-windows: ["", "--features windows"] + steps: + - name: Checkout code + uses: actions/checkout@master + - uses: actions/cache@v2 + with: + path: | + ~/.cargo/registry + ~/.cargo/git + target + key: ${{ runner.os }}-cargo-${{ matrix.target }} + - name: Install toolchain + run: rustup target add ${{ matrix.target }} + - name: Check + run: cargo clippy --workspace --all-targets --color=always --target ${{ matrix.target }} ${{ matrix.with-rs4xx }} ${{ matrix.with-unix }} ${{ matrix.with-windows }} + - name: Doc + run: cargo doc --workspace --color=always --target ${{ matrix.target }} ${{ matrix.with-rs4xx }} ${{ matrix.with-unix }} ${{ matrix.with-windows }}