From 85916e460e44b4c036feb9dbf02ceaf15afa1180 Mon Sep 17 00:00:00 2001 From: Syer10 Date: Sat, 2 Dec 2023 20:48:09 -0500 Subject: [PATCH] Separate RPM package into its own build --- .github/workflows/Build.yml | 63 +++++++++++++++++++++++++---------- .github/workflows/Preview.yml | 63 +++++++++++++++++++++++++---------- 2 files changed, 92 insertions(+), 34 deletions(-) diff --git a/.github/workflows/Build.yml b/.github/workflows/Build.yml index b1e27c89..2a50b1e0 100644 --- a/.github/workflows/Build.yml +++ b/.github/workflows/Build.yml @@ -14,7 +14,7 @@ jobs: name: Build application packages strategy: matrix: - runtime: [ linux-x64, linux-fedora-x64, osx-x64, win-x64, android ] + runtime: [ linux-x64, osx-x64, win-x64, android ] include: - runtime: linux-x64 arch: x64 @@ -23,13 +23,6 @@ jobs: build: packageReleaseUberJarForCurrentOS packageDeb setupCl: ./scripts/SetupClUnix.sh - - runtime: linux-fedora-x64 - arch: x64 - os: ubuntu-latest - shell: bash - build: packageReleaseRpm - setupCl: ./scripts/SetupClUnix.sh - - runtime: osx-x64 arch: x64 os: macOS-latest @@ -62,7 +55,6 @@ jobs: fetch-depth: 0 - uses: actions/setup-java@v3 - if: ${{ matrix.runtime != 'linux-fedora-x64' }} with: distribution: 'temurin' java-version: '17' @@ -78,14 +70,7 @@ jobs: p12-file-base64: ${{ secrets.APPLE_CERT }} p12-password: ${{ secrets.APPLE_CERT_PASSWORD }} - - name: Build rpm Package - if: ${{ matrix.runtime == 'linux-fedora-x64' }} - uses: Syer10/Fedora-Java17-Action@v1 - with: - command: ./gradlew ${{ matrix.build }} --stacktrace - - name: Build - if: ${{ matrix.runtime != 'linux-fedora-x64' }} uses: gradle/gradle-build-action@v2 with: arguments: > @@ -126,9 +111,53 @@ jobs: name: runner-errors-${{ matrix.runtime }} path: | desktop/build/compose/logs/ + + BuildRpm: + name: Build application RPM package + runs-on: ubuntu-latest + timeout-minutes: 60 + steps: + - uses: actions/checkout@v3 + with: + fetch-depth: 0 + + - name: Setup Cl + run: ./scripts/SetupClUnix.sh + + - name: Set commit count + shell: bash + run: | + commit_count=$(git rev-list --count HEAD) + echo "COMMIT_COUNT=$commit_count" >> $GITHUB_ENV + + - name: Build rpm Package + uses: Syer10/Fedora-Java17-Action@v1 + with: + command: ./gradlew packageReleaseRpm --stacktrace + + # Upload runner package tar.gz/zip as artifact + - name: Publish Artifact + uses: actions/upload-artifact@v3 + with: + name: runner-package-linux-fedora-x64 + path: | + desktop/build/compose/binaries/main/*/ + desktop/build/compose/binaries/main-release/*/ + desktop/build/compose/jars/ + !desktop/build/compose/binaries/main/app/ + + # Upload runner errors + - name: Upload error logs + uses: actions/upload-artifact@v3 + if: ${{ failure() }} + with: + name: runner-errors-linux-fedora-x64 + path: | + desktop/build/compose/logs/ + ReleaseBinaries: name: Make a release - needs: [ BuildBinaries ] + needs: [ BuildBinaries,BuildRpm ] runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 diff --git a/.github/workflows/Preview.yml b/.github/workflows/Preview.yml index 53ea9c53..a20d37a0 100644 --- a/.github/workflows/Preview.yml +++ b/.github/workflows/Preview.yml @@ -14,7 +14,7 @@ jobs: name: Build application packages strategy: matrix: - runtime: [ linux-x64, linux-fedora-x64, osx-x64, win-x64, android ] + runtime: [ linux-x64, osx-x64, win-x64, android ] include: - runtime: linux-x64 arch: x64 @@ -23,13 +23,6 @@ jobs: build: packageReleaseUberJarForCurrentOS packageReleaseDeb setupCl: ./scripts/SetupClUnix.sh - - runtime: linux-fedora-x64 - arch: x64 - os: ubuntu-latest - shell: bash - build: packageReleaseRpm - setupCl: ./scripts/SetupClUnix.sh - - runtime: osx-x64 arch: x64 os: macOS-latest @@ -62,7 +55,6 @@ jobs: fetch-depth: 0 - uses: actions/setup-java@v3 - if: ${{ matrix.runtime != 'linux-fedora-x64' }} with: distribution: 'temurin' java-version: '17' @@ -84,14 +76,7 @@ jobs: commit_count=$(git rev-list --count HEAD) echo "COMMIT_COUNT=$commit_count" >> $GITHUB_ENV - - name: Build rpm Package - if: ${{ matrix.runtime == 'linux-fedora-x64' }} - uses: Syer10/Fedora-Java17-Action@v1 - with: - command: ./gradlew ${{ matrix.build }} -Ppreview="${{ env.COMMIT_COUNT }}" --stacktrace - - name: Build - if: ${{ matrix.runtime != 'linux-fedora-x64' }} uses: gradle/gradle-build-action@v2 with: arguments: > @@ -134,9 +119,53 @@ jobs: name: runner-errors-${{ matrix.runtime }} path: | desktop/build/compose/logs/ + + BuildRpm: + name: Build application RPM package + runs-on: ubuntu-latest + timeout-minutes: 60 + steps: + - uses: actions/checkout@v3 + with: + fetch-depth: 0 + + - name: Setup Cl + run: ./scripts/SetupClUnix.sh + + - name: Set commit count + shell: bash + run: | + commit_count=$(git rev-list --count HEAD) + echo "COMMIT_COUNT=$commit_count" >> $GITHUB_ENV + + - name: Build rpm Package + uses: Syer10/Fedora-Java17-Action@v1 + with: + command: ./gradlew packageReleaseRpm -Ppreview="${{ env.COMMIT_COUNT }}" --stacktrace + + # Upload runner package tar.gz/zip as artifact + - name: Publish Artifact + uses: actions/upload-artifact@v3 + with: + name: runner-package-linux-fedora-x64 + path: | + desktop/build/compose/binaries/main/*/ + desktop/build/compose/binaries/main-release/*/ + desktop/build/compose/jars/ + !desktop/build/compose/binaries/main/app/ + + # Upload runner errors + - name: Upload error logs + uses: actions/upload-artifact@v3 + if: ${{ failure() }} + with: + name: runner-errors-linux-fedora-x64 + path: | + desktop/build/compose/logs/ + ReleaseBinaries: name: Make a release - needs: [ BuildBinaries ] + needs: [ BuildBinaries,BuildRpm ] runs-on: ubuntu-latest steps: - uses: actions/checkout@v3