From f4f7e2d5644d003cc9989e465afabc981fbcc20f Mon Sep 17 00:00:00 2001 From: Michael Bien Date: Tue, 17 Oct 2023 17:14:29 +0200 Subject: [PATCH] CI: Add build-from-src-zip job --- .github/workflows/main.yml | 86 ++++++++++++++++++++++---------------- 1 file changed, 49 insertions(+), 37 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 13521bf848dd..a4fda2d12066 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -361,10 +361,10 @@ jobs: build-nbms: - name: Build NBMs, Source zips and Javadoc on JDK ${{ matrix.java }} + name: Build NBMs and Javadoc on JDK ${{ matrix.java }} needs: base-build runs-on: ubuntu-latest - timeout-minutes: 90 + timeout-minutes: 60 strategy: matrix: java: [ '11' ] @@ -387,14 +387,57 @@ jobs: - name: Build nbms run: ant $OPTS build-nbms - - name: Build source zips - run: ant $OPTS build-source-zips - - name: Build javadoc if: env.test_javadoc == 'true' && success() run: ant $OPTS build-javadoc + build-from-src-zip: + name: Build ${{ matrix.config }} from src.zip on JDK ${{ matrix.java }} + needs: base-build + runs-on: ubuntu-latest + timeout-minutes: 60 + strategy: + matrix: + java: [ '11' ] + config: [ 'platform', 'release' ] + steps: + + - name: Set up JDK ${{ matrix.java }} + uses: actions/setup-java@v3 + with: + java-version: ${{ matrix.java }} + distribution: ${{ env.default_java_distribution }} + + - name: Download Build + uses: actions/download-artifact@v3 + with: + name: build + + - name: Extract + run: tar --zstd -xf build.tar.zst + + - name: Restoring Cache + uses: actions/cache/restore@v3 + with: + path: ~/.hgexternalcache + key: ${{ runner.os }}-${{ hashFiles('*/external/binaries-list', '*/*/external/binaries-list') }} + restore-keys: ${{ runner.os }}- + + - name: Create ${{ matrix.config }}-src zip + run: ant $OPTS -quiet build-source-config -Dcluster.config=${{ matrix.config }} + + - name: Extract ${{ matrix.config }}-src zip + run: | + mkdir tmpbuild && cd tmpbuild + unzip -qq ../nbbuild/build/${{ matrix.config }}-src* + + - name: Build from ${{ matrix.config }}-src zip + run: | + cd tmpbuild + ant $OPTS build -Dcluster.config=${{ matrix.config }} + + ide-modules-test: name: IDE Modules on Linux/JDK ${{ matrix.java }} needs: base-build @@ -867,12 +910,6 @@ jobs: java: [ '8' ] steps: - - name: Set up JDK 11 - uses: actions/setup-java@v3 - with: - java-version: 11 - distribution: ${{ env.default_java_distribution }} - - name: Set up JDK ${{ matrix.java }} uses: actions/setup-java@v3 with: @@ -1009,32 +1046,6 @@ jobs: - name: platform/o.n.swing.tabcontrol run: ant $OPTS -Dvanilla.javac.exists=true -f platform/o.n.swing.tabcontrol test - - name: Set up JDK 11 - uses: actions/setup-java@v3 - with: - java-version: 11 - distribution: ${{ env.default_java_distribution }} - - # use cache so that the platform build doesn't have to download dependencies again - - name: Caching dependencies - uses: actions/cache/restore@v3 - with: - path: ~/.hgexternalcache - key: ${{ runner.os }}-${{ hashFiles('*/external/binaries-list', '*/*/external/binaries-list') }} - restore-keys: ${{ runner.os }}- - - - name: platform build from platform-src zip - run: | - ant $OPTS -quiet build-source-config -Dcluster.config=platform - mkdir tmpplatform && cd tmpplatform && unzip -qq ../nbbuild/build/platform-src* - ant $OPTS build -Dcluster.config=platform - - - name: Set up JDK ${{ matrix.java }} - uses: actions/setup-java@v3 - with: - java-version: ${{ matrix.java }} - distribution: ${{ env.default_java_distribution }} - # required by netbinox tests - name: isolate platform build run: | @@ -2628,6 +2639,7 @@ jobs: - paperwork - build-system-test - build-nbms + - build-from-src-zip - ide-modules-test - platform-modules-test1 - platform-modules-test2