Skip to content

Commit 384e301

Browse files
committed
just debugging the workflow
1 parent a8e11b9 commit 384e301

File tree

4 files changed

+42
-41
lines changed

4 files changed

+42
-41
lines changed

.github/actions/prepare_env/action.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,11 @@ runs:
77
- name: Check Swift version
88
shell: bash
99
run: swift -version
10-
- name: Set up JDK ${{ matrix.jdk_version }}
11-
uses: actions/setup-java@v4
10+
- name: Set up JDK ${{ matrix.jdk_version }} (${{ matrix.jdk_vendor }})
11+
uses: actions/setup-java@v5
1212
with:
1313
distribution: ${{ matrix.jdk_vendor }}
14-
java-version: |
15-
24
16-
17
14+
java-version: ${{ matrix.jdk_version }}
1715
cache: 'gradle'
1816
- name: Set JAVA_HOME_{N}
1917
shell: bash
@@ -31,6 +29,9 @@ runs:
3129
# - name: Check Java environment
3230
# shell: bash
3331
# run: ./gradlew -q javaToolchains
32+
- name: Print java version
33+
shell: bash
34+
run: java -version
3435
- name: Cache local SwiftPM repository
3536
if: matrix.os_version == 'jammy'
3637
uses: actions/cache@v4

.github/workflows/ci-release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Release Publisher
1+
name: 'Publish (Java): RELEASE'
22
on:
33
push:
44
tags:
@@ -13,7 +13,7 @@ jobs:
1313
swift_version: ['6.1.3']
1414
os_version: ['jammy']
1515
jdk_vendor: ['corretto']
16-
java: ['25']
16+
jdk_version: [ 24, 17 ]
1717
container:
1818
image: ${{ (contains(matrix.swift_version, 'nightly') && 'swiftlang/swift') || 'swift' }}:${{ matrix.swift_version }}-${{ matrix.os_version }}
1919
steps:

.github/workflows/ci-snapshot.yml

