-
Notifications
You must be signed in to change notification settings - Fork 516
65 lines (62 loc) · 2.52 KB
/
weekly.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
# This is basically a duplicate of the main "build" workflow, but uses GOPROXY=direct
# to try to catch errors close to their introduction due to yanked Go modules. These
# could otherwise be covered up by caching and not discovered until much later when
# bypassing the main cache.
name: Weekly
on:
schedule:
# Run Monday at 02:15 UTC. Randomly chosen as a "quiet" time for this to run.
# See syntax for format details: https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#onschedule
- cron: '15 2 * * 1'
env:
# When Go packages are built, buildsys will vendor in dependent Go code for
# that package and bundle it up in a tarball. This env variable is consumed
# and used to configure Go to directly download code from its upstream source.
# This is a useful early signal during GitHub actions to see if there are
# upstream Go code problems.
GOPROXY: direct
jobs:
list-variants:
# This needs to be its own job since the build job needs its output before
# it can initialize
if: github.repository == 'bottlerocket-os/bottlerocket'
name: "Determine variants"
runs-on: ubuntu-latest
outputs:
variants: ${{ steps.get-variants.outputs.variants }}
aarch-enemies: ${{ steps.get-variants.outputs.aarch-enemies }}
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/list-variants
id: get-variants
build:
needs: list-variants
runs-on:
group: bottlerocket
labels: bottlerocket_ubuntu-latest_32-core
continue-on-error: false
strategy:
matrix:
variant: ${{ fromJson(needs.list-variants.outputs.variants) }}
arch: [x86_64, aarch64]
exclude: ${{ fromJson(needs.list-variants.outputs.aarch-enemies) }}
fail-fast: false
name: "Build ${{ matrix.variant }}-${{ matrix.arch }}"
steps:
- uses: actions/checkout@v4
- name: Preflight step to set up the runner
uses: ./.github/actions/setup-node
- 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 }} \
-e BUILDSYS_ARCH=${{ matrix.arch }} \
-e BUILDSYS_JOBS=12 \
-e BUILDSYS_UPSTREAM_LICENSE_FETCH="${{ contains(matrix.variant, 'nvidia') }}"