1
- # This file defines our primary CI workflow that runs on pull requests
2
- # and also on pushes to special branches (auto, try).
3
- #
4
- # The actual definition of the executed jobs is calculated by a Python
5
- # script located at src/ci/github-actions/calculate-job-matrix.py, which
6
- # uses job definition data from src/ci/github-actions/jobs.yml.
7
- # You should primarily modify the `jobs.yml` file if you want to modify
8
- # what jobs are executed in CI.
9
-
10
1
name : CI
2
+
11
3
on :
12
- push :
13
- branches :
14
- - auto
15
- - try
16
- - try-perf
17
- - automation/bors/try
18
- pull_request :
19
- branches :
20
- - " **"
21
-
22
- permissions :
23
- contents : read
24
- packages : write
25
-
26
- defaults :
27
- run :
28
- # On Linux, macOS, and Windows, use the system-provided bash as the default
29
- # shell. (This should only make a difference on Windows, where the default
30
- # shell is PowerShell.)
31
- shell : bash
32
-
33
- concurrency :
34
- # For a given workflow, if we push to the same branch, cancel all previous builds on that branch.
35
- # We add an exception for try builds (try branch) and unrolled rollup builds (try-perf), which
36
- # are all triggered on the same branch, but which should be able to run concurrently.
37
- group : ${{ github.workflow }}-${{ ((github.ref == 'refs/heads/try' || github.ref == 'refs/heads/try-perf') && github.sha) || github.ref }}
38
- cancel-in-progress : true
39
- env :
40
- TOOLSTATE_REPO : " https://github.com/rust-lang-nursery/rust-toolstate"
41
- # This will be empty in PR jobs.
42
- TOOLSTATE_REPO_ACCESS_TOKEN : ${{ secrets.TOOLSTATE_REPO_ACCESS_TOKEN }}
4
+ workflow_call :
5
+ workflow_dispatch :
6
+
43
7
jobs :
44
8
# The job matrix for `calculate_matrix` is defined in src/ci/github-actions/jobs.yml.
45
9
# It calculates which jobs should be executed, based on the data of the ${{ github }} context.
@@ -76,33 +40,28 @@ jobs:
76
40
CACHE_DOMAIN : ci-caches.rust-lang.org
77
41
continue-on-error : ${{ matrix.continue_on_error || false }}
78
42
strategy :
43
+ fail-fast : false
79
44
matrix :
80
- # Check the `calculate_matrix` job to see how is the matrix defined.
81
- include : ${{ fromJSON(needs.calculate_matrix.outputs.jobs) }}
45
+ include :
46
+ - os : macos-14
47
+ triple : aarch64-apple-darwin
48
+ - os : macos-13
49
+ triple : x86_64-apple-darwin
50
+ - os : buildjet-32vcpu-ubuntu-2004
51
+ triple : x86_64-unknown-linux-gnu
52
+ runs-on : ${{ matrix.os }}
82
53
steps :
83
- - if : contains(matrix.os, 'windows')
84
- uses : msys2/setup-msys2@v2.22.0
54
+ - name : Install Rust
55
+ uses : actions-rs/toolchain@v1
85
56
with :
86
- # i686 jobs use mingw32. x86_64 and cross-compile jobs use mingw64.
87
- msystem : ${{ contains(matrix.name, 'i686') && 'mingw32' || 'mingw64' }}
88
- # don't try to download updates for already installed packages
89
- update : false
90
- # don't try to use the msys that comes built-in to the github runner,
91
- # so we can control what is installed (i.e. not python)
92
- release : true
93
- # Inherit the full path from the Windows environment, with MSYS2's */bin/
94
- # dirs placed in front. This lets us run Windows-native Python etc.
95
- path-type : inherit
96
- install : >
97
- make
57
+ toolchain : stable
58
+ - uses : lukka/get-cmake@v3.27.4
98
59
99
- - name : disable git crlf conversion
100
- run : git config --global core.autocrlf false
101
-
102
- - name : checkout the source code
103
- uses : actions/checkout@v4
60
+ - name : Install Go
61
+ uses : actions/setup-go@v4
104
62
with :
105
- fetch-depth : 2
63
+ go-version : 1.21.4
64
+ check-latest : true
106
65
107
66
# Free up disk space on Linux by removing preinstalled components that
108
67
# we do not need. We do this to enable some of the less resource
@@ -207,23 +166,17 @@ jobs:
207
166
- name : upload artifacts to github
208
167
uses : actions/upload-artifact@v4
209
168
with :
210
- # name is set in previous step
211
- name : ${{ env.DOC_ARTIFACT_NAME }}
212
- path : obj/artifacts/doc
213
- if-no-files-found : ignore
214
- retention-days : 5
215
-
216
- - name : upload artifacts to S3
217
- run : src/ci/scripts/upload-artifacts.sh
218
- env :
219
- AWS_ACCESS_KEY_ID : ${{ env.ARTIFACTS_AWS_ACCESS_KEY_ID }}
220
- AWS_SECRET_ACCESS_KEY : ${{ secrets[format('AWS_SECRET_ACCESS_KEY_{0}', env.ARTIFACTS_AWS_ACCESS_KEY_ID)] }}
221
- # Adding a condition on DEPLOY=1 or DEPLOY_ALT=1 is not needed as all deploy
222
- # builders *should* have the AWS credentials available. Still, explicitly
223
- # adding the condition is helpful as this way CI will not silently skip
224
- # deploying artifacts from a dist builder if the variables are misconfigured,
225
- # erroring about invalid credentials instead.
226
- if : github.event_name == 'push' || env.DEPLOY == '1' || env.DEPLOY_ALT == '1'
169
+ submodules : " recursive"
170
+ path : rust
171
+ fetch-depth : 0
172
+ ref : ${{ github.ref }}
173
+
174
+ - name : Check out succinctlabs/sp1
175
+ uses : actions/checkout@v3
176
+ with :
177
+ repository : succinctlabs/sp1
178
+ ref : dev
179
+ path : sp1
227
180
228
181
- name : upload job metrics to DataDog
229
182
if : needs.calculate_matrix.outputs.run_type != 'pr'
@@ -245,20 +198,46 @@ jobs:
245
198
# !cancelled() executes the job regardless of whether the previous jobs passed or failed
246
199
if : ${{ !cancelled() && contains(fromJSON('["auto", "try"]'), needs.calculate_matrix.outputs.run_type) }}
247
200
steps :
248
- - name : checkout the source code
249
- uses : actions/checkout@v4
201
+ - name : Install Rust
202
+ uses : actions-rs/toolchain@v1
250
203
with :
251
- fetch-depth : 2
252
- # Calculate the exit status of the whole CI workflow.
253
- # If all dependent jobs were successful, this exits with 0 (and the outcome job continues successfully).
254
- # If a some dependent job has failed, this exits with 1.
255
- - name : calculate the correct exit status
256
- run : jq --exit-status 'all(.result == "success" or .result == "skipped")' <<< '${{ toJson(needs) }}'
257
- # Publish the toolstate if an auto build succeeds (just before push to master)
258
- - name : publish toolstate
259
- run : src/ci/publish_toolstate.sh
260
- shell : bash
261
- if : needs.calculate_matrix.outputs.run_type == 'auto'
262
- env :
263
- TOOLSTATE_ISSUES_API_URL : https://api.github.com/repos/rust-lang/rust/issues
264
- TOOLSTATE_PUBLISH : 1
204
+ toolchain : stable
205
+ - uses : lukka/get-cmake@v3.27.4
206
+
207
+ - name : Install Go
208
+ uses : actions/setup-go@v4
209
+ with :
210
+ go-version : 1.21.4
211
+ check-latest : true
212
+
213
+ - name : Show rust version
214
+ run : |
215
+ cargo version
216
+ rustup toolchain list
217
+
218
+ - name : Check out succinctlabs/rust
219
+ uses : actions/checkout@v3
220
+ with :
221
+ submodules : " recursive"
222
+ path : rust
223
+ fetch-depth : 0
224
+ ref : ${{ github.ref }}
225
+
226
+ - name : Check out succinctlabs/sp1
227
+ uses : actions/checkout@v3
228
+ with :
229
+ repository : succinctlabs/sp1
230
+ ref : dev
231
+ path : sp1
232
+
233
+ - name : Build
234
+ run : |
235
+ cd sp1/crates/cli
236
+ GITHUB_ACTIONS=false SP1_BUILD_DIR=$GITHUB_WORKSPACE cargo run --bin cargo-prove -- prove build-toolchain
237
+
238
+ - name : Archive build output
239
+ uses : actions/upload-artifact@v3
240
+ with :
241
+ name : rust-toolchain-aarch64-unknown-linux-gnu
242
+ path : sp1/crates/cli/rust-toolchain-aarch64-unknown-linux-gnu.tar.gz
243
+
0 commit comments