Skip to content

Commit df83ecf

Browse files
committed
build artifacts in CI
1 parent 1091c9f commit df83ecf

File tree

1 file changed

+69
-0
lines changed

1 file changed

+69
-0
lines changed

.github/workflows/artifacts.yml

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
# Copyright (c) 2025 The Bitcoin Core developers
2+
# Distributed under the MIT software license, see the accompanying
3+
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
4+
5+
name: Artifacts
6+
on:
7+
pull_request:
8+
push:
9+
branches:
10+
- '**'
11+
tags-ignore:
12+
- '**'
13+
14+
jobs:
15+
build:
16+
runs-on: ${{ matrix.os }}
17+
strategy:
18+
fail-fast: false
19+
matrix:
20+
os: [macos-14, ubuntu-22.04]
21+
22+
steps:
23+
- name: Checkout
24+
uses: actions/checkout@v4
25+
26+
- name: MacOS Install Deps
27+
if: contains(matrix.os, 'macos')
28+
run: |
29+
brew install cmake ccache boost pkgconf libevent qt@6 qrencode coreutils
30+
echo "CCACHE_DIR=${{ runner.temp }}/ccache" >> "$GITHUB_ENV"
31+
echo "BOOST_ROOT=$BOOST_ROOT" >> "$GITHUB_ENV"
32+
echo "EXTRA_CMAKE_ARGS=-DBOOST_ROOT=$BOOST_ROOT -DCMAKE_INCLUDE_PATH=$BOOST_ROOT/include" >> "$GITHUB_ENV"
33+
34+
- name: Ubuntu Install Deps
35+
if: contains(matrix.os, 'ubuntu')
36+
run: |
37+
sudo apt-get update && sudo apt-get install -y \
38+
build-essential ccache cmake pkgconf \
39+
libevent-dev libboost-dev libsqlite3-dev libgl-dev libqrencode-dev \
40+
qt6-base-dev qt6-tools-dev qt6-l10n-tools qt6-tools-dev-tools \
41+
qt6-declarative-dev qml6-module-qtquick qml6-module-qtqml
42+
echo "CCACHE_DIR=${{ runner.temp }}/ccache" >> "$GITHUB_ENV"
43+
echo 'EXTRA_CMAKE_ARGS=""' >> "$GITHUB_ENV"
44+
45+
- name: Restore Ccache cache
46+
uses: actions/cache/restore@v4
47+
id: ccache-cache
48+
with:
49+
path: ${{ env.CCACHE_DIR }}
50+
key: ${{ matrix.os }}-ccache-${{ github.run_id }}
51+
restore-keys: ${{ matrix.os }}-ccache-
52+
53+
- name: Build
54+
run: |
55+
git submodule update --init
56+
cmake -B build $EXTRA_CMAKE_ARGS
57+
cmake --build build -j$(nproc)
58+
59+
- name: Save Ccache cache
60+
uses: actions/cache/save@v4
61+
if: github.event_name != 'pull_request' && steps.ccache-cache.outputs.cache-hit != 'true'
62+
with:
63+
path: ${{ env.CCACHE_DIR }}
64+
key: ${{ matrix.os }}-ccache-${{ github.run_id }}
65+
66+
- uses: actions/upload-artifact@v4
67+
with:
68+
name: unsecure_${{ matrix.os }}_gui
69+
path: build/bin/bitcoin-core-app

0 commit comments

Comments
 (0)