forked from containers/conmon-rs
-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (41 loc) · 1.11 KB
/
cross.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
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@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2
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