Skip to content

Commit 0eba4e2

Browse files
author
Devdutt Shenoi
authored
ci: build for all release targets to ensure PRs are compatible (#1112)
--------- Signed-off-by: Devdutt Shenoi <[email protected]>
1 parent fdcf690 commit 0eba4e2

File tree

1 file changed

+76
-0
lines changed

1 file changed

+76
-0
lines changed

.github/workflows/build.yaml

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
on:
2+
pull_request:
3+
paths-ignore:
4+
- "docs/**"
5+
- "helm/**"
6+
- "assets/**"
7+
- "**.md"
8+
push:
9+
branches:
10+
- main
11+
12+
name: Ensure parseable builds on all release targets
13+
jobs:
14+
build-linux:
15+
name: Build for ${{matrix.target}}
16+
runs-on: ubuntu-latest
17+
strategy:
18+
fail-fast: false
19+
matrix:
20+
target:
21+
- aarch64-unknown-linux-gnu # linux(arm)
22+
- x86_64-unknown-linux-gnu # linux(64 bit)
23+
24+
steps:
25+
- uses: actions/checkout@v2
26+
27+
- uses: actions-rs/toolchain@v1
28+
with:
29+
toolchain: stable
30+
profile: minimal # minimal component installation (ie, no documentation)
31+
target: ${{ matrix.target }}
32+
override: true
33+
34+
- uses: actions-rs/cargo@v1
35+
with:
36+
use-cross: true
37+
command: build
38+
args: --target ${{matrix.target}}
39+
40+
build-windows:
41+
name: Build for windows
42+
runs-on: windows-latest
43+
44+
steps:
45+
- uses: actions/checkout@v2
46+
47+
- uses: actions-rs/toolchain@v1
48+
with:
49+
toolchain: stable
50+
profile: minimal # minimal component installation (ie, no documentation)
51+
default: true
52+
override: true
53+
54+
- name: Build on windows
55+
run: cargo build --target x86_64-pc-windows-msvc
56+
57+
build-macos:
58+
name: Build for ${{matrix.target}}
59+
runs-on: macos-latest
60+
strategy:
61+
matrix:
62+
target:
63+
- aarch64-apple-darwin # macos(arm)
64+
- x86_64-apple-darwin # macos(intel 64 bit)
65+
66+
steps:
67+
- uses: actions/checkout@v2
68+
- uses: actions-rs/toolchain@v1
69+
with:
70+
toolchain: stable
71+
profile: minimal
72+
target: ${{ matrix.target }}
73+
override: true
74+
75+
- name: Build on ${{ matrix.target }}
76+
run: cargo build --target ${{ matrix.target }}

0 commit comments

Comments
 (0)