15
15
pull_request :
16
16
branches :
17
17
- main
18
+ workflow_dispatch :
19
+ inputs :
20
+ halt-for-connection :
21
+ description : ' Should this workflow run wait for a remote connection?'
22
+ type : choice
23
+ required : true
24
+ default : ' no'
25
+ options :
26
+ - ' yes'
27
+ - ' no'
18
28
19
29
permissions :
20
30
contents : read # to fetch code
@@ -27,18 +37,17 @@ concurrency:
27
37
jobs :
28
38
lint_and_typecheck :
29
39
runs-on : ubuntu-latest
40
+ container :
41
+ image : index.docker.io/library/python@sha256:f1b2d06ef5b302a63c5e49d7c4842f1e32ce0c94b7d69acece00e31c4a736c53 # ratchet:python:3.12-bookworm
30
42
timeout-minutes : 5
31
43
steps :
32
44
- uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
33
- - name : Set up Python 3.11
34
- uses : actions/setup-python@8d9ed9ac5c53483de85588cdf95a591a75ab9f55 # v5.5.0
35
- with :
36
- python-version : 3.11
37
45
- run : python -m pip install pre-commit
38
- - uses : actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
46
+ - run : git config --global --add safe.directory '*'
47
+ - uses : actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0
39
48
with :
40
49
path : ~/.cache/pre-commit
41
- key : pre-commit-${{ env.pythonLocation }}-${{ hashFiles('.pre-commit-config.yaml', 'setup.py') }}
50
+ key : pre-commit-${{ hashFiles('.pre-commit-config.yaml', 'setup.py') }}
42
51
- run : pre-commit run --show-diff-on-failure --color=always --all-files
43
52
44
53
build :
47
56
name : " build ${{ matrix.name-prefix }} (py ${{ matrix.python-version }} on ubuntu-20.04, x64=${{ matrix.enable-x64}})"
48
57
runs-on : linux-x86-n2-32
49
58
container :
50
- image : index.docker.io/library/ubuntu@sha256:6d8d9799fe6ab3221965efac00b4c34a2bcc102c086a58dff9e19a08b913c7ef # ratchet:ubuntu:20.04
59
+ image : python:${{ matrix.python-version }}-bookworm
51
60
timeout-minutes : 60
52
61
strategy :
53
62
matrix :
@@ -58,26 +67,48 @@ jobs:
58
67
enable-x64 : 1
59
68
prng-upgrade : 1
60
69
num_generated_cases : 1
70
+ # DO_NOT_SUBMIT - running this a lot to try and catch a failure.
71
+ inc : 0
61
72
- name-prefix : " with 3.13"
62
73
python-version : " 3.13"
63
74
enable-x64 : 0
64
75
prng-upgrade : 0
65
76
num_generated_cases : 1
77
+ # DO_NOT_SUBMIT - running this a lot to try and catch a failure.
78
+ - name-prefix : " with 3.10"
79
+ python-version : " 3.10"
80
+ enable-x64 : 1
81
+ prng-upgrade : 1
82
+ num_generated_cases : 1
83
+ inc : 1
84
+ - name-prefix : " with 3.10"
85
+ python-version : " 3.10"
86
+ enable-x64 : 1
87
+ prng-upgrade : 1
88
+ num_generated_cases : 1
89
+ inc : 2
90
+ - name-prefix : " with 3.10"
91
+ python-version : " 3.10"
92
+ enable-x64 : 1
93
+ prng-upgrade : 1
94
+ num_generated_cases : 1
95
+ inc : 3
96
+ - name-prefix : " with 3.10"
97
+ python-version : " 3.10"
98
+ enable-x64 : 1
99
+ prng-upgrade : 1
100
+ num_generated_cases : 1
101
+ inc : 4
66
102
steps :
67
103
- uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
68
- - name : Image Setup
69
- run : |
70
- apt update
71
- apt install -y libssl-dev
72
- - name : Set up Python ${{ matrix.python-version }}
73
- uses : actions/setup-python@8d9ed9ac5c53483de85588cdf95a591a75ab9f55 # v5.5.0
74
- with :
75
- python-version : ${{ matrix.python-version }}
76
104
- name : Install dependencies
77
105
run : |
78
106
pip install uv~=0.5.30
79
107
uv pip install --system .[minimum-jaxlib] -r build/test-requirements.txt
80
-
108
+ - name : Wait For Connection
109
+ uses : google-ml-infra/actions/ci_connection@main
110
+ with :
111
+ halt-dispatch-input : ${{ inputs.halt-for-connection }}
81
112
- name : Run tests
82
113
env :
83
114
JAX_NUM_GENERATED_CASES : ${{ matrix.num_generated_cases }}
@@ -102,15 +133,13 @@ jobs:
102
133
name : Documentation - test code snippets
103
134
runs-on : ubuntu-latest
104
135
timeout-minutes : 10
136
+ container :
137
+ image : python:${{ matrix.python-version }}-bookworm
105
138
strategy :
106
139
matrix :
107
140
python-version : ['3.10']
108
141
steps :
109
142
- uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
110
- - name : Set up Python ${{ matrix.python-version }}
111
- uses : actions/setup-python@8d9ed9ac5c53483de85588cdf95a591a75ab9f55 # v5.5.0
112
- with :
113
- python-version : ${{ matrix.python-version }}
114
143
- name : Install dependencies
115
144
run : |
116
145
pip install uv~=0.5.30
@@ -130,21 +159,12 @@ jobs:
130
159
name : Documentation - render documentation
131
160
runs-on : linux-x86-n2-16
132
161
container :
133
- image : index.docker.io/library/ubuntu@sha256:6d8d9799fe6ab3221965efac00b4c34a2bcc102c086a58dff9e19a08b913c7ef # ratchet:ubuntu:20.04
134
- timeout-minutes : 10
162
+ image : python:${{ matrix.python-version }}-bookworm
135
163
strategy :
136
164
matrix :
137
165
python-version : ['3.10']
138
166
steps :
139
167
- uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
140
- - name : Image Setup
141
- run : |
142
- apt update
143
- apt install -y libssl-dev libsqlite3-dev build-essential
144
- - name : Set up Python ${{ matrix.python-version }}
145
- uses : actions/setup-python@8d9ed9ac5c53483de85588cdf95a591a75ab9f55 # v5.5.0
146
- with :
147
- python-version : ${{ matrix.python-version }}
148
168
- name : Install dependencies
149
169
run : |
150
170
pip install uv~=0.5.30
@@ -156,6 +176,8 @@ jobs:
156
176
jax2tf_test :
157
177
name : " jax2tf_test (py ${{ matrix.python-version }} on ${{ matrix.os }}, x64=${{ matrix.enable-x64}})"
158
178
runs-on : ${{ matrix.os }}
179
+ container :
180
+ image : python:${{ matrix.python-version }}-bookworm
159
181
timeout-minutes : 30
160
182
strategy :
161
183
matrix :
@@ -167,10 +189,6 @@ jobs:
167
189
num_generated_cases : 10
168
190
steps :
169
191
- uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
170
- - name : Set up Python ${{ matrix.python-version }}
171
- uses : actions/setup-python@8d9ed9ac5c53483de85588cdf95a591a75ab9f55 # v5.5.0
172
- with :
173
- python-version : ${{ matrix.python-version }}
174
192
- name : Install dependencies
175
193
run : |
176
194
pip install uv~=0.5.30
@@ -200,10 +218,6 @@ jobs:
200
218
timeout-minutes : 30
201
219
steps :
202
220
- uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
203
- - name : Set up Python
204
- uses : actions/setup-python@8d9ed9ac5c53483de85588cdf95a591a75ab9f55 # v5.5.0
205
- with :
206
- python-version : 3.12
207
221
- name : Install JAX
208
222
run : |
209
223
pip install uv~=0.5.30
0 commit comments