Add more target to test. #52
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Test | |
on: | |
push: | |
branches: [ "master" ] | |
paths-ignore: [ "README.md", "LICENSE" ] | |
pull_request: | |
branches: [ "master" ] | |
paths-ignore: [ "README.md", "LICENSE" ] | |
workflow_dispatch: | |
env: | |
CARGO_TERM_COLOR: always | |
RUST_BACKTRACE: 1 | |
jobs: | |
build: | |
strategy: | |
matrix: | |
config: | |
- { target: x86_64-unknown-linux-gnu, os: ubuntu-latest } | |
- { target: x86_64-unknown-linux-musl, os: ubuntu-latest } | |
- { target: aarch64-unknown-linux-gnu, os: ubuntu-latest } | |
- { target: aarch64-unknown-linux-musl, os: ubuntu-latest } | |
- { target: i686-unknown-linux-gnu, os: ubuntu-latest } | |
- { target: loongarch64-unknown-linux-gnu, os: ubuntu-latest } | |
- { target: loongarch64-unknown-linux-musl, os: ubuntu-latest } | |
- { target: x86_64-pc-windows-msvc, os: windows-latest } | |
- { target: x86_64-pc-windows-gnu, os: windows-latest } | |
- { target: i686-pc-windows-msvc, os: windows-latest } | |
- { target: i686-pc-windows-gnu, os: windows-latest } | |
- { target: aarch64-pc-windows-msvc, os: windows-latest } | |
- { target: aarch64-apple-darwin, os: macos-latest } | |
- { target: x86_64-apple-darwin, os: macos-latest } | |
name: ${{ matrix.config.target }} | |
runs-on: ${{ matrix.config.os }} | |
continue-on-error: true | |
steps: | |
- uses: actions/checkout@v4 | |
- if: matrix.config.target == 'i686-pc-windows-gnu' | |
run: | | |
Invoke-WebRequest -Uri https://github.com/niXman/mingw-builds-binaries/releases/download/14.2.0-rt_v12-rev0/i686-14.2.0-release-posix-dwarf-msvcrt-rt_v12-rev0.7z -OutFile mingw32.7z | |
7z x mingw32.7z -oC:\mingw32 | |
echo "C:\mingw32\mingw32\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 | |
- name: Setup Rust toolchain | |
uses: actions-rust-lang/setup-rust-toolchain@v1 | |
with: | |
toolchain: stable | |
target: ${{ matrix.config.target }} | |
- name: Install cross | |
if: matrix.config.os == 'ubuntu-latest' | |
run: cargo install cross --git https://github.com/cross-rs/cross | |
- name: Test | |
if: matrix.config.os == 'ubuntu-latest' | |
run: | | |
cross test --no-default-features --features ring_backend --target ${{ matrix.config.target }} | |
cross test --no-default-features --features hashes_backend --target ${{ matrix.config.target }} | |
cross test --target ${{ matrix.config.target }} | |
- name: Test | |
if: matrix.config.os != 'ubuntu-latest' | |
run: | | |
cargo test --no-default-features --features ring_backend --target ${{ matrix.config.target }} | |
cargo test --no-default-features --features hashes_backend --target ${{ matrix.config.target }} | |
cargo test --target ${{ matrix.config.target }} |