Skip to content

Commit 9cad644

Browse files
committed
Build CLI and server JAR before running tests
Signed-off-by: Aaron Lew <[email protected]>
1 parent 12b245f commit 9cad644

File tree

1 file changed

+34
-13
lines changed

1 file changed

+34
-13
lines changed

.github/workflows/conformance.yml

Lines changed: 34 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,40 @@ on:
66
push:
77
branches: [main]
88
pull_request: {}
9+
workflow_dispatch: {}
910
# TODO: add cron
1011

1112
jobs:
13+
build:
14+
name: Build sigstore-java cli and server jar
15+
runs-on: ubuntu-latest
16+
steps:
17+
- uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0
18+
with:
19+
persist-credentials: false
20+
21+
- name: Set up JDK 17
22+
uses: actions/setup-java@c5195efecf7bdfc987ee8bae7a71cb8b11521c00 # v4.7.1
23+
with:
24+
java-version: 17
25+
distribution: 'temurin'
26+
27+
- name: Setup Gradle
28+
uses: gradle/actions/setup-gradle@748248ddd2a24f49513d8f472f81c3a07d4d50e1 # v4.4.4
29+
30+
- name: Build sigstore-java cli and server jar
31+
run: ./gradlew :sigstore-cli:serverShadowJar
32+
33+
- name: Upload JAR artifact
34+
uses: actions/upload-artifact@v4
35+
with:
36+
name: sigstore-jar
37+
path: ${{ github.workspace }}/sigstore-cli/build/libs/sigstore-cli-server-all.jar
38+
retention-days: 1
39+
1240
conformance:
41+
needs: build
42+
1343
strategy:
1444
max-parallel: 1
1545
matrix:
@@ -18,9 +48,6 @@ jobs:
1848
fail-fast: false
1949

2050
concurrency:
21-
# On main/release, we don't want any jobs cancelled
22-
# On PR branches, we cancel the job if new commits are pushed
23-
# More info: https://stackoverflow.com/a/70972844/1261287
2451
group: ${{ github.workflow }}-${{ github.head_ref || github.ref_name }}-${{ matrix.java-version }}-${{ matrix.sigstore-env }}
2552
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
2653

@@ -30,17 +57,11 @@ jobs:
3057
with:
3158
persist-credentials: false
3259

33-
- name: Set up JDK 17
34-
uses: actions/setup-java@c5195efecf7bdfc987ee8bae7a71cb8b11521c00 # v4.7.1
60+
- name: Download server jar
61+
uses: actions/download-artifact@v4
3562
with:
36-
java-version: 17
37-
distribution: 'temurin'
38-
39-
- name: Setup Gradle
40-
uses: gradle/actions/setup-gradle@748248ddd2a24f49513d8f472f81c3a07d4d50e1 # v4.4.4
41-
42-
- name: Build sigstore-java cli and server jar
43-
run: ./gradlew :sigstore-cli:serverShadowJar
63+
name: sigstore-jar
64+
path: ${{ github.workspace }}/sigstore-cli/build/libs/
4465

4566
- name: Start test server in background
4667
run: java -jar ${{ github.workspace }}/sigstore-cli/build/libs/sigstore-cli-server-all.jar &

0 commit comments

Comments
 (0)