-
Notifications
You must be signed in to change notification settings - Fork 45
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #180 from saschagrunert/cross
Fix Windows build and add cross compilation targets to CI
- Loading branch information
Showing
2 changed files
with
49 additions
and
7 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
name: cross | ||
on: | ||
pull_request: {} | ||
push: | ||
branches: | ||
- main | ||
env: | ||
CARGO_TERM_COLOR: always | ||
jobs: | ||
build: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
target: | ||
- x86_64-unknown-linux-gnu | ||
- aarch64-unknown-linux-gnu | ||
- powerpc64le-unknown-linux-gnu | ||
- s390x-unknown-linux-gnu | ||
- x86_64-pc-windows-gnu | ||
- x86_64-unknown-freebsd | ||
- x86_64-pc-solaris | ||
name: ${{matrix.target}} | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Generate lockfile | ||
run: cargo generate-lockfile | ||
- name: Setup Cache | ||
uses: actions/cache@v4 | ||
with: | ||
path: | | ||
~/.cargo/registry | ||
~/.cargo/git | ||
target | ||
key: ${{ runner.os }}-cross-${{matrix.target}}-${{ hashFiles('**/Cargo.lock') }} | ||
- name: Install cross-rs | ||
run: | | ||
cargo install cross --git https://github.com/cross-rs/cross | ||
cross --version | ||
- name: Ensure the latest base image | ||
run: docker pull ghcr.io/cross-rs/${{matrix.target}}:main | ||
- name: Build for ${{matrix.target}} | ||
run: cross build -v --target ${{matrix.target}} |
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