Skip to content

Commit 0eb6b67

Browse files
authored
Run dev/release examples in separate jobs (#976)
* Run dev/release examples in separate jobs * Temporarily disable windows runs on release builds --------- Signed-off-by: Appu <[email protected]>
1 parent 9e8fee2 commit 0eb6b67

File tree

1 file changed

+43
-11
lines changed

1 file changed

+43
-11
lines changed

.github/workflows/examples.yaml

Lines changed: 43 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,23 +8,21 @@ on:
88
branches:
99
- main
1010

11-
concurrency:
12-
group: ${{ github.ref }}-examples
13-
cancel-in-progress: ${{ github.ref != 'refs/heads/master' }}
14-
1511
jobs:
16-
examples:
17-
name: Build and run examples on ${{ matrix.os }}
18-
runs-on: ${{ matrix.os }}
19-
12+
examples-release:
2013
strategy:
2114
fail-fast: false
2215
matrix:
23-
os: [ubuntu-latest, macos-latest, windows-latest]
16+
os: [ubuntu-latest, macos-latest] # TODO: add back in windows-latest after new release (v1.3.0 broken on windows)
17+
name: Build and run release examples on ${{ matrix.os }}
18+
runs-on: ${{ matrix.os }}
19+
concurrency:
20+
group: ${{ github.ref }}-${{ matrix.os }}-examples-release
21+
cancel-in-progress: ${{ github.ref != 'refs/heads/master' }}
2422

2523
permissions:
2624
id-token: write
27-
25+
2826
steps:
2927
- name: Enable long paths in Git
3028
if: runner.os == 'Windows'
@@ -48,6 +46,40 @@ jobs:
4846
working-directory: examples/hello-world
4947
shell: bash
5048
run: ./test.sh
49+
50+
examples-dev:
51+
strategy:
52+
fail-fast: false
53+
matrix:
54+
os: [ubuntu-latest, macos-latest, windows-latest]
55+
56+
name: Build and run dev examples on ${{ matrix.os }}
57+
runs-on: ${{ matrix.os }}
58+
concurrency:
59+
group: ${{ github.ref }}-${{ matrix.os }}-examples-dev
60+
cancel-in-progress: ${{ github.ref != 'refs/heads/master' }}
61+
62+
permissions:
63+
id-token: write
64+
65+
steps:
66+
- name: Enable long paths in Git
67+
if: runner.os == 'Windows'
68+
run: git config --system core.longpaths true
69+
shell: bash
70+
71+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
72+
with:
73+
persist-credentials: false
74+
75+
- name: Setup Java
76+
uses: actions/setup-java@c5195efecf7bdfc987ee8bae7a71cb8b11521c00 # v4.7.1
77+
with:
78+
java-version: 17
79+
distribution: 'temurin'
80+
81+
- name: Setup Gradle
82+
uses: gradle/actions/setup-gradle@8379f6a1328ee0e06e2bb424dadb7b159856a326 # v4.4.0
5183

5284
- name: install sigstore java development jars into mavenLocal
5385
run: ./gradlew publishToMavenLocal -Prelease -PskipSigning
@@ -64,4 +96,4 @@ jobs:
6496
shell: bash
6597
env:
6698
VERSION: ${{ steps.dev_version.outputs.version }}
67-
run: ./test.sh -Dsigstore.version=${VERSION}
99+
run: ./test.sh -Dsigstore.version=${VERSION}

0 commit comments

Comments
 (0)