11name : Continuous integration
22
33on :
4+ pull_request :
5+ workflow_dispatch :
46 push :
57 tags :
6- - ' [0-9]+.[0-9]+.[0-9]+-avs\ .[0-9]+'
8+ - ' [0-9]+.[0-9]+.[0-9]+-avs.[0-9]+'
79
810jobs :
911 boringssl_clone :
1012 # This step ensures that all builders have the same version of BoringSSL
11- runs-on : ubuntu-latest
13+ runs-on : ubuntu-22.04
1214
1315 steps :
1416 - name : Clone BoringSSL repo
@@ -17,32 +19,55 @@ jobs:
1719 echo Using BoringSSL commit: $(cd "${{ runner.temp }}/boringssl"; git rev-parse HEAD)
1820
1921 - name : Archive BoringSSL source
20- uses : actions/upload-artifact@v1
22+ uses : actions/upload-artifact@v4
2123 with :
2224 name : boringssl-source
2325 path : ${{ runner.temp }}/boringssl
26+ include-hidden-files : true
2427
2528 build :
2629 needs : boringssl_clone
2730
2831 strategy :
2932 fail-fast : false
3033 matrix :
31- platform : [ubuntu-latest , macos-latest ]
34+ platform : [ubuntu-22.04 , macos-15-intel ]
3235
3336 runs-on : ${{ matrix.platform }}
37+ # Build against older GLIBC while using an available GitHub runner.
38+ container : ${{ matrix.platform == 'ubuntu-22.04' && 'ubuntu:20.04' || '' }}
39+
40+ defaults :
41+ run :
42+ shell : bash
43+
44+ env :
45+ # For compatibility, but 10.15 target requires 16-byte stack alignment.
46+ MACOSX_DEPLOYMENT_TARGET : ' 10.11'
3447
3548 timeout-minutes : 30
3649
3750 steps :
51+ - name : Setup Linux environment
52+ if : runner.os == 'Linux'
53+ run : |
54+ dpkg --add-architecture i386
55+ apt-get update
56+ DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
57+ ca-certificates git curl unzip clang cmake ninja-build gcc-multilib g++-multilib
58+ echo "CC=clang" >> "$GITHUB_ENV"
59+ echo "CXX=clang++" >> "$GITHUB_ENV"
60+
3861 - name : Set up JDK 11 for toolchains
39- uses : actions/setup-java@v1.4.3
62+ uses : actions/setup-java@v4
4063 with :
64+ distribution : temurin
4165 java-version : 11
4266
4367 - name : Set up JDK 8 for toolchains
44- uses : actions/setup-java@v1.4.3
68+ uses : actions/setup-java@v4
4569 with :
70+ distribution : temurin
4671 java-version : 8
4772
4873 - name : Set runner-specific environment variables
5176 echo "BORINGSSL_HOME=${{ runner.temp }}/boringssl" >> $GITHUB_ENV
5277 echo "M2_REPO=${{ runner.temp }}/m2" >> $GITHUB_ENV
5378
54- - uses : actions/checkout@v2
55-
56- - name : Setup Linux environment
57- if : runner.os == 'Linux'
58- run : |
59- echo "CC=clang" >> $GITHUB_ENV
60- echo "CXX=clang++" >> $GITHUB_ENV
61-
62- sudo dpkg --add-architecture i386
63- sudo add-apt-repository ppa:openjdk-r/ppa
64- sudo apt-get -qq update
65- sudo apt-get -qq install -y --no-install-recommends \
66- gcc-multilib \
67- g++-multilib \
68- ninja-build \
69- openjdk-8-jdk-headless \
70- openjdk-11-jre-headless
79+ - uses : actions/checkout@v4
7180
7281 - name : Setup macOS environment
7382 if : runner.os == 'macOS'
7685 brew install ninja || echo update failed
7786
7887 - name : install Go
79- uses : actions/setup-go@v1
88+ uses : actions/setup-go@v5
8089 with :
8190 go-version : ' 1.19.3'
91+ cache : false
8292
8393 - name : Setup Windows environment
8494 if : runner.os == 'Windows'
8797 choco install ninja -y
8898
8999 - name : Fetch BoringSSL source
90- uses : actions/download-artifact@v1
100+ uses : actions/download-artifact@v4
91101 with :
92102 name : boringssl-source
93103 path : ${{ runner.temp }}/boringssl
@@ -100,9 +110,6 @@ jobs:
100110
101111 - name : Build BoringSSL 64-bit Linux and MacOS
102112 if : runner.os != 'Windows'
103- env :
104- # For compatibility, but 10.15 target requires 16-byte stack alignment.
105- MACOSX_DEPLOYMENT_TARGET : 10.11
106113 run : |
107114 mkdir -p "$BORINGSSL_HOME/build64"
108115 pushd "$BORINGSSL_HOME/build64"
@@ -152,10 +159,10 @@ jobs:
152159
153160 - name : Publish to local Maven repo
154161 shell : bash
155- run : ./gradlew :conscrypt-openjdk:publishToMavenLocal -Dmaven.repo.local="$M2_REPO"
162+ run : ./gradlew :conscrypt-openjdk:publishToMavenLocal -Dmaven.repo.local="$M2_REPO" -PcheckErrorQueue
156163
157164 - name : Upload Maven respository
158- uses : actions/upload-artifact@v1
165+ uses : actions/upload-artifact@v4
159166 with :
160167 name : m2repo-${{ runner.os }}
161168 path : ${{ runner.temp }}/m2
@@ -167,7 +174,7 @@ jobs:
167174
168175 - name : Upload test JAR with dependencies
169176 if : runner.os == 'Linux'
170- uses : actions/upload-artifact@v2
177+ uses : actions/upload-artifact@v4
171178 with :
172179 name : testjar
173180 path : openjdk/build/libs/conscrypt-openjdk-*-tests.jar
@@ -176,15 +183,22 @@ jobs:
176183 uberjar :
177184 needs : build
178185
179- runs-on : ubuntu-latest
186+ runs-on : ubuntu-22.04
180187
181188 permissions :
189+ contents : read
182190 packages : write
183191
184192 timeout-minutes : 20
185193
186194 steps :
187- - uses : actions/checkout@v2
195+ - uses : actions/checkout@v4
196+
197+ - name : Set up JDK 8 for the legacy Javadoc toolchain
198+ uses : actions/setup-java@v4
199+ with :
200+ distribution : temurin
201+ java-version : ' 8'
188202
189203 - name : Set runner-specific environment variables
190204 shell : bash
@@ -193,7 +207,7 @@ jobs:
193207 echo "BORINGSSL_HOME=${{ runner.temp }}/boringssl" >> $GITHUB_ENV
194208
195209 - name : Fetch BoringSSL source
196- uses : actions/download-artifact@v1
210+ uses : actions/download-artifact@v4
197211 with :
198212 name : boringssl-source
199213 path : ${{ runner.temp }}/boringssl
@@ -209,13 +223,13 @@ jobs:
209223 mkdir -p "${{ runner.temp }}/boringssl/include"
210224
211225 - name : Download Maven repository for Linux
212- uses : actions/download-artifact@v1
226+ uses : actions/download-artifact@v4
213227 with :
214228 name : m2repo-Linux
215229 path : ${{ runner.temp }}/m2
216230
217231 - name : Download Maven repository for MacOS
218- uses : actions/download-artifact@v1
232+ uses : actions/download-artifact@v4
219233 with :
220234 name : m2repo-macOS
221235 path : ${{ runner.temp }}/m2
@@ -231,12 +245,13 @@ jobs:
231245 ./gradlew :conscrypt-openjdk-uber:publishToMavenLocal -Dorg.conscrypt.openjdk.buildUberJar=true -Dmaven.repo.local="$M2_REPO"
232246
233247 - name : Upload Maven respository
234- uses : actions/upload-artifact@v1
248+ uses : actions/upload-artifact@v4
235249 with :
236250 name : m2repo-uber
237251 path : ${{ runner.temp }}/m2
238252
239253 - name : Publish UberJAR to GitHubPackages
254+ if : github.event_name == 'push'
240255 shell : bash
241256 env :
242257 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
@@ -249,7 +264,7 @@ jobs:
249264 strategy :
250265 fail-fast : false
251266 matrix :
252- platform : [ubuntu-latest , macos-latest ]
267+ platform : [ubuntu-22.04 , macos-15-intel ]
253268 java : [11]
254269 include :
255270 - java : 11
@@ -261,18 +276,19 @@ jobs:
261276
262277 steps :
263278 - name : Set up Java
264- uses : actions/setup-java@v1
279+ uses : actions/setup-java@v4
265280 with :
281+ distribution : temurin
266282 java-version : ${{ matrix.java }}
267283
268284 - name : Download UberJAR
269- uses : actions/download-artifact@v2
285+ uses : actions/download-artifact@v4
270286 with :
271287 name : m2repo-uber
272288 path : m2
273289
274290 - name : Download Test JAR with Dependencies
275- uses : actions/download-artifact@v2
291+ uses : actions/download-artifact@v4
276292 with :
277293 name : testjar
278294 path : testjar
@@ -291,7 +307,7 @@ jobs:
291307
292308 - name : Archive test results
293309 if : ${{ always() }}
294- uses : actions/upload-artifact@v2
310+ uses : actions/upload-artifact@v4
295311 with :
296312 name : test-results-${{ matrix.platform }}-${{ matrix.java }}
297313 path : results
0 commit comments