88 soundness :
99 uses : swiftlang/github-workflows/.github/workflows/soundness.yml@main
1010 with :
11+ # Not API stable package (yet)
1112 api_breakage_check_enabled : false
1213 # FIXME: Something is off with the format task and it gets "stuck", need to investigate
1314 format_check_enabled : false
1920 strategy :
2021 fail-fast : true
2122 matrix :
22- swift_version : ['nightly-main']
23+ # swift_version: ['nightly-main']
24+ swift_version : ['6.0.2']
2325 os_version : ['jammy']
2426 jdk_vendor : ['Corretto']
2527 container :
@@ -28,58 +30,23 @@ jobs:
2830 JAVA_HOME : " /usr/lib/jvm/default-jdk"
2931 steps :
3032 - uses : actions/checkout@v4
31- - name : Install System Dependencies
32- run : apt-get -qq update && apt-get -qq install -y make curl wget libjemalloc2 libjemalloc-dev
33- - name : Cache JDK
34- id : cache-jdk
35- uses : actions/cache@v4
36- continue-on-error : true
37- with :
38- path : /usr/lib/jvm/default-jdk/
39- key : ${{ runner.os }}-jdk-${{ matrix.jdk_vendor }}-${{ hashFiles('/usr/lib/jvm/default-jdk/*') }}
40- restore-keys : |
41- ${{ runner.os }}-jdk-
42- - name : Install JDK
43- if : steps.cache-jdk.outputs.cache-hit != 'true'
44- run : " bash -xc 'JDK_VENDOR=${{ matrix.jdk_vendor }} ./docker/install_jdk.sh'"
45- # TODO: not using setup-java since incompatible with the swiftlang/swift base image
46- - name : Install Untested Nightly Swift
47- run : " bash -xc './docker/install_untested_nightly_swift.sh'"
48- - name : Cache local Gradle repository
49- uses : actions/cache@v4
50- continue-on-error : true
51- with :
52- path : |
53- /root/.gradle/caches
54- /root/.gradle/wrapper
55- key : ${{ runner.os }}-gradle-${{ hashFiles('*/*.gradle*', 'settings.gradle') }}
56- restore-keys : |
57- ${{ runner.os }}-gradle-
58- - name : Cache local SwiftPM repository
59- uses : actions/cache@v4
60- continue-on-error : true
61- with :
62- path : /__w/swift-java/swift-java/.build/checkouts
63- key : ${{ runner.os }}-swiftpm-cache-${{ hashFiles('Package.swift') }}
64- restore-keys : |
65- ${{ runner.os }}-swiftpm-cache
66- ${{ runner.os }}-swiftpm-
67- # run the actual build
68- - name : Gradle build
69- run : |
70- ./gradlew build -x test --no-daemon # just build
71- ./gradlew build --info --no-daemon
72- - name : Gradle build (benchmarks)
73- run : |
74- ./gradlew compileJmh --info --no-daemon
33+ - name : Prepare CI Environment
34+ uses : ./.github/actions/prepare_env
35+ - name : Gradle :SwiftKit:build
36+ run : ./gradlew build -x test
37+ - name : Gradle :SwiftKit:check
38+ run : ./gradlew :SwiftKit:check --info
39+ - name : Gradle compile JMH benchmarks
40+ run : ./gradlew compileJmh --info
7541
7642 test-swift :
7743 name : Swift tests (swift:${{ matrix.swift_version }} jdk:${{matrix.jdk_vendor}} os:${{ matrix.os_version }})
7844 runs-on : ubuntu-latest
7945 strategy :
8046 fail-fast : false
8147 matrix :
82- swift_version : ['nightly-main']
48+ # swift_version: ['nightly-main']
49+ swift_version : ['6.0.2']
8350 os_version : ['jammy']
8451 jdk_vendor : ['Corretto']
8552 container :
@@ -88,51 +55,33 @@ jobs:
8855 JAVA_HOME : " /usr/lib/jvm/default-jdk"
8956 steps :
9057 - uses : actions/checkout@v4
91- - name : Install System Dependencies
92- run : apt-get -qq update && apt-get -qq install -y make curl wget libjemalloc2 libjemalloc-dev
93- - name : Cache JDK
94- id : cache-jdk
95- uses : actions/cache@v4
96- continue-on-error : true
97- with :
98- path : /usr/lib/jvm/default-jdk/
99- key : ${{ runner.os }}-jdk-${{ matrix.jdk_vendor }}-${{ hashFiles('/usr/lib/jvm/default-jdk/*') }}
100- restore-keys : |
101- ${{ runner.os }}-jdk-
102- - name : Install JDK
103- if : steps.cache-jdk.outputs.cache-hit != 'true'
104- run : " bash -xc 'JDK_VENDOR=${{ matrix.jdk_vendor }} ./docker/install_jdk.sh'"
105- # TODO: not using setup-java since incompatible with the swiftlang/swift base image
106- - name : Install Untested Nightly Swift
107- run : " bash -xc './docker/install_untested_nightly_swift.sh'"
108- - name : Cache local Gradle repository
109- uses : actions/cache@v4
110- continue-on-error : true
111- with :
112- path : |
113- /root/.gradle/caches
114- /root/.gradle/wrapper
115- key : ${{ runner.os }}-gradle-${{ hashFiles('*/*.gradle*', 'settings.gradle') }}
116- restore-keys : |
117- ${{ runner.os }}-gradle-
118- - name : Cache local SwiftPM repository
119- uses : actions/cache@v4
120- continue-on-error : true
121- with :
122- path : /__w/swift-java/swift-java/.build/checkouts
123- key : ${{ runner.os }}-swiftpm-cache-${{ hashFiles('Package.swift') }}
124- restore-keys : |
125- ${{ runner.os }}-swiftpm-cache
126- ${{ runner.os }}-swiftpm-
127- # run the actual build
128- - name : Generate sources (make) (Temporary)
129- # TODO: this should be triggered by the respective builds
130- run : " make jextract-generate"
131- - name : Test Swift
58+ - name : Prepare CI Environment
59+ uses : ./.github/actions/prepare_env
60+ - name : Swift Build
61+ run : " swift build --build-tests"
62+ - name : Swift Test
13263 run : " swift test"
133- - name : Build (Swift) Sample Apps
134- run : |
135- find Samples/ -name Package.swift -maxdepth 2 -exec swift build --package-path $(dirname {}) \;;
136- # TODO: Benchmark compile crashes in CI, enable when nightly toolchains in better shape.
137- # - name: Build (Swift) Benchmarks
138- # run: "swift package --package-path Benchmarks/ benchmark list"
64+
65+ verify-samples :
66+ name : Verify Samples (swift:${{ matrix.swift_version }} jdk:${{matrix.jdk_vendor}} os:${{ matrix.os_version }})
67+ runs-on : ubuntu-latest
68+ strategy :
69+ fail-fast : false
70+ matrix :
71+ # swift_version: ['nightly-main']
72+ swift_version : ['6.0.2']
73+ os_version : ['jammy']
74+ jdk_vendor : ['Corretto']
75+ container :
76+ image : ${{ (contains(matrix.swift_version, 'nightly') && 'swiftlang/swift') || 'swift' }}:${{ matrix.swift_version }}-${{ matrix.os_version }}
77+ env :
78+ JAVA_HOME : " /usr/lib/jvm/default-jdk"
79+ steps :
80+ - uses : actions/checkout@v4
81+ - name : Prepare CI Environment
82+ uses : ./.github/actions/prepare_env
83+ - name : Verify Samples (All)
84+ run : .github/scripts/validate_samples.sh
85+ # TODO: Benchmark compile crashes in CI, enable when nightly toolchains in better shape.
86+ # - name: Build (Swift) Benchmarks
87+ # run: "swift package --package-path Benchmarks/ benchmark list"
0 commit comments