Separate RPM package into its own build

This commit is contained in:
Syer10
2023-12-02 20:48:09 -05:00
parent fdb5c77b85
commit 85916e460e
2 changed files with 92 additions and 34 deletions

View File

@@ -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

View File

@@ -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