Skip to content

Commit f5d6abf

Browse files
authored
Merge pull request #238 from rainxchzed/debian12-compatibility-fix
2 parents 0443d83 + 602cebf commit f5d6abf

1 file changed

Lines changed: 38 additions & 14 deletions

File tree

.github/workflows/build-desktop-platforms.yml

Lines changed: 38 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,15 @@ concurrency:
99
group: ${{ github.workflow }}-${{ github.ref }}
1010
cancel-in-progress: true
1111

12+
env:
13+
JAVA_VERSION: '21'
14+
JAVA_DISTRIBUTION: 'temurin'
15+
GRADLE_OPTS: >-
16+
-Dorg.gradle.daemon=false
17+
-Dorg.gradle.parallel=true
18+
-Dorg.gradle.caching=true
19+
-Dorg.gradle.configuration-cache=true
20+
1221
jobs:
1322
build-windows:
1423
runs-on: windows-latest
@@ -17,17 +26,18 @@ jobs:
1726
- name: Checkout code
1827
uses: actions/checkout@v4
1928

20-
- name: Set up JDK 21
29+
- name: Set up JDK ${{ env.JAVA_VERSION }}
2130
uses: actions/setup-java@v4
2231
with:
23-
distribution: 'temurin'
24-
java-version: '21'
32+
distribution: ${{ env.JAVA_DISTRIBUTION }}
33+
java-version: ${{ env.JAVA_VERSION }}
2534
cache: 'gradle'
2635

2736
- name: Setup Gradle
2837
uses: gradle/actions/setup-gradle@v4
2938
with:
3039
cache-read-only: false
40+
cache-encryption-key: ${{ secrets.GRADLE_ENCRYPTION_KEY }}
3141

3242
- name: Grant execute permission for gradlew
3343
run: chmod +x gradlew
@@ -57,7 +67,7 @@ jobs:
5767
done
5868
}
5969
60-
retry ./gradlew :composeApp:packageExe :composeApp:packageMsi --no-daemon --parallel
70+
retry ./gradlew :composeApp:packageExe :composeApp:packageMsi
6171
shell: bash
6272

6373
- name: Upload Windows installers
@@ -85,17 +95,18 @@ jobs:
8595
- name: Checkout code
8696
uses: actions/checkout@v4
8797

88-
- name: Set up JDK 21
98+
- name: Set up JDK ${{ env.JAVA_VERSION }}
8999
uses: actions/setup-java@v4
90100
with:
91-
distribution: 'temurin'
92-
java-version: '21'
101+
distribution: ${{ env.JAVA_DISTRIBUTION }}
102+
java-version: ${{ env.JAVA_VERSION }}
93103
cache: 'gradle'
94104

95105
- name: Setup Gradle
96106
uses: gradle/actions/setup-gradle@v4
97107
with:
98108
cache-read-only: false
109+
cache-encryption-key: ${{ secrets.GRADLE_ENCRYPTION_KEY }}
99110

100111
- name: Grant execute permission for gradlew
101112
run: chmod +x gradlew
@@ -124,7 +135,7 @@ jobs:
124135
done
125136
}
126137
127-
retry ./gradlew :composeApp:packageDmg :composeApp:packagePkg --no-daemon --parallel
138+
retry ./gradlew :composeApp:packageDmg :composeApp:packagePkg
128139
shell: bash
129140

130141
- name: Upload macOS installers
@@ -138,23 +149,36 @@ jobs:
138149
compression-level: 6
139150

140151
build-linux:
141-
runs-on: ubuntu-latest
152+
strategy:
153+
matrix:
154+
include:
155+
# Ubuntu 24.04 (latest) — produces .deb with t64 deps (libasound2t64, libpng16-16t64)
156+
# Compatible with: Ubuntu 24.04+, Debian 13+ (Trixie)
157+
- os: ubuntu-latest
158+
label: modern
159+
# Ubuntu 22.04 — produces .deb with classic deps (libasound2, libpng16-16)
160+
# Compatible with: Debian 12 (Bookworm), Ubuntu 22.04, and older systems
161+
- os: ubuntu-22.04
162+
label: debian12-compat
163+
164+
runs-on: ${{ matrix.os }}
142165

143166
steps:
144167
- name: Checkout code
145168
uses: actions/checkout@v4
146169

147-
- name: Set up JDK 21
170+
- name: Set up JDK ${{ env.JAVA_VERSION }}
148171
uses: actions/setup-java@v4
149172
with:
150-
distribution: 'temurin'
151-
java-version: '21'
173+
distribution: ${{ env.JAVA_DISTRIBUTION }}
174+
java-version: ${{ env.JAVA_VERSION }}
152175
cache: 'gradle'
153176

154177
- name: Setup Gradle
155178
uses: gradle/actions/setup-gradle@v4
156179
with:
157180
cache-read-only: false
181+
cache-encryption-key: ${{ secrets.GRADLE_ENCRYPTION_KEY }}
158182

159183
- name: Grant execute permission for gradlew
160184
run: chmod +x gradlew
@@ -183,13 +207,13 @@ jobs:
183207
done
184208
}
185209
186-
retry ./gradlew :composeApp:packageDeb :composeApp:packageRpm --no-daemon --parallel
210+
retry ./gradlew :composeApp:packageDeb :composeApp:packageRpm
187211
shell: bash
188212

189213
- name: Upload Linux installers
190214
uses: actions/upload-artifact@v4
191215
with:
192-
name: linux-installers
216+
name: linux-installers-${{ matrix.label }}
193217
path: |
194218
composeApp/build/compose/binaries/main/deb/*.deb
195219
composeApp/build/compose/binaries/main/rpm/*.rpm

0 commit comments

Comments
 (0)