Skip to content

Commit 3cd6a0c

Browse files
committed
Fix gha smells:
- Use fixed version for runs-on argument - Avoid jobs without timeouts - Steps should only perform a single command
1 parent 91d22b3 commit 3cd6a0c

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

.github/workflows/build.yml

+9-8
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ jobs:
1616
- java: 21
1717
# Disable Enforcer check which (intentionally) prevents using JDK 21 for building
1818
extra-mvn-args: -Denforcer.fail=false
19-
runs-on: ubuntu-latest
20-
19+
runs-on: ubuntu-22.04
20+
timeout-minutes: 3
2121
steps:
2222
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
2323
- name: "Set up JDK ${{ matrix.java }}"
@@ -32,8 +32,8 @@ jobs:
3232

3333
native-image-test:
3434
name: "GraalVM Native Image test"
35-
runs-on: ubuntu-latest
36-
35+
runs-on: ubuntu-22.04
36+
timeout-minutes: 3
3737
steps:
3838
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
3939
- name: "Set up GraalVM"
@@ -51,8 +51,8 @@ jobs:
5151

5252
verify-reproducible-build:
5353
name: "Verify reproducible build"
54-
runs-on: ubuntu-latest
55-
54+
runs-on: ubuntu-22.04
55+
timeout-minutes: 3
5656
steps:
5757
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
5858
- name: "Set up JDK 17"
@@ -65,11 +65,12 @@ jobs:
6565
- name: "Verify no plugin issues"
6666
run: mvn artifact:check-buildplan --batch-mode --no-transfer-progress
6767

68-
- name: "Verify reproducible build"
68+
- name: "Do clean install of dependencies"
6969
# See https://maven.apache.org/guides/mini/guide-reproducible-builds.html#how-to-test-my-maven-build-reproducibility
7070
run: |
7171
mvn clean install --batch-mode --no-transfer-progress -Dproguard.skip -DskipTests
7272
# Run with `-Dbuildinfo.attach=false`; otherwise `artifact:compare` fails because it creates a `.buildinfo` file which
7373
# erroneously references the existing `.buildinfo` file (respectively because it is overwriting it, a file with size 0)
7474
# See https://issues.apache.org/jira/browse/MARTIFACT-57
75-
mvn clean verify artifact:compare --batch-mode --no-transfer-progress -Dproguard.skip -DskipTests -Dbuildinfo.attach=false
75+
- name: "Verify reproducible build"
76+
run: mvn clean verify artifact:compare --batch-mode --no-transfer-progress -Dproguard.skip -DskipTests -Dbuildinfo.attach=false

0 commit comments

Comments
 (0)