Skip to content

fix: auto-consolidate fragmented UTXOs when minting DigiDollar #943

fix: auto-consolidate fragmented UTXOs when minting DigiDollar

fix: auto-consolidate fragmented UTXOs when minting DigiDollar #943

Workflow file for this run

# Copyright (c) 2023 The DigiByte Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
name: CI
on:
# See: https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#pull_request.
pull_request:
# Allow manual triggering from the Actions tab.
workflow_dispatch:
# See: https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#push.
push:
branches:
- develop
- master
- 'release/**'
tags-ignore:
- '**'
concurrency:
group: ${{ github.event_name != 'pull_request' && github.run_id || github.ref }}
cancel-in-progress: true
env:
DANGER_RUN_CI_ON_HOST: 1
CI_FAILFAST_TEST_LEAVE_DANGLING: 1 # GHA does not care about dangling processes and setting this variable avoids killing the CI script itself on error
MAKEJOBS: '-j10'
jobs:
macos-native-arm64:
name: 'macOS 14 native, ARM64, Qt GUI, with depends, unit tests, functional tests'
# Use latest M1 runner
runs-on: macos-14
# No need to run on the read-only mirror, unless it is a PR.
if: github.repository != 'digibyte-core/gui' || github.event_name == 'pull_request'
timeout-minutes: 120
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Clang version
run: |
clang --version
- name: Cache Homebrew
id: brew-cache
uses: actions/cache@v3
with:
path: |
~/Library/Caches/Homebrew
/opt/homebrew/Cellar
/opt/homebrew/opt
key: ${{ github.job }}-brew-${{ hashFiles('.github/workflows/ci.yml') }}
restore-keys: ${{ github.job }}-brew-
- name: Install Homebrew packages
env:
HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK: 1
HOMEBREW_NO_AUTO_UPDATE: 1
run: |
# A workaround for "The `brew link` step did not complete successfully" error.
brew install python@3 || brew link --overwrite python@3
brew install autoconf automake libtool pkg-config gnu-getopt ccache boost libevent miniupnpc libnatpmp zeromq qt@5 qrencode || true
# Force link all required tools
brew link --force --overwrite autoconf automake libtool ccache boost miniupnpc libnatpmp zeromq qt@5 qrencode || true
- name: Set Ccache directory
run: echo "CCACHE_DIR=${RUNNER_TEMP}/ccache_dir" >> "$GITHUB_ENV"
- name: Restore Ccache cache
id: ccache-cache
uses: actions/cache/restore@v3
with:
path: ${{ env.CCACHE_DIR }}
key: ${{ github.job }}-ccache-${{ github.run_id }}
restore-keys: ${{ github.job }}-ccache-
- name: Install Python Packages
run: |
pip3 install --break-system-packages pypandoc digibyte_scrypt pyzmq
- name: Restore depends cache
id: depends-cache
uses: actions/cache/restore@v3
with:
path: depends/arm64-apple-darwin
key: ${{ github.job }}-depends-${{ hashFiles('depends/packages/**') }}
restore-keys: ${{ github.job }}-depends-
- name: Build Dependencies
if: steps.depends-cache.outputs.cache-hit != 'true'
run: |
cd depends
make -j2 HOST=arm64-apple-darwin
cd ..
- name: Save depends cache
uses: actions/cache/save@v3
if: github.event_name != 'pull_request' && steps.depends-cache.outputs.cache-hit != 'true'
with:
path: depends/arm64-apple-darwin
key: ${{ github.job }}-depends-${{ hashFiles('depends/packages/**') }}
- name: Cache build artifacts
id: build-cache
uses: actions/cache@v3
with:
path: |
src/digibyte
src/digibyte-cli
src/digibyte-tx
src/qt/digibyte-qt
src/test/test_digibyte
src/bench/bench_digibyte
key: ${{ github.job }}-build-${{ hashFiles('src/**/*.cpp', 'src/**/*.h', 'depends/arm64-apple-darwin/**') }}
restore-keys: ${{ github.job }}-build-
- name: Configure and Build
run: |
# Set paths for macOS tools
export PATH="$(brew --prefix)/bin:$(brew --prefix)/opt/automake/bin:$(brew --prefix)/opt/autoconf/bin:$(brew --prefix)/opt/libtool/bin:$PATH"
export Qt5_DIR="$(brew --prefix qt@5)"
export PATH="$Qt5_DIR/bin:$PATH"
export PKG_CONFIG_PATH="$Qt5_DIR/lib/pkgconfig:$PKG_CONFIG_PATH"
./autogen.sh
CONFIG_SITE=$PWD/depends/arm64-apple-darwin/share/config.site ./configure --with-gui=yes --enable-reduce-exports
make -j2
- name: Run Unit Tests
run: ./src/test/test_digibyte --show_progress
- name: Run Functional Tests
run: >-
test/functional/test_runner.py
--jobs=1
--timeout-factor=3
- name: Upload Test Suite Log
uses: actions/upload-artifact@v4
if: failure()
with:
name: arm64-test-suite-log
path: src/test-suite.log
- name: Save Ccache cache
uses: actions/cache/save@v3
if: github.event_name != 'pull_request' && steps.ccache-cache.outputs.cache-hit != 'true'
with:
path: ${{ env.CCACHE_DIR }}
# https://github.com/actions/cache/blob/main/tips-and-workarounds.md#update-a-cache
key: ${{ github.job }}-ccache-${{ github.run_id }}
- name: Save Homebrew cache
uses: actions/cache/save@v3
if: steps.brew-cache.outputs.cache-hit != 'true'
with:
path: |
~/Library/Caches/Homebrew
/opt/homebrew/Cellar
/opt/homebrew/opt
key: ${{ github.job }}-brew-${{ hashFiles('.github/workflows/ci.yml') }}
linux-native:
name: 'Ubuntu 22.04 native, Qt GUI, with depends, unit tests, functional tests'
runs-on: ubuntu-22.04
# No need to run on the read-only mirror, unless it is a PR.
if: github.repository != 'digibyte-core/gui' || github.event_name == 'pull_request'
timeout-minutes: 120
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y build-essential libtool autotools-dev automake pkg-config bsdmainutils python3-zmq python3 libevent-dev libboost-dev libsqlite3-dev libdb++-dev systemtap-sdt-dev libminiupnpc-dev libnatpmp-dev qtbase5-dev qttools5-dev qttools5-dev-tools qtwayland5 libqrencode-dev ccache curl ca-certificates
- name: Set Ccache directory
run: echo "CCACHE_DIR=${RUNNER_TEMP}/ccache_dir" >> "$GITHUB_ENV"
- name: Restore Ccache cache
id: ccache-cache
uses: actions/cache/restore@v3
with:
path: ${{ env.CCACHE_DIR }}
key: ${{ github.job }}-ccache-${{ github.run_id }}
restore-keys: ${{ github.job }}-ccache-
- name: Install Python Packages
run: |
pip3 install pypandoc digibyte_scrypt pyzmq
- name: Restore depends cache
id: depends-cache
uses: actions/cache/restore@v3
with:
path: depends/x86_64-pc-linux-gnu
key: ${{ github.job }}-depends-${{ hashFiles('depends/packages/**') }}
restore-keys: ${{ github.job }}-depends-
- name: Build Dependencies
if: steps.depends-cache.outputs.cache-hit != 'true'
run: |
cd depends
make -j$(nproc) HOST=x86_64-pc-linux-gnu
cd ..
- name: Save depends cache
uses: actions/cache/save@v3
if: github.event_name != 'pull_request' && steps.depends-cache.outputs.cache-hit != 'true'
with:
path: depends/x86_64-pc-linux-gnu
key: ${{ github.job }}-depends-${{ hashFiles('depends/packages/**') }}
- name: Cache build artifacts
id: build-cache
uses: actions/cache@v3
with:
path: |
src/digibyte
src/digibyte-cli
src/digibyte-tx
src/qt/digibyte-qt
src/test/test_digibyte
src/bench/bench_digibyte
key: ${{ github.job }}-build-${{ hashFiles('src/**/*.cpp', 'src/**/*.h', 'depends/x86_64-pc-linux-gnu/**') }}
restore-keys: ${{ github.job }}-build-
- name: Configure and Build
run: |
./autogen.sh
CONFIG_SITE=$PWD/depends/x86_64-pc-linux-gnu/share/config.site ./configure --with-gui=yes --enable-reduce-exports
make -j$(nproc)
- name: Run Unit Tests
run: ./src/test/test_digibyte --show_progress
- name: Run Functional Tests
run: test/functional/test_runner.py --jobs=1 --timeout-factor=2
- name: Upload Test Suite Log
uses: actions/upload-artifact@v4
if: failure()
with:
name: linux-test-suite-log
path: src/test-suite.log
- name: Save Ccache cache
uses: actions/cache/save@v3
if: github.event_name != 'pull_request' && steps.ccache-cache.outputs.cache-hit != 'true'
with:
path: ${{ env.CCACHE_DIR }}
# https://github.com/actions/cache/blob/main/tips-and-workarounds.md#update-a-cache
key: ${{ github.job }}-ccache-${{ github.run_id }}