2021-05-04 20:20:30 -04:00
|
|
|
name: CI
|
|
|
|
|
|
|
|
on:
|
2024-03-19 22:03:47 -04:00
|
|
|
workflow_dispatch:
|
2021-05-04 20:20:30 -04:00
|
|
|
push:
|
|
|
|
pull_request:
|
|
|
|
paths-ignore:
|
|
|
|
- '**/README.md'
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
strategy:
|
|
|
|
matrix:
|
2024-05-09 18:03:00 -04:00
|
|
|
os: [ubuntu-latest, macos-13, windows-latest]
|
2021-05-04 20:20:30 -04:00
|
|
|
fail-fast: false
|
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
steps:
|
2024-03-09 10:36:37 -05:00
|
|
|
- uses: actions/checkout@v4
|
2021-05-04 20:20:30 -04:00
|
|
|
with:
|
|
|
|
lfs: true
|
2024-03-09 10:36:37 -05:00
|
|
|
- name: Set up JDK 21
|
|
|
|
uses: actions/setup-java@v4
|
2021-05-04 20:20:30 -04:00
|
|
|
with:
|
2024-03-09 10:36:37 -05:00
|
|
|
java-version: '21'
|
2021-05-04 20:20:30 -04:00
|
|
|
distribution: 'adopt'
|
2021-11-09 06:18:39 -05:00
|
|
|
cache: gradle
|
2022-09-30 05:54:51 -04:00
|
|
|
- name: Build with Gradle
|
|
|
|
run: ./gradlew build --stacktrace --scan
|
2024-05-09 18:03:00 -04:00
|
|
|
- uses: actions/upload-artifact@v3
|
|
|
|
if: failure()
|
|
|
|
with:
|
|
|
|
name: error-reports-${{ matrix.os }}
|
|
|
|
path: ${{ github.workspace }}/desktop/build/reports
|
2021-11-09 06:18:39 -05:00
|
|
|
- name: cache nodes dependencies
|
2023-03-17 13:43:33 -04:00
|
|
|
uses: actions/upload-artifact@v3
|
2021-11-09 06:18:39 -05:00
|
|
|
with:
|
|
|
|
name: cached-localnet
|
|
|
|
path: .localnet
|
2024-04-12 09:05:29 -04:00
|
|
|
- name: Install dependencies
|
|
|
|
if: ${{ matrix.os == 'ubuntu-latest' }}
|
|
|
|
run: |
|
|
|
|
sudo apt update
|
|
|
|
sudo apt install -y rpm
|
|
|
|
- name: Install WiX Toolset
|
|
|
|
if: ${{ matrix.os == 'windows-latest' }}
|
|
|
|
run: |
|
|
|
|
Invoke-WebRequest -Uri 'https://github.com/wixtoolset/wix3/releases/download/wix314rtm/wix314.exe' -OutFile wix314.exe
|
|
|
|
.\wix314.exe /quiet /norestart
|
|
|
|
shell: powershell
|
|
|
|
- name: Build Haveno Installer
|
|
|
|
run: |
|
|
|
|
./gradlew clean build --refresh-keys --refresh-dependencies
|
|
|
|
./gradlew packageInstallers
|
|
|
|
working-directory: .
|
|
|
|
- name: Move Release Files on Unix
|
2024-05-10 14:05:14 -04:00
|
|
|
if: ${{ matrix.os == 'ubuntu-latest' || matrix.os == 'macos-13' }}
|
2024-04-12 09:05:29 -04:00
|
|
|
run: |
|
|
|
|
mkdir ${{ github.workspace }}/release
|
|
|
|
if [ "${{ matrix.os }}" == "ubuntu-latest" ]; then
|
|
|
|
mv desktop/build/temp-*/binaries/haveno-*.rpm ${{ github.workspace }}/release
|
|
|
|
mv desktop/build/temp-*/binaries/haveno_*.deb ${{ github.workspace }}/release
|
|
|
|
else
|
|
|
|
mv desktop/build/temp-*/binaries/Haveno-*.dmg ${{ github.workspace }}/release
|
|
|
|
fi
|
|
|
|
mv desktop/build/temp-*/binaries/desktop-*.jar.SHA-256 ${{ github.workspace }}/release
|
|
|
|
shell: bash
|
|
|
|
- name: Move Release Files on Windows
|
|
|
|
if: ${{ matrix.os == 'windows-latest' }}
|
|
|
|
run: |
|
|
|
|
mkdir ${{ github.workspace }}/release
|
|
|
|
Move-Item -Path desktop\build\temp-*/binaries\Haveno-*.exe -Destination ${{ github.workspace }}/release
|
|
|
|
Move-Item -Path desktop\build\temp-*/binaries\desktop-*.jar.SHA-256 -Destination ${{ github.workspace }}/release
|
|
|
|
shell: powershell
|
|
|
|
- uses: actions/upload-artifact@v3
|
|
|
|
with:
|
|
|
|
name: HavenoInstaller-${{ matrix.os }}
|
|
|
|
path: ${{ github.workspace }}/release
|