Build daemon.jar using GitHub actions (#2054)

This commit is contained in:
atsamd21 2025-12-06 21:04:34 +01:00 committed by woodser
parent b63f1a6aae
commit 3b5f3d64d2
No known key found for this signature in database
GPG key ID: 55A10DD48ADEE5EF
3 changed files with 48 additions and 1 deletions

View file

@ -101,6 +101,13 @@ jobs:
run: ./gradlew packageInstallers
working-directory: .
- name: Build Daemon JAR
if: >
(runner.os == 'Linux' && (matrix.arch == 'x86_64' || matrix.arch == 'aarch64'))
|| (runner.os == 'Windows')
run: ./gradlew :daemon:shadowJar -x test -x checkstyleMain -x checkstyleTest --stacktrace
working-directory: .
# get version from jar
- name: Set Version Unix
if: runner.os != 'Windows'
@ -147,7 +154,32 @@ jobs:
Copy-Item -Path desktop\build\temp-*/binaries\desktop-*.jar.SHA-256 -Destination ${{ github.workspace }}/release-windows
Move-Item -Path desktop\build\temp-*/binaries\desktop-*.jar.SHA-256 -Destination ${{ github.workspace }}/haveno-v${{ env.VERSION }}-windows-SNAPSHOT-all.jar.SHA-256
shell: powershell
- name: Move Daemon JAR on Linux
if: runner.os == 'Linux'
run: |
mkdir -p ${{ github.workspace }}/release-daemon-linux-${{ matrix.arch }}
mv daemon/build/libs/daemon-all.jar ${{ github.workspace }}/release-daemon-linux-${{ matrix.arch }}/daemon-linux-${{ matrix.arch }}.jar
sha256sum ${{ github.workspace }}/release-daemon-linux-${{ matrix.arch }}/daemon-linux-${{ matrix.arch }}.jar > ${{ github.workspace }}/release-daemon-linux-${{ matrix.arch }}/daemon-linux-${{ matrix.arch }}.jar.SHA-256
shell: bash
- name: Move Daemon JAR on Windows
if: runner.os == 'Windows'
run: |
mkdir ${{ github.workspace }}\release-daemon-windows
Move-Item daemon\build\libs\daemon-all.jar ${{ github.workspace }}\release-daemon-windows\daemon-windows.jar
Get-FileHash ${{ github.workspace }}\release-daemon-windows\daemon-windows.jar -Algorithm SHA256 | ForEach-Object { $_.Hash } > ${{ github.workspace }}\release-daemon-windows\daemon-windows.jar.SHA-256
shell: powershell
- uses: actions/upload-artifact@v4
name: "Linux daemon artifacts"
if: runner.os == 'Linux'
with:
name: daemon-linux-${{ matrix.arch }}
path: ${{ github.workspace }}/release-daemon-linux-${{ matrix.arch }}
- uses: actions/upload-artifact@v4
name: "Windows daemon artifacts"
if: runner.os == 'Windows'
with:
name: daemon-windows
path: ${{ github.workspace }}/release-daemon-windows
# Windows artifacts
- uses: actions/upload-artifact@v4
name: "Windows artifacts"
@ -224,6 +256,16 @@ jobs:
${{ github.workspace }}/release-windows/haveno-v${{ env.VERSION }}-windows-x86_64-installer.exe
${{ github.workspace }}/haveno-v${{ env.VERSION }}-windows-SNAPSHOT-all.jar.SHA-256
# Daemon JARs
${{ github.workspace }}/release-daemon-linux-x86_64/daemon-linux-x86_64.jar
${{ github.workspace }}/release-daemon-linux-x86_64/daemon-linux-x86_64.jar.SHA-256
${{ github.workspace }}/release-daemon-linux-aarch64/daemon-linux-aarch64.jar
${{ github.workspace }}/release-daemon-linux-aarch64/daemon-linux-aarch64.jar.SHA-256
${{ github.workspace }}/release-daemon-windows/daemon-windows.jar
${{ github.workspace }}/release-daemon-windows/daemon-windows.jar.SHA-256
# https://git-scm.com/docs/git-tag - git-tag Docu
#
# git tag - lists all local tags

View file

@ -17,6 +17,9 @@ haveno:
update-dependencies:
./gradlew --refresh-dependencies && ./gradlew --write-verification-metadata sha256
daemon: localnet
./gradlew :daemon:shadowJar -x test -x checkstyleMain -x checkstyleTest
# build haveno without tests
skip-tests: localnet
./gradlew build -x test -x checkstyleMain -x checkstyleTest

View file

@ -791,6 +791,8 @@ configure(project(':statsnode')) {
configure(project(':daemon')) {
mainClassName = 'haveno.daemon.app.HavenoDaemonMain'
apply plugin: 'com.github.johnrengelman.shadow'
dependencies {
implementation project(':proto')
implementation project(':common')