From 0eb266c03e2b6a7bc268ad06fefe263076866869 Mon Sep 17 00:00:00 2001 From: Arne Beer Date: Sun, 2 May 2021 17:50:18 +0200 Subject: [PATCH] Test more targets --- .github/workflows/test.yml | 52 +++++++++++++++++++++++++++++++++----- 1 file changed, 46 insertions(+), 6 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 337c3d7..e1a7bfd 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -18,12 +18,47 @@ on: jobs: publish: - name: Test on ${{ matrix.os }} for ${{ matrix.toolchain }} + name: Test on ${{ matrix.os }} for ${{ matrix.target }} runs-on: ${{ matrix.os }} strategy: matrix: - os: [ubuntu-latest, windows-latest, macos-latest] - toolchain: [stable, nightly] + target: + - x86_64-unknown-linux-musl + - aarch64-unknown-linux-musl + - armv7-unknown-linux-musleabihf + - arm-unknown-linux-musleabihf + - x86_64-pc-windows-msvc + - x86_64-apple-darwin + #- aarch64-apple-ios + include: + - os: ubuntu-latest + target: x86_64-unknown-linux-musl + cross: true + strip: true + - os: ubuntu-latest + target: aarch64-unknown-linux-musl + cross: true + strip: false + - os: ubuntu-latest + target: armv7-unknown-linux-musleabihf + cross: true + strip: false + - os: ubuntu-latest + target: arm-unknown-linux-musleabihf + cross: true + strip: false + - os: windows-latest + target: x86_64-pc-windows-msvc + cross: false + strip: true + - os: macos-latest + target: x86_64-apple-darwin + cross: false + strip: true + #- os: macos-latest + # target: aarch64-apple-ios + # cross: true + # strip: true steps: - name: Checkout code @@ -33,7 +68,7 @@ jobs: uses: actions-rs/toolchain@v1 with: profile: minimal - toolchain: ${{ matrix.toolchain }} + toolchain: stable override: true components: rustfmt, clippy @@ -41,22 +76,27 @@ jobs: uses: actions-rs/cargo@v1 with: command: build + args: --target=${{ matrix.target }} + use-cross: ${{ matrix.cross }} - name: cargo test uses: actions-rs/cargo@v1 with: command: test + args: --target=${{ matrix.target }} + use-cross: ${{ matrix.cross }} + if: matrix.cross == false - name: cargo fmt uses: actions-rs/cargo@v1 with: command: fmt args: --all -- --check - if: matrix.os == 'ubuntu-latest' && matrix.toolchain == 'stable' + if: matrix.os == 'ubuntu-latest' && matrix.target == 'x86_64-unknown-linux-musl' - name: cargo clippy uses: actions-rs/cargo@v1 - if: matrix.os == 'ubuntu-latest' && matrix.toolchain == 'stable' + if: matrix.os == 'ubuntu-latest' && matrix.target == 'x86_64-unknown-linux-musl' with: command: clippy args: -- -D warnings