Skip to content

Commit 7e1f6b1

Browse files
committed
split out samples into separate job
1 parent 8d48b4d commit 7e1f6b1

File tree

1 file changed

+30
-3
lines changed

1 file changed

+30
-3
lines changed

.github/workflows/pull_request.yml

Lines changed: 30 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -104,9 +104,6 @@ jobs:
104104
- name: Install JDK
105105
if: steps.cache-jdk.outputs.cache-hit != 'true'
106106
run: "bash -xc 'JDK_VENDOR=${{ matrix.jdk_vendor }} ./docker/install_jdk.sh'"
107-
# TODO: not using setup-java since incompatible with the swiftlang/swift base image
108-
# - name: Install Untested Nightly Swift
109-
# run: "bash -xc './docker/install_untested_nightly_swift.sh'"
110107
- name: Cache local Gradle repository
111108
uses: actions/cache@v4
112109
continue-on-error: true
@@ -128,6 +125,36 @@ jobs:
128125
${{ runner.os }}-swiftpm-
129126
- name: Test Swift
130127
run: "swift test"
128+
129+
verify-samples:
130+
name: Verify Samples (swift:${{ matrix.swift_version }} jdk:${{matrix.jdk_vendor}} os:${{ matrix.os_version }})
131+
runs-on: ubuntu-latest
132+
strategy:
133+
fail-fast: false
134+
matrix:
135+
swift_version: ['6.0.2']
136+
os_version: ['jammy']
137+
jdk_vendor: ['Corretto']
138+
container:
139+
image: ${{ (contains(matrix.swift_version, 'nightly') && 'swiftlang/swift') || 'swift' }}:${{ matrix.swift_version }}-${{ matrix.os_version }}
140+
env:
141+
JAVA_HOME: "/usr/lib/jvm/default-jdk"
142+
steps:
143+
- uses: actions/checkout@v4
144+
- name: Install System Dependencies
145+
run: apt-get -qq update && apt-get -qq install -y make curl wget libjemalloc2 libjemalloc-dev
146+
- name: Cache JDK
147+
id: cache-jdk
148+
uses: actions/cache@v4
149+
continue-on-error: true
150+
with:
151+
path: /usr/lib/jvm/default-jdk/
152+
key: ${{ runner.os }}-jdk-${{ matrix.jdk_vendor }}-${{ hashFiles('/usr/lib/jvm/default-jdk/*') }}
153+
restore-keys: |
154+
${{ runner.os }}-jdk-
155+
- name: Install JDK
156+
if: steps.cache-jdk.outputs.cache-hit != 'true'
157+
run: "bash -xc 'JDK_VENDOR=${{ matrix.jdk_vendor }} ./docker/install_jdk.sh'"
131158
- name: Verify Samples (All)
132159
run: .github/scripts/validate_samples.sh
133160
# TODO: Benchmark compile crashes in CI, enable when nightly toolchains in better shape.

0 commit comments

Comments
 (0)