Skip to content

Commit

Permalink
aggregate all build tool tests into a single job.
Browse files Browse the repository at this point in the history
 - triggered by labels: Ant, Gradle, Maven or MX
 - merged extide job into new build-tools job
 - set continue-on-error for unreliable java.mx.project test
  • Loading branch information
mbien committed Oct 4, 2022
1 parent d243b53 commit 07ca970
Show file tree
Hide file tree
Showing 2 changed files with 106 additions and 97 deletions.
202 changes: 106 additions & 96 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,9 @@ env:
# 'Platform' label
test_platform: ${{ contains(github.event.pull_request.labels.*.name, 'Platform') || contains(github.event.pull_request.labels.*.name, 'ci:all-tests') || github.event_name != 'pull_request' }}

# 'Ant', 'Gradle', 'Maven' and 'MX' labels trigger build-tools job
# see job condition (env vars don't work for job conditions https://github.com/actions/runner/issues/1189 )

# special commands:
# 'ci:all-tests' enables everything
# 'ci:no-build' disables the build job (and test jobs too)
Expand Down Expand Up @@ -501,15 +504,6 @@ jobs:
- name: ide/parsing.lucene
run: ant $OPTS -f ide/parsing.lucene test

- name: ide/project.ant
run: ant $OPTS -f ide/project.ant test

- name: ide/project.ant.compat8
run: ant $OPTS -f ide/project.ant.compat8 test

- name: ide/project.ant.ui
run: ant $OPTS -f ide/project.ant.ui test

- name: ide/project.libraries
run: ant $OPTS -f ide/project.libraries test

Expand Down Expand Up @@ -628,6 +622,108 @@ jobs:
paths: "./*/*/build/test/*/results/TEST-*.xml"


build-tools:
name: Build Tools on Linux/JDK ${{ matrix.java }}
# label triggers: Ant, Gradle, Maven, MX
if: ${{ contains(github.event.pull_request.labels.*.name, 'Ant') || contains(github.event.pull_request.labels.*.name, 'Gradle') || contains(github.event.pull_request.labels.*.name, 'Maven') || contains(github.event.pull_request.labels.*.name, 'MX') || contains(github.event.pull_request.labels.*.name, 'ci:all-tests') || github.event_name != 'pull_request' }}
needs: base-build
runs-on: ubuntu-latest
strategy:
matrix:
java: [ '8' ]
steps:

- name: Set up JDK ${{ matrix.java }}
uses: actions/setup-java@v2
with:
java-version: ${{ matrix.java }}
distribution: 'zulu'

- name: Setup Xvfb
run: |
echo "DISPLAY=:99.0" >> $GITHUB_ENV
Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &
- name: Download Build
uses: actions/download-artifact@v3
with:
name: build

- name: Extract
run: tar --zstd -xf build.tar.zst

# run unreliable steps first to fail early
- name: java/java.mx.project
continue-on-error: true
run: .github/retry.sh ant $OPTS -f java/java.mx.project test

- name: java/gradle.java
run: .github/retry.sh ant $OPTS -f java/gradle.java test

- name: extide/gradle
run: ant $OPTS -f extide/gradle test

- name: java/maven
run: ant $OPTS -f java/maven test

- name: java/maven.embedder
run: ant $OPTS -f java/maven.embedder test

- name: java/maven.grammar
run: ant $OPTS -f java/maven.grammar test

# - name: java/maven.hints
# run: ant $OPTS -f java/maven.hints test

# - name: java/maven.htmlui
# run: ant $OPTS -f java/maven.htmlui test

- name: java/maven.indexer
run: ant $OPTS -f java/maven.indexer test

- name: java/maven.junit
run: ant $OPTS -f java/maven.junit test

- name: java/maven.model
run: ant $OPTS -f java/maven.model test

- name: java/maven.osgi
run: ant $OPTS -f java/maven.osgi test

- name: java/api.maven
run: ant $OPTS -f java/api.maven test

- name: java/hudson.maven
run: ant $OPTS -f java/hudson.maven test

- name: ide/project.ant
run: ant $OPTS -f ide/project.ant test

- name: ide/project.ant.compat8
run: ant $OPTS -f ide/project.ant.compat8 test

- name: ide/project.ant.ui
run: ant $OPTS -f ide/project.ant.ui test

# - name: java/ant.debugger
# run: ant $OPTS -f java/ant.debugger test

- name: java/ant.freeform
run: ant $OPTS -f java/ant.freeform test

# - name: java/ant.grammar
# run: ant $OPTS -f java/ant.grammar test

