forked from bottlerocket-os/bottlerocket
-
Notifications
You must be signed in to change notification settings - Fork 0
101 lines (100 loc) · 3.29 KB
/
build.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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
name: Build
on:
pull_request:
branches: [develop]
# Here we list file types that don't affect the build and don't need to use
# up our Actions runners.
paths-ignore:
# draw.io (diagrams.net) files, the source of png images for docs
- '**.drawio'
# Example configuration files
- '**.example'
# Markdown documentation
- '**.md'
# Images for documentation
- '**.png'
# Templates for README files
- '**.tpl'
# Sample config files and OpenAPI docs
- '**.yaml'
jobs:
build:
runs-on: [self-hosted, linux, x64]
continue-on-error: ${{ matrix.supported }}
strategy:
matrix:
variant: [aws-k8s-1.19, aws-k8s-1.20, aws-k8s-1.21, aws-k8s-1.22, aws-ecs-1]
arch: [x86_64, aarch64]
supported: [true]
fetch-upstream: ["false"]
include:
- variant: aws-dev
arch: x86_64
supported: false
fetch-upstream: "false"
- variant: vmware-dev
arch: x86_64
supported: false
fetch-upstream: "false"
- variant: metal-dev
arch: x86_64
supported: false
fetch-upstream: "false"
- variant: metal-k8s-1.21
arch: x86_64
supported: false
fetch-upstream: "false"
- variant: metal-k8s-1.22
arch: x86_64
supported: false
fetch-upstream: "false"
- variant: vmware-k8s-1.20
arch: x86_64
supported: true
fetch-upstream: "false"
- variant: vmware-k8s-1.21
arch: x86_64
supported: true
fetch-upstream: "false"
- variant: vmware-k8s-1.22
arch: x86_64
supported: true
fetch-upstream: "false"
- variant: aws-k8s-1.21-nvidia
arch: x86_64
supported: true
fetch-upstream: "true"
- variant: aws-k8s-1.21-nvidia
arch: aarch64
supported: true
fetch-upstream: "true"
- variant: aws-k8s-1.22-nvidia
arch: x86_64
supported: true
fetch-upstream: "true"
- variant: aws-k8s-1.22-nvidia
arch: aarch64
supported: true
fetch-upstream: "true"
fail-fast: false
steps:
- uses: actions/checkout@v3
- run: rustup toolchain install 1.58.1 && rustup default 1.58.1
- run: cargo install --version 0.35.8 cargo-make
- if: contains(matrix.variant, 'nvidia')
run: |
cat <<-EOF > Licenses.toml
[nvidia]
spdx-id = "LICENSE-LicenseRef-NVIDIA-Customer"
licenses = [
{ path = "NVIDIA", license-url = "https://www.nvidia.com/en-us/drivers/nvidia-license/" }
]
EOF
- run: cargo make -e BUILDSYS_VARIANT=${{ matrix.variant }} unit-tests
- run: cargo make -e BUILDSYS_VARIANT=${{ matrix.variant }} check-fmt
- run: |
cargo make -e BUILDSYS_VARIANT=${{ matrix.variant }} \
-e BUILDSYS_ARCH=${{ matrix.arch }} \
-e BUILDSYS_JOBS=12 \
-e BUILDSYS_UPSTREAM_SOURCE_FALLBACK=${{ matrix.fetch-upstream }} \
-e BUILDSYS_UPSTREAM_LICENSE_FETCH=${{ matrix.fetch-upstream }}