-
Notifications
You must be signed in to change notification settings - Fork 13
130 lines (110 loc) · 3.86 KB
/
main.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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
name: CI
on:
push:
branches:
- "main"
pull_request:
schedule:
- cron: '0 12 * * *' # daily at 12:00 UTC
# Cancel pending jobs on push.
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#example-using-concurrency-to-cancel-any-in-progress-job-or-run
concurrency:
group: ${{ github.workflow }}.${{ github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
# Recommended here: https://github.com/bazelbuild/bazelisk/issues/88#issuecomment-625178467
env:
BAZELISK_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
OPAL_RPC_CREDENTIALS: ${{ secrets.OPAL_RPC_CREDENTIALS }}
jobs:
test-matrix:
runs-on:
- self-hosted
- "os=${{ matrix.os }}"
- "arch=${{ matrix.arch }}"
- "os_distribution=${{ matrix.os_distribution }}"
- "os_version=${{ matrix.os_version }}"
- "revision=${{ matrix.revision }}"
timeout-minutes: 10
strategy:
fail-fast: false
matrix:
include:
- os: macos
arch: arm64
os_distribution: sonoma
os_version: "14"
revision: dd17e52a1f04529abb97003e8093d356739980d7
remote_execution: 'false'
- os: macos
arch: arm64
os_distribution: sonoma
os_version: "14"
revision: dd17e52a1f04529abb97003e8093d356739980d7
remote_execution: 'true'
steps:
- uses: actions/checkout@v4
- name: Set up authentication
shell: bash
run: cp infra/bazelrc .bazelrc.user
- name: Generate python requirements lock
shell: bash
run: bazel run //python:requirements.update
- name: Build and test
env:
ARCH: ${{ matrix.arch }}
OS: ${{ matrix.os }}
REMOTE_EXECUTION: ${{ matrix.remote_execution }}
run: python3 infra/test-all.py
ci-runners-test-matrix:
runs-on:
- self-hosted
- "os=linux"
- "arch=x64"
- "remote_execution=${{ matrix.remote_execution }}"
- "engflow-container-image=docker://645088952840.dkr.ecr.eu-west-1.amazonaws.com/engflow-ci/debian11-dind-x64@sha256:a0f386162b6498b9220a33f33f158fd175d2873ddd6ed30ca67aa33915850e1e"
- "engflow-pool=ci_sysbox_x64"
- "engflow-runtime=sysbox-runc"
- "engflow-runner-id=${{ github.repository_id }}_ci-runners-test-matrix_${{ github.run_id }}_${{ github.run_number }}_${{ github.run_attempt }}"
timeout-minutes: 10
strategy:
fail-fast: false
matrix:
include:
- remote_execution: 'false'
- remote_execution: 'true'
steps:
- uses: actions/checkout@v3
- name: Set up authentication
shell: bash
run: cp infra/bazelrc .bazelrc.user
- name: Generate python requirements lock
shell: bash
run: bazel run //python:requirements.update
- name: Build and test
env:
ARCH: x64
OS: linux
REMOTE_EXECUTION: ${{ matrix.remote_execution }}
run: python3 infra/test-all.py
buck2-test:
runs-on:
- self-hosted
- "os=linux"
- "arch=x64"
- "engflow-container-image=docker://645088952840.dkr.ecr.eu-west-1.amazonaws.com/engflow-ci/debian11-dind-x64@sha256:a0f386162b6498b9220a33f33f158fd175d2873ddd6ed30ca67aa33915850e1e"
- "engflow-pool=ci_sysbox_x64"
- "engflow-runtime=sysbox-runc"
- "engflow-runner-id=${{ github.repository_id }}_buck2-test_${{ github.run_id }}_${{ github.run_number }}_${{ github.run_attempt }}"
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
- name: Set up Buck2 binary
shell: bash
run: infra/setup-buck2.sh
- name: Set up authentication
shell: bash
run: infra/auth-buck2.sh
- name: Build and test
shell: bash
run: infra/test-buck2.sh