mirror of
https://github.com/haveno-dex/haveno.git
synced 2025-12-16 16:24:29 -05:00
Build daemon.jar using GitHub actions (#2054)
This commit is contained in:
parent
604bd4b58c
commit
0d2fe8c1b3
3 changed files with 48 additions and 1 deletions
44
.github/workflows/build.yml
vendored
44
.github/workflows/build.yml
vendored
|
|
@ -101,6 +101,13 @@ jobs:
|
||||||
run: ./gradlew packageInstallers
|
run: ./gradlew packageInstallers
|
||||||
working-directory: .
|
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
|
# get version from jar
|
||||||
- name: Set Version Unix
|
- name: Set Version Unix
|
||||||
if: runner.os != 'Windows'
|
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
|
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
|
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
|
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
|
# Windows artifacts
|
||||||
- uses: actions/upload-artifact@v4
|
- uses: actions/upload-artifact@v4
|
||||||
name: "Windows artifacts"
|
name: "Windows artifacts"
|
||||||
|
|
@ -224,6 +256,16 @@ jobs:
|
||||||
${{ github.workspace }}/release-windows/haveno-v${{ env.VERSION }}-windows-x86_64-installer.exe
|
${{ 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
|
${{ 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
|
# https://git-scm.com/docs/git-tag - git-tag Docu
|
||||||
#
|
#
|
||||||
# git tag - lists all local tags
|
# git tag - lists all local tags
|
||||||
|
|
|
||||||
3
Makefile
3
Makefile
|
|
@ -17,6 +17,9 @@ haveno:
|
||||||
update-dependencies:
|
update-dependencies:
|
||||||
./gradlew --refresh-dependencies && ./gradlew --write-verification-metadata sha256
|
./gradlew --refresh-dependencies && ./gradlew --write-verification-metadata sha256
|
||||||
|
|
||||||
|
daemon: localnet
|
||||||
|
./gradlew :daemon:shadowJar -x test -x checkstyleMain -x checkstyleTest
|
||||||
|
|
||||||
# build haveno without tests
|
# build haveno without tests
|
||||||
skip-tests: localnet
|
skip-tests: localnet
|
||||||
./gradlew build -x test -x checkstyleMain -x checkstyleTest
|
./gradlew build -x test -x checkstyleMain -x checkstyleTest
|
||||||
|
|
|
||||||
|
|
@ -791,6 +791,8 @@ configure(project(':statsnode')) {
|
||||||
configure(project(':daemon')) {
|
configure(project(':daemon')) {
|
||||||
mainClassName = 'haveno.daemon.app.HavenoDaemonMain'
|
mainClassName = 'haveno.daemon.app.HavenoDaemonMain'
|
||||||
|
|
||||||
|
apply plugin: 'com.github.johnrengelman.shadow'
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation project(':proto')
|
implementation project(':proto')
|
||||||
implementation project(':common')
|
implementation project(':common')
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue