Skip to content
This repository has been archived by the owner on Apr 7, 2022. It is now read-only.

Commit

Permalink
Merge pull request #3 from Nukesor/multi-target-tests
Browse files Browse the repository at this point in the history
Test more targets
  • Loading branch information
Nukesor committed May 2, 2021
2 parents f46f780 + 0eb266c commit 4de22e8
Showing 1 changed file with 46 additions and 6 deletions.
52 changes: 46 additions & 6 deletions .github/workflows/test.yml
Expand Up @@ -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
Expand All @@ -33,30 +68,35 @@ jobs:
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ matrix.toolchain }}
toolchain: stable
override: true
components: rustfmt, clippy

- name: cargo build
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

0 comments on commit 4de22e8

Please sign in to comment.