Skip to content

Commit

Permalink
Add CI to test cross compilation
Browse files Browse the repository at this point in the history
  • Loading branch information
ogxd committed May 17, 2024
1 parent d97a06b commit 4f3c532
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 2 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/cross_compile.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Cross Compile

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

env:
CARGO_TERM_COLOR: always

jobs:

build:
name: Build All
runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
target:
- "aarch64-apple-darwin"
- "i686-unknown-linux-gnu"
- "x86_64-unknown-linux-gnu"
- "x86_64-unknown-linux-musl"
- "x86_64-windows-gnu"

steps:
- uses: actions/checkout@v3

- name: Build
run: cargo build --release --all-targets --target ${{ matrix.target }}

- name: Build Hybrid
run: cargo build --release --all-targets --features hybrid --target ${{ matrix.target }}
3 changes: 1 addition & 2 deletions .github/workflows/rust_version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,4 @@ jobs:
run: rustup toolchain install ${{ matrix.version }}

- name: Build
# RUSTFLAGS="-C target-cpu=native --cfg hybrid"
run: RUSTFLAGS="-C target-cpu=native" cargo +${{ matrix.version }} build --release
run: cargo +${{ matrix.version }} build --release

0 comments on commit 4f3c532

Please sign in to comment.