14
14
build :
15
15
strategy :
16
16
matrix :
17
- os : [ubuntu-22.04, macos-13, windows-latest]
17
+ os : [ubuntu-22.04, ubuntu-22.04-arm, macos-13, macos-15, windows-latest]
18
+ include :
19
+ - os : ubuntu-22.04
20
+ arch : x86_64
21
+ skip_tests : false
22
+ - os : ubuntu-22.04-arm
23
+ arch : aarch64
24
+ # JavaFX 21.x.x doesn't support `linux/aarch64`
25
+ # So skip tests until JavaFX is updated
26
+ skip_tests : true
27
+ - os : macos-13
28
+ arch : x86_64
29
+ skip_tests : false
30
+ - os : macos-15
31
+ arch : aarch64
32
+ skip_tests : false
33
+ - os : windows-latest
34
+ arch : x86_64
35
+ skip_tests : false
18
36
fail-fast : false
19
37
runs-on : ${{ matrix.os }}
20
38
steps :
27
45
java-version : ' 21'
28
46
distribution : ' adopt'
29
47
cache : gradle
30
- - name : Build with Gradle
48
+ - name : Build with Gradle with tests
49
+ if : matrix.skip_tests == false
31
50
run : ./gradlew build --stacktrace --scan
51
+ - name : Build with Gradle without tests
52
+ if : matrix.skip_tests == true
53
+ run : |
54
+ ./gradlew build --stacktrace --scan -x test
55
+ echo "::warning title=Tests Skipped::Tests were intentionally skipped for linux/aarch64 builds \
56
+ as JavaFX 21.x.x doesn't currently support the linux/aarch64 architecture. \
57
+ This should be revisited when JavaFX is next updated."
32
58
- uses : actions/upload-artifact@v4
33
59
if : failure()
34
60
with :
@@ -38,130 +64,158 @@ jobs:
38
64
uses : actions/upload-artifact@v4
39
65
with :
40
66
include-hidden-files : true
41
- name : cached-localnet
67
+ name : cached-localnet-${{ matrix.os }}
42
68
path : .localnet
43
69
overwrite : true
44
70
- name : Install dependencies
45
- if : ${{ matrix .os == 'ubuntu-22.04' }}
71
+ if : runner .os == 'Linux'
46
72
run : |
47
73
sudo apt-get update
48
74
sudo apt-get install -y rpm libfuse2 flatpak flatpak-builder appstream
49
75
flatpak remote-add --if-not-exists --user flathub https://dl.flathub.org/repo/flathub.flatpakrepo
50
76
- name : Install WiX Toolset
51
- if : ${{ matrix .os == 'windows-latest' }}
77
+ if : runner .os == 'Windows'
52
78
run : |
53
79
Invoke-WebRequest -Uri 'https://github.com/wixtoolset/wix3/releases/download/wix314rtm/wix314.exe' -OutFile wix314.exe
54
80
.\wix314.exe /quiet /norestart
55
81
shell : powershell
56
- - name : Build Haveno Installer
82
+ - name : Build Haveno Installer with tests
83
+ if : matrix.skip_tests == false
84
+ run : ./gradlew clean build --refresh-keys --refresh-dependencies
85
+ working-directory : .
86
+ - name : Build Haveno Installer without tests
87
+ if : matrix.skip_tests == true
57
88
run : |
58
- ./gradlew clean build --refresh-keys --refresh-dependencies
59
- ./gradlew packageInstallers
89
+ ./gradlew clean build --refresh-keys --refresh-dependencies -x test
90
+ echo "::warning title=Tests Skipped::Tests were intentionally skipped for linux/aarch64 builds \
91
+ as JavaFX 21.x.x doesn't currently support the linux/aarch64 architecture. \
92
+ This should be revisited when JavaFX is next updated."
93
+ working-directory : .
94
+ - name : Package Haveno Installer
95
+ run : ./gradlew packageInstallers
60
96
working-directory : .
61
97
62
98
# get version from jar
63
99
- name : Set Version Unix
64
- if : ${{ matrix .os == 'ubuntu-22.04' || matrix.os == 'macos-13' }}
100
+ if : runner .os != 'Windows'
65
101
run : |
66
102
export VERSION=$(ls desktop/build/temp-*/binaries/desktop-*.jar.SHA-256 | grep -Eo 'desktop-[0-9]+\.[0-9]+\.[0-9]+' | sed 's/desktop-//')
67
103
echo "VERSION=$VERSION" >> $GITHUB_ENV
68
104
- name : Set Version Windows
69
- if : ${{ matrix .os == 'windows-latest' }}
105
+ if : runner .os == 'Windows'
70
106
run : |
71
107
$VERSION = (Get-ChildItem -Path desktop\build\temp-*/binaries\desktop-*.jar.SHA-256).Name -replace 'desktop-', '' -replace '-.*', ''
72
108
"VERSION=$VERSION" | Out-File -FilePath $env:GITHUB_ENV -Append
73
109
shell : powershell
74
110
75
111
- name : Move Release Files for Linux
76
- if : ${{ matrix .os == 'ubuntu-22.04' }}
112
+ if : runner .os == 'Linux'
77
113
run : |
78
114
mkdir ${{ github.workspace }}/release-linux-rpm
79
115
mkdir ${{ github.workspace }}/release-linux-deb
80
116
mkdir ${{ github.workspace }}/release-linux-flatpak
81
117
mkdir ${{ github.workspace }}/release-linux-appimage
82
- mv desktop/build/temp-*/binaries/haveno-*.rpm ${{ github.workspace }}/release-linux-rpm/haveno-v${{ env.VERSION }}-linux-x86_64 -installer.rpm
83
- mv desktop/build/temp-*/binaries/haveno_*.deb ${{ github.workspace }}/release-linux-deb/haveno-v${{ env.VERSION }}-linux-x86_64 -installer.deb
84
- mv desktop/build/temp-*/binaries/*.flatpak ${{ github.workspace }}/release-linux-flatpak/haveno-v${{ env.VERSION }}-linux-x86_64 .flatpak
85
- mv desktop/build/temp-*/binaries/haveno_*.AppImage ${{ github.workspace }}/release-linux-appimage/haveno-v${{ env.VERSION }}-linux-x86_64 .AppImage
118
+ mv desktop/build/temp-*/binaries/haveno-*.rpm ${{ github.workspace }}/release-linux-rpm/haveno-v${{ env.VERSION }}-linux-${{ matrix.arch }} -installer.rpm
119
+ mv desktop/build/temp-*/binaries/haveno_*.deb ${{ github.workspace }}/release-linux-deb/haveno-v${{ env.VERSION }}-linux-${{ matrix.arch }} -installer.deb
120
+ mv desktop/build/temp-*/binaries/*.flatpak ${{ github.workspace }}/release-linux-flatpak/haveno-v${{ env.VERSION }}-linux-${{ matrix.arch }} .flatpak
121
+ mv desktop/build/temp-*/binaries/haveno_*.AppImage ${{ github.workspace }}/release-linux-appimage/haveno-v${{ env.VERSION }}-linux-${{ matrix.arch }} .AppImage
86
122
cp desktop/build/temp-*/binaries/desktop-*.jar.SHA-256 ${{ github.workspace }}/release-linux-deb
87
123
cp desktop/build/temp-*/binaries/desktop-*.jar.SHA-256 ${{ github.workspace }}/release-linux-rpm
88
124
cp desktop/build/temp-*/binaries/desktop-*.jar.SHA-256 ${{ github.workspace }}/release-linux-appimage
89
125
cp desktop/build/temp-*/binaries/desktop-*.jar.SHA-256 ${{ github.workspace }}/release-linux-flatpak
90
- cp desktop/build/temp-*/binaries/desktop-*.jar.SHA-256 ${{ github.workspace }}/haveno-v${{ env.VERSION }}-linux-x86_64 -SNAPSHOT-all.jar.SHA-256
126
+ cp desktop/build/temp-*/binaries/desktop-*.jar.SHA-256 ${{ github.workspace }}/haveno-v${{ env.VERSION }}-linux-${{ matrix.arch }} -SNAPSHOT-all.jar.SHA-256
91
127
shell : bash
92
128
- name : Move Release Files for macOS
93
- if : ${{ matrix .os == 'macos-13' }}
129
+ if : runner .os == 'MacOS'
94
130
run : |
95
- mkdir ${{ github.workspace }}/release-macos
96
- mv desktop/build/temp-*/binaries/Haveno-*.dmg ${{ github.workspace }}/release-macos/haveno-v${{ env.VERSION }}-macos-installer.dmg
97
- cp desktop/build/temp-*/binaries/desktop-*.jar.SHA-256 ${{ github.workspace }}/release-macos
98
- cp desktop/build/temp-*/binaries/desktop-*.jar.SHA-256 ${{ github.workspace }}/haveno-v${{ env.VERSION }}-macos-SNAPSHOT-all.jar.SHA-256
131
+ mkdir ${{ github.workspace }}/release-macos-${{ matrix.arch }}
132
+ mv desktop/build/temp-*/binaries/Haveno-*.dmg ${{ github.workspace }}/release-macos-${{ matrix.arch }} /haveno-v${{ env.VERSION }}-macos-${{ matrix.arch }} -installer.dmg
133
+ cp desktop/build/temp-*/binaries/desktop-*.jar.SHA-256 ${{ github.workspace }}/release-macos-${{ matrix.arch }}
134
+ cp desktop/build/temp-*/binaries/desktop-*.jar.SHA-256 ${{ github.workspace }}/haveno-v${{ env.VERSION }}-macos-${{ matrix.arch }}- SNAPSHOT-all.jar.SHA-256
99
135
shell : bash
100
136
- name : Move Release Files on Windows
101
- if : ${{ matrix .os == 'windows-latest' }}
137
+ if : runner .os == 'Windows'
102
138
run : |
103
139
mkdir ${{ github.workspace }}/release-windows
104
- Move-Item -Path desktop\build\temp-*/binaries\Haveno-*.exe -Destination ${{ github.workspace }}/release-windows/haveno-v${{ env.VERSION }}-windows-installer.exe
140
+ Move-Item -Path desktop\build\temp-*/binaries\Haveno-*.exe -Destination ${{ github.workspace }}/release-windows/haveno-v${{ env.VERSION }}-windows-${{ matrix.arch }}- installer.exe
105
141
Copy-Item -Path desktop\build\temp-*/binaries\desktop-*.jar.SHA-256 -Destination ${{ github.workspace }}/release-windows
106
142
Move-Item -Path desktop\build\temp-*/binaries\desktop-*.jar.SHA-256 -Destination ${{ github.workspace }}/haveno-v${{ env.VERSION }}-windows-SNAPSHOT-all.jar.SHA-256
107
143
shell : powershell
108
144
109
- # win
145
+ # Windows artifacts
110
146
- uses : actions/upload-artifact@v4
111
147
name : " Windows artifacts"
112
- if : ${{ matrix .os == 'windows-latest' }}
148
+ if : runner .os == 'Windows'
113
149
with :
114
- name : haveno-windows
150
+ name : haveno-windows-${{ matrix.arch }}
115
151
path : ${{ github.workspace }}/release-windows
116
- # macos
152
+
153
+ # macOS artifacts
117
154
- uses : actions/upload-artifact@v4
118
155
name : " macOS artifacts"
119
- if : ${{ matrix .os == 'macos-13' }}
156
+ if : runner .os == 'MacOS'
120
157
with :
121
- name : haveno-macos
122
- path : ${{ github.workspace }}/release-macos
123
- # linux
158
+ name : haveno-macos-${{ matrix.arch }}
159
+ path : ${{ github.workspace }}/release-macos-${{ matrix.arch }}
160
+
161
+ # Linux artifacts
124
162
- uses : actions/upload-artifact@v4
125
163
name : " Linux - deb artifact"
126
- if : ${{ matrix .os == 'ubuntu-22.04' }}
164
+ if : runner .os == 'Linux'
127
165
with :
128
- name : haveno-linux-deb
166
+ name : haveno-linux-${{ matrix.arch }}- deb
129
167
path : ${{ github.workspace }}/release-linux-deb
130
168
131
169
- uses : actions/upload-artifact@v4
132
170
name : " Linux - rpm artifact"
133
- if : ${{ matrix .os == 'ubuntu-22.04' }}
171
+ if : runner .os == 'Linux'
134
172
with :
135
- name : haveno-linux-rpm
173
+ name : haveno-linux-${{ matrix.arch }}- rpm
136
174
path : ${{ github.workspace }}/release-linux-rpm
137
175
138
176
- uses : actions/upload-artifact@v4
139
177
name : " Linux - AppImage artifact"
140
- if : ${{ matrix .os == 'ubuntu-22.04' }}
178
+ if : runner .os == 'Linux'
141
179
with :
142
- name : haveno-linux-appimage
180
+ name : haveno-linux-${{ matrix.arch }}- appimage
143
181
path : ${{ github.workspace }}/release-linux-appimage
144
182
145
183
- uses : actions/upload-artifact@v4
146
184
name : " Linux - flatpak artifact"
147
- if : ${{ matrix .os == 'ubuntu-22.04' }}
185
+ if : runner .os == 'Linux'
148
186
with :
149
- name : haveno-linux-flatpak
187
+ name : haveno-linux-${{ matrix.arch }}- flatpak
150
188
path : ${{ github.workspace }}/release-linux-flatpak
151
189
152
190
- name : Release
153
191
uses : softprops/action-gh-release@v2
154
192
if : startsWith(github.ref, 'refs/tags/')
155
193
with :
156
194
files : |
195
+ # Linux x86_64
157
196
${{ github.workspace }}/release-linux-deb/haveno-v${{ env.VERSION }}-linux-x86_64-installer.deb
158
197
${{ github.workspace }}/release-linux-rpm/haveno-v${{ env.VERSION }}-linux-x86_64-installer.rpm
159
198
${{ github.workspace }}/release-linux-appimage/haveno-v${{ env.VERSION }}-linux-x86_64.AppImage
160
199
${{ github.workspace }}/release-linux-flatpak/haveno-v${{ env.VERSION }}-linux-x86_64.flatpak
161
200
${{ github.workspace }}/haveno-v${{ env.VERSION }}-linux-x86_64-SNAPSHOT-all.jar.SHA-256
162
- ${{ github.workspace }}/release-macos/haveno-v${{ env.VERSION }}-macos-installer.dmg
163
- ${{ github.workspace }}/haveno-v${{ env.VERSION }}-macos-SNAPSHOT-all.jar.SHA-256
164
- ${{ github.workspace }}/release-windows/haveno-v${{ env.VERSION }}-windows-installer.exe
201
+
202
+ # Linux aarch64
203
+ ${{ github.workspace }}/release-linux-deb/haveno-v${{ env.VERSION }}-linux-aarch64-installer.deb
204
+ ${{ github.workspace }}/release-linux-rpm/haveno-v${{ env.VERSION }}-linux-aarch64-installer.rpm
205
+ ${{ github.workspace }}/release-linux-appimage/haveno-v${{ env.VERSION }}-linux-aarch64.AppImage
206
+ ${{ github.workspace }}/release-linux-flatpak/haveno-v${{ env.VERSION }}-linux-aarch64.flatpak
207
+ ${{ github.workspace }}/haveno-v${{ env.VERSION }}-linux-aarch64-SNAPSHOT-all.jar.SHA-256
208
+
209
+ # macOS x86_64
210
+ ${{ github.workspace }}/release-macos-x86_64/haveno-v${{ env.VERSION }}-macos-x86_64-installer.dmg
211
+ ${{ github.workspace }}/haveno-v${{ env.VERSION }}-macos-x86_64-SNAPSHOT-all.jar.SHA-256
212
+
213
+ # macOS aarch64
214
+ ${{ github.workspace }}/release-macos-aarch64/haveno-v${{ env.VERSION }}-macos-aarch64-installer.dmg
215
+ ${{ github.workspace }}/haveno-v${{ env.VERSION }}-macos-aarch64-SNAPSHOT-all.jar.SHA-256
216
+
217
+ # Windows
218
+ ${{ github.workspace }}/release-windows/haveno-v${{ env.VERSION }}-windows-x86_64-installer.exe
165
219
${{ github.workspace }}/haveno-v${{ env.VERSION }}-windows-SNAPSHOT-all.jar.SHA-256
166
220
167
221
# https://git-scm.com/docs/git-tag - git-tag Docu
0 commit comments