- name: extide/o.apache.tools.ant.module
run: ant $OPTS -f extide/o.apache.tools.ant.module test

- name: Create Test Summary
uses: test-summary/action@v1
if: failure()
with:
paths: "./*/*/build/test/*/results/TEST-*.xml"


platform-modules-test1:
name: Platform Modules batch1 on Linux/JDK ${{ matrix.java }}
# equals env.test_platform == 'true'
Expand Down Expand Up @@ -974,24 +1070,12 @@ jobs:
- name: Extract
run: tar --zstd -xf build.tar.zst

# - name: java/ant.debugger
# run: ant $OPTS -f java/ant.debugger test

- name: ant.freeform
run: ant $OPTS -f java/ant.freeform test

# - name: java/ant.grammar
# run: ant $OPTS -f java/ant.grammar test

- name: api.debugger.jpda
run: ant $OPTS -f java/api.debugger.jpda test

- name: api.java
run: ant $OPTS -f java/api.java test

- name: api.maven
run: ant $OPTS -f java/api.maven test

# - name: beans
# run: ant $OPTS -f java/beans test

Expand Down Expand Up @@ -1025,9 +1109,6 @@ jobs:
# - name: java/form
# run: ant $OPTS -f java/form test

- name: hudson.maven
run: ant $OPTS -f java/hudson.maven test

- name: java.completion
if: env.test_java == 'true' && success()
run: ant $OPTS -f java/java.completion test
Expand All @@ -1053,9 +1134,6 @@ jobs:
# - name: java.openjdk.project
# run: ant $OPTS -f java/java.openjdk.project test

- name: java.mx.project
run: .github/retry.sh ant $OPTS -f java/java.mx.project test

- name: java.platform
run: ant $OPTS -f java/java.platform test

Expand Down Expand Up @@ -1117,33 +1195,6 @@ jobs:
- name: lib.nbjavac
run: ant $OPTS -f java/lib.nbjavac test

- name: maven
run: ant $OPTS -f java/maven test

- name: maven.embedder
run: ant $OPTS -f java/maven.embedder test

- name: maven.grammar
run: ant $OPTS -f java/maven.grammar test

# - name: maven.hints
# run: ant $OPTS -f java/maven.hints test

# - name: maven.htmlui
# run: ant $OPTS -f java/maven.htmlui test

- name: maven.indexer
run: ant $OPTS -f java/maven.indexer test

- name: maven.junit
run: ant $OPTS -f java/maven.junit test

- name: maven.model
run: ant $OPTS -f java/maven.model test

- name: maven.osgi
run: ant $OPTS -f java/maven.osgi test

# - name: performance
# run: ant $OPTS -f java/performance test

Expand Down Expand Up @@ -1260,47 +1311,6 @@ jobs:
paths: "./*/*/build/test/*/results/*.xml"


extide-modules-test:
name: ExtIDE Modules on Linux/JDK ${{ matrix.java }}
needs: base-build
runs-on: ubuntu-latest
strategy:
matrix:
java: [ '11' ]
steps:

- name: Set up JDK ${{ matrix.java }}
uses: actions/setup-java@v2
with:
java-version: ${{ matrix.java }}
distribution: 'zulu'

- name: Setup Xvfb
run: |
echo "DISPLAY=:99.0" >> $GITHUB_ENV
Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &
- name: Download Build
uses: actions/download-artifact@v3
with:
name: build

- name: Extract
run: tar --zstd -xf build.tar.zst

- name: o.apache.tools.ant.module
run: ant $OPTS -f extide/o.apache.tools.ant.module test

- name: gradle
run: ant $OPTS -f extide/gradle test

- name: Create Test Summary
uses: test-summary/action@v1
if: failure()
with:
paths: "./*/*/build/test/*/results/*.xml"


java-hints-test:
name: Java Hints ${{ matrix.config }} on Linux/JDK ${{ matrix.java }}
# equals env.test_java == 'true'
Expand Down Expand Up @@ -1819,7 +1829,7 @@ jobs:
- java-hints-test
- profiler-test
- apisupport-modules-test
- extide-modules-test
- build-tools
- webcommon-test
- macos
- php
Expand Down
1 change: 0 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,6 @@ matrix:
- nbbuild/travis/ant.sh $OPTS build
script:
- travis_retry ant $OPTS -f java/java.lsp.server test
- travis_retry hide-logs.sh ant $OPTS -f java/gradle.java test

after_failure:
- nbbuild/travis/print-junit-report.sh
Expand Down

0 comments on commit 07ca970

Please sign in to comment.