added cross crate in workflow to do multi-compile more easy
This commit is contained in:
14
.github/workflows/rust.yml
vendored
14
.github/workflows/rust.yml
vendored
@@ -33,20 +33,22 @@ jobs:
|
|||||||
args: --all-targets -- -D warnings
|
args: --all-targets -- -D warnings
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
- name: Setup Cross Compile Environment
|
- name: Setup Cross Compile Environment
|
||||||
run: rustup target add x86_64-unknown-linux-musl x86_64-pc-windows-msvc aarch64-apple-darwin x86_64-apple-darwin
|
run: |
|
||||||
|
cargo install cross
|
||||||
|
rustup target add x86_64-unknown-linux-musl x86_64-pc-windows-msvc aarch64-apple-darwin x86_64-apple-darwin
|
||||||
- name: Linux gnu Build
|
- name: Linux gnu Build
|
||||||
run: cargo build --verbose
|
run: cargo build --verbose
|
||||||
- name: x86-64-windows(msvc) Build
|
- name: x86-64-windows(msvc) Build
|
||||||
run: cargo check --verbose --target x86_64-pc-windows-msvc
|
run: cross build --verbose --target x86_64-pc-windows-msvc
|
||||||
- name: m1 mac Build
|
- name: m1 mac Build
|
||||||
run: cargo check --verbose --target aarch64-apple-darwin
|
run: cross build --verbose --target aarch64-apple-darwin
|
||||||
- name: Intel mac Build
|
- name: Intel mac Build
|
||||||
run: cargo check --verbose --target x86_64-apple-darwin
|
run: cross build --verbose --target x86_64-apple-darwin
|
||||||
- name: i686-windows(msvc) Build
|
- name: i686-windows(msvc) Build
|
||||||
run: cargo check --verbose --target i686-pc-windows-msvc
|
run: cross build --verbose --target i686-pc-windows-msvc
|
||||||
- name: musl build prepare
|
- name: musl build prepare
|
||||||
run: sudo apt install musl-gcc
|
run: sudo apt install musl-gcc
|
||||||
- name: Linux musl Build
|
- name: Linux musl Build
|
||||||
run: cargo check --verbose --target x86_64-unknown-linux-musl
|
run: cross build --verbose --target x86_64-unknown-linux-musl
|
||||||
- name: Run tests
|
- name: Run tests
|
||||||
run: RUST_TEST_THREADS=1 cargo test --verbose
|
run: RUST_TEST_THREADS=1 cargo test --verbose
|
||||||
Reference in New Issue
Block a user