Merge pull request #2504 from containers/dependabot/github_actions/cr… #4330
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: cross | |
on: | |
pull_request: {} | |
push: | |
branches: | |
- main | |
env: | |
CARGO_TERM_COLOR: always | |
TRIPLE: unknown-linux-gnu | |
jobs: | |
build: | |
strategy: | |
fail-fast: false | |
matrix: | |
arch: | |
- x86_64 | |
- i686 | |
- aarch64 | |
- powerpc64le | |
- s390x | |
name: ${{matrix.arch}} | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
- name: Setup Cache | |
uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0 | |
with: | |
path: | | |
~/.cargo/registry | |
~/.cargo/git | |
target | |
key: ${{ runner.os }}-cross-${{matrix.arch}}-${{ 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.arch}}-$TRIPLE:main | |
- name: Build for ${{matrix.arch}} | |
run: cross build -v --target ${{matrix.arch}}-$TRIPLE |