Lines changed: 26 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,32 @@
1-
name: Snapshot Publisher
1+
name: 'Publish (Java): SNAPSHOT'
2+
# on:
3+
# push:
4+
# branches: [ main ]
5+
# tags-ignore:
6+
# - "[0-9]+.[0-9]+.[0-9]+(-[0-9a-z]+)?"
7+
# paths-ignore:
8+
# - 'docs/**'
9+
# - 'scripts/**'
10+
# - '.github/pull_request_template.md'
11+
# - '.gitignore'
12+
# - 'gradlew'
13+
# - 'gradlew.bat'
14+
# - '**.adoc'
15+
# - '*.txt'
216
on:
3-
push:
4-
branches: [ main ]
5-
tags-ignore:
6-
- "[0-9]+.[0-9]+.[0-9]+(-[0-9a-z]+)?"
7-
paths-ignore:
8-
- 'docs/**'
9-
- 'scripts/**'
10-
- '.github/pull_request_template.md'
11-
- '.gitignore'
12-
- 'gradlew'
13-
- 'gradlew.bat'
14-
- '**.adoc'
15-
- '*.txt'
17+
pull_request:
18+
types: [opened, reopened, synchronize]
1619
jobs:
1720
build:
18-
name: Release JDK (${{ matrix.os_version }} swift:${{ matrix.swift_version }} jdk:${{matrix.jdk_vendor}})
21+
name: Release JDK (${{ matrix.os_version }} swift:${{ matrix.swift_version }} jdk:${{ matrix.jdk_version }}-${{ matrix.jdk_vendor }}
1922
runs-on: ubuntu-latest
2023
strategy:
2124
fail-fast: false
2225
matrix:
2326
swift_version: ['6.1.3']
2427
os_version: ['jammy']
2528
jdk_vendor: ['corretto']
26-
java: ['25']
29+
jdk_version: [24]
2730
container:
2831
image: ${{ (contains(matrix.swift_version, 'nightly') && 'swiftlang/swift') || 'swift' }}:${{ matrix.swift_version }}-${{ matrix.os_version }}
2932
steps:
@@ -32,55 +35,45 @@ jobs:
3235
run: if [[ $(cat gradle.properties | grep version= | sed 's/^version=//') =~ .*-SNAPSHOT ]]; then exit 1; else exit 0; fi
3336
- name: Prepare CI Environment
3437
uses: ./.github/actions/prepare_env
35-
- name: Set up jdk:${{matrix.jdk_vendor}} ${{matrix.java}}
36-
uses: actions/setup-java@v5
37-
with:
38-
java-version: ${{ matrix.java }}
39-
distribution: ${{ matrix.jdk_vendor }}
40-
cache: 'gradle'
41-
- name: Print JDK Version
42-
run: java -version
4338
- name: Make gradlew Executable
4439
run: chmod +x gradlew
4540
- name: Clean Gradle project
4641
run: ./gradlew --parallel clean
42+
# TODO: run tests here
4743
- name: Build with Gradle
4844
env:
4945
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.ORG_GRADLE_PROJECT_SIGNINGKEY }}
5046
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.ORG_GRADLE_PROJECT_SIGNINGPASSWORD }}
5147
SONATYPE_USER: ${{ secrets.SONATYPE_USER }}
5248
SONATYPE_TOKEN: ${{ secrets.SONATYPE_TOKEN }}
5349
run: |
54-
FIRST_GRADLE_TARGETS=" check"
55-
SECOND_GRADLE_TARGETS=" publish"
56-
57-
# Execute the gradlew command to publish the build
58-
sudo -E env "PATH=$PATH" bash -c "ulimit -l 65536 && ulimit -a && ./gradlew --no-daemon --parallel$FIRST_GRADLE_TARGETS && ./gradlew --no-daemon --no-parallel$SECOND_GRADLE_TARGETS"
50+
# Execute the gradle command to publish the project
51+
./gradlew --no-daemon --no-parallel publish
5952
- name: Publish Test Results
6053
if: always()
6154
uses: scacap/action-surefire-report@5609ce4db72c09db044803b344a8968fd1f315da
6255
with:
6356
github_token: ${{ secrets.GITHUB_TOKEN }}
6457
report_paths: '**/build/test-results/test/TEST-*.xml'
65-
check_name: Test Report JDK ${{ matrix.java }}
58+
check_name: Test Report JDK ${{ matrix.jdk_version }}
6659
- name: Publish Checkstyle Report
6760
if: always()
6861
uses: jwgmeligmeyling/checkstyle-github-action@50292990e18466f2c5d95d04ff5fab931254fa5f
6962
with:
70-
name: Checkstyle Report JDK ${{ matrix.java }}
63+
name: Checkstyle Report JDK ${{ matrix.jdk_version }}
7164
path: '**/build/reports/checkstyle/*.xml'
7265
token: ${{ secrets.GITHUB_TOKEN }}
7366
- name: Publish PMD Report
7467
if: always()
7568
uses: jwgmeligmeyling/pmd-github-action@322e346bd76a0757c4d54ff9209e245965aa066d
7669
with:
77-
name: PMD Report JDK ${{ matrix.java }}
70+
name: PMD Report JDK ${{ matrix.jdk_version }}
7871
path: '**/build/reports/pmd/*.xml'
7972
token: ${{ secrets.GITHUB_TOKEN }}
8073
- name: Publish SpotBugs Report
8174
if: always()
8275
uses: jwgmeligmeyling/spotbugs-github-action@b8e2c3523acb34c87f14e18cbcd2d87db8c8584e
8376
with:
84-
name: SpotBugs Report JDK ${{ matrix.java }}
77+
name: SpotBugs Report JDK ${{ matrix.jdk_version }}
8578
path: '**/build/reports/spotbugs/*.xml'
8679
token: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/pull_request.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ jobs:
3030
swift_version: ['6.1.3']
3131
os_version: ['jammy']
3232
jdk_vendor: ['corretto']
33+
jdk_version: [ 24, 17 ]
3334
steps:
3435
- uses: actions/checkout@v4
3536
- name: Prepare CI Environment
@@ -48,6 +49,7 @@ jobs:
4849
swift_version: ['6.1.3', 'nightly']
4950
os_version: ['jammy']
5051
jdk_vendor: ['corretto']
52+
jdk_version: [ 24, 17 ]
5153
container:
5254
image: ${{ (contains(matrix.swift_version, 'nightly') && 'swiftlang/swift') || 'swift' }}:${{ matrix.swift_version }}-${{ matrix.os_version }}
5355
env:
@@ -74,6 +76,7 @@ jobs:
7476
swift_version: ['6.2.0']
7577
os_version: ['macos']
7678
jdk_vendor: ['corretto']
79+
jdk_version: [ 24, 17 ]
7780
env:
7881
SWIFT_JAVA_VERBOSE: true
7982
steps:
@@ -98,6 +101,7 @@ jobs:
98101
swift_version: ['6.2.0']
99102
os_version: ['jammy']
100103
jdk_vendor: ['corretto']
104+
jdk_version: [ 24, 17 ]
101105
container:
102106
image: ${{ (contains(matrix.swift_version, 'nightly') && 'swiftlang/swift') || 'swift' }}:${{ matrix.swift_version }}-${{ matrix.os_version }}
103107
env:
@@ -140,6 +144,7 @@ jobs:
140144
swift_version: ['6.2.0']
141145
os_version: ['macos']
142146
jdk_vendor: ['corretto']
147+
jdk_version: [ 24, 17 ]
143148
env:
144149
SWIFT_JAVA_VERBOSE: true
145150
steps:
@@ -160,6 +165,7 @@ jobs:
160165
swift_version: ['6.1.3', 'nightly']
161166
os_version: ['jammy']
162167
jdk_vendor: ['corretto']
168+
jdk_version: [ 24, 17 ]
163169
sample_app: [ # TODO: use a reusable-workflow to generate those names
164170
'JavaDependencySampleApp',
165171
'JavaKitSampleApp',
@@ -180,14 +186,15 @@ jobs:
180186

181187

182188
verify-samples-macos:
183-
name: Sample ${{ matrix.sample_app }} (${{ matrix.os_version }} swift:${{ matrix.swift_version }} jdk:${{matrix.jdk_vendor}})
189+
name: Sample ${{ matrix.sample_app }} (${{ matrix.os_version }} swift:${{ matrix.swift_version }} jdk:${{ matrix.jdk_version }}-${{matrix.jdk_vendor}}
184190
runs-on: [self-hosted, macos, sequoia, ARM64]
185191
strategy:
186192
fail-fast: false
187193
matrix:
188194
swift_version: ['6.2.0'] # no nightly testing on macOS
189195
os_version: ['macos']
190196
jdk_vendor: ['corretto']
197+
jdk_version: [ 24, 17 ]
191198
sample_app: [ # TODO: use a reusable-workflow to generate those names
192199
'JavaDependencySampleApp',
193200
'JavaKitSampleApp',

0 commit comments

Comments
 (0)