sd/.github/workflows/test.yml
Danny Moesch 71cb0d834a Remove macOS Aarch64 target
This target requires cross-compilation on the default (x86_64) `macos-latest`
platform. However, `cross` does [not yet](https://github.com/rust-embedded/cross/issues/508)
provide the right target. If tests can be skipped a build solution outside
of `cross` is already discussed [here](https://github.com/BurntSushi/ripgrep/issues/1737).
2021-03-19 18:36:58 +01:00

61 lines
1.4 KiB
YAML

name: Test
on: [pull_request]
jobs:
test:
name: ${{ matrix.target }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- os: ubuntu-latest
target: x86_64-unknown-linux-gnu
use-cross: false
- os: ubuntu-latest
target: x86_64-unknown-linux-musl
use-cross: false
- os: ubuntu-latest
target: arm-unknown-linux-gnueabihf
use-cross: true
- os: windows-latest
target: x86_64-pc-windows-msvc
use-cross: false
- os: macos-latest
target: x86_64-apple-darwin
use-cross: false
steps:
- name: Checkout repository
uses: actions/checkout@v2
with:
fetch-depth: 1
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
override: true
target: ${{ matrix.target }}
- name: Create .cargo/config.toml
if: ${{ matrix.use-cross == true }}
shell: bash
run: |
mkdir .cargo
cat > .cargo/config.toml <<EOF
[target.${{ matrix.target }}]
rustflags = ["--cfg", "sd_cross_compile"]
EOF
- name: Test
uses: actions-rs/cargo@v1
with:
use-cross: ${{ matrix.use-cross }}
command: test
args: --target ${{ matrix.target }}