Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: Improve GitHub Actions workflow for automated builds and testing #259

Merged
merged 4 commits into from
Dec 20, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,9 +1,20 @@
name: 'Build & Check: Ubuntu Full QT & Tests'
# 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: DigiByte CI

on:
pull_request:
branches: [ develop, master ]

concurrency:
group: ${{ github.event_name != 'pull_request' && github.run_id || github.ref }}
cancel-in-progress: true

env:
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

jobs:
build:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -38,9 +49,8 @@ jobs:
depends/sdk-sources
depends/work
depends/x86_64-linux-gnu
key: v1-${{ runner.os }}-depends-${{ hashFiles('depends/Makefile') }}-${{ github.sha }}
key: v1-${{ runner.os }}-depends-${{ hashFiles('depends/Makefile') }}
restore-keys: |
v1-${{ runner.os }}-depends-${{ hashFiles('depends/Makefile') }}-
v1-${{ runner.os }}-depends-

- name: Install Build Dependencies
Expand All @@ -67,17 +77,17 @@ jobs:
if: steps.cache-depends.outputs.cache-hit != 'true'
run: |
cd depends
make -j3 HOST=x86_64-linux-gnu
make -j$(nproc) HOST=x86_64-linux-gnu
cd ..

- name: Configure and Build
run: |
./autogen.sh
CONFIG_SITE=$PWD/depends/x86_64-linux-gnu/share/config.site ./configure --with-bdb --with-sqlite --with-gui=yes
make -j3
CONFIG_SITE=$PWD/depends/x86_64-linux-gnu/share/config.site ./configure --with-bdb --with-sqlite --with-gui=yes --with-zmq
make -j$(nproc)

- name: Run Tests
run: make check -j3
run: make check -j$(nproc)

- name: Upload Test Suite Log
uses: actions/upload-artifact@v3
Expand Down
Loading