-
Notifications
You must be signed in to change notification settings - Fork 394
Expand file tree
/
Copy pathrelease-testing.yml
More file actions
148 lines (137 loc) · 4.53 KB
/
release-testing.yml
File metadata and controls
148 lines (137 loc) · 4.53 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
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
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
name: Release Testing
on:
push:
branches:
- "hotfix-*"
- "rc--*"
workflow_dispatch:
# new commits interrupt any running workflow on the same branch
concurrency:
group: ${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
pull-requests: read
env:
CI_COMMIT_SHA: ${{ github.sha }}
CI_JOB_NAME: ${{ github.job }}
CI_PROJECT_DIR: ${{ github.workspace }}
BRANCH_NAME: ${{ github.event.workflow_run.head_branch || github.ref_name }}
CI_RUN_ID: ${{ github.run_id }}
anchors:
image: &image
image: ghcr.io/dfinity/ic-build@sha256:a5edec0ae2b045ef86bc957f9a3155a360edc2a273a700eabd0670dc489d809c
dind-large-setup: &dind-large-setup
runs-on:
labels: dind-large
container:
<<: *image
options: >-
-e NODE_NAME --privileged --cgroupns host
timeout-minutes: 180 # 3 hours
checkout: &checkout
name: Checkout
uses: actions/checkout@v4
with:
ref: ${{ github.event.workflow_run.head_branch }}
jobs:
ci-main:
name: CI Main
uses: ./.github/workflows/ci-main.yml
secrets: inherit
# Run some extra system tests that are skipped on CI Main.
# Those test suites would overwhelm a runner, so each is run
# as a separate job.
release-system-tests:
name: Release System Tests
<<: *dind-large-setup
steps:
- <<: *checkout
- name: Run Bazel System Tests
uses: ./.github/actions/bazel
with:
run: |
bazel test \
--config=stamped \
--config=flaky_retry \
--test_tag_filters=system_test_large \
//rs/tests/... \
--keep_going
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
dependency-scan-release-cut:
name: Dependency Scan for Release
<<: *dind-large-setup
timeout-minutes: 60
env:
SHELL_WRAPPER: "/usr/bin/time"
CI_PROJECT_PATH: ${{ github.repository }}
CI_PIPELINE_ID: ${{ github.run_id }}
CI_COMMIT_SHA: ${{ github.sha }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
JIRA_API_TOKEN: ${{ secrets.JIRA_API_TOKEN }}
SLACK_PSEC_BOT_OAUTH_TOKEN: ${{ secrets.SLACK_PSEC_BOT_OAUTH_TOKEN }}
REPO_NAME: ${{ github.repository }}
steps:
- <<: *checkout
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Setup python deps
id: setup-python-deps
shell: bash
run: |
# Ignore externally-managed-environment pip error, install packages system-wide.
PIP_BREAK_SYSTEM_PACKAGES=1 pip3 install --ignore-installed -r requirements.txt
- name: Dependency Scan for Release
id: dependency-scan-release-cut
shell: bash
run: |
set -euo pipefail
export PYTHONPATH=$PWD/ci/src:$PWD/ci/src/dependencies
cd ci/src/dependencies/
$SHELL_WRAPPER python3 job/bazel_rust_ic_scanner_release_job.py
setup-guest-os-qualification:
name: Setting up guest os qualification pipeline
<<: *dind-large-setup
outputs:
matrix: ${{ steps.generate.outputs.output }}
steps:
- name: Sparse checkout
uses: actions/checkout@v4
with:
ref: ${{ github.event.workflow_run.head_branch }}
sparse-checkout: ".github/scripts/determine-initial-guest-os-versions.py"
- id: generate
name: Fetch beginning versions for qualification
shell: bash
run: |
set -euo pipefail
OUTPUT=$(python .github/scripts/determine-initial-guest-os-versions.py)
echo "output=$OUTPUT" >> $GITHUB_OUTPUT
guest-os-qualification:
name: Qualifying ${{ matrix.version }} -> ${{ github.sha }}
needs: setup-guest-os-qualification
strategy:
matrix: ${{ fromJson(needs.setup-guest-os-qualification.outputs.matrix) }}
<<: *dind-large-setup
steps:
- <<: *checkout
- name: Run qualification for version ${{ matrix.version }} from the tip of the branch
uses: ./.github/actions/bazel
with:
run: |
bazel test \
--config=stamped \
--config=flaky_retry \
--test_tag_filters= \
//rs/tests/dre:guest_os_qualification \
--test_env=OLD_VERSION=${{ matrix.version }} \
--keep_going --test_timeout=7200
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
repro-check:
name: Repro check for ${{ github.sha }}
uses: ./.github/workflows/repro-check.yml
needs: [ci-main]
with:
github_sha: ${{ github.sha }}