-
Notifications
You must be signed in to change notification settings - Fork 43
53 lines (51 loc) · 1.81 KB
/
Copy pathrust.yml
File metadata and controls
53 lines (51 loc) · 1.81 KB
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
42
43
44
45
46
47
48
49
50
51
52
53
name: Rust
on:
# triggers when a PR is posted
pull_request:
branches:
- "*"
paths-ignore:
- "**.md"
- "**.plantuml"
- "**.svg"
jobs:
build:
runs-on:
group: bottlerocket
labels: bottlerocket_ubuntu-latest_16-core
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0
- run: cargo install cargo-deny --locked
- run: cargo install cargo-make --locked
- uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c
with:
go-version: "^1.18"
# Install `patch`, needed to build `krane-bundle`, and tools for linking against musl
- run: sudo apt-get install -y patch musl-tools musl-dev
- run: rustup target add x86_64-unknown-linux-musl
- run: CARGO_BUILD_TARGET=x86_64-unknown-linux-musl make build
cross-build:
runs-on:
group: bottlerocket
labels: bottlerocket_ubuntu-latest_16-core
strategy:
matrix:
include:
- target: x86_64-unknown-linux-musl
- target: aarch64-unknown-linux-musl
env:
TARGET_TRIPLE: ${{ matrix.target }}
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0
- name: Install Cross
# Pin cargo cross to a version that we know is working for us.
run: |
cargo install cross --git https://github.com/cross-rs/cross/ --rev 7b79041 --locked
- run: |
# cargo-cross warns us that multiple cross configurations are present in our
# workspace (ie dependencies have configurations), but it picks the appropriate one from
# the twoliter workspace.
#
# These warnings cause the tool to fail, so we disable them.
export CROSS_NO_WARNINGS=0
cross build --release --bin twoliter --target "${TARGET_TRIPLE}"