Skip to content

Commit 5858ea7

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

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+
# See: https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#pull_request.
8+
pull_request:
9+
# See: https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#push.
10+
push:
11+
branches:
12+
- '**'
13+
tags-ignore:
14+
- '**'
15+
16+
jobs:
17+
build:
18+
runs-on: ${{matrix.os}}
19+
strategy:
20+
fail-fast: false
21+
matrix:
22+
os: [macos-14, ubuntu-22.04]
23+
24+
steps:
25+
- name: Checkout
26+
uses: actions/checkout@v4
27+
28+
- name: MacOS Install Deps
29+
if: contains(matrix.os, 'macos')
30+
run: |
31+
brew install cmake ccache boost pkgconf libevent qt@6 qrencode coreutils
32+
echo "CCACHE_DIR=${{ runner.temp }}/ccache" >> "$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+
44+
- name: Restore Ccache cache
45+
uses: actions/cache/restore@v4
46+
id: ccache-cache
47+
with:
48+
path: ${{ env.CCACHE_DIR }}
49+
key: ${{ matrix.os }}-ccache-${{ github.run_id }}
50+
restore-keys: ${{ matrix.os }}-ccache-
51+
52+
- name: Build
53+
run: |
54+
git submodule update --init
55+
cmake -B build
56+
cmake --build build -j$(nproc)
57+
58+
- name: Save Ccache cache
59+
uses: actions/cache/save@v4
60+
if: github.event_name != 'pull_request' && steps.ccache-cache.outputs.cache-hit != 'true'
61+
with:
62+
path: ${{ env.CCACHE_DIR }}
63+
key: ${{ matrix.os }}-ccache-${{ github.run_id }}
64+
65+
- uses: actions/upload-artifact@v4
66+
with:
67+
name: unsecure_${{ matrix.os }}_gui
68+
path: build/bin/bitcoin-core-app
69+

0 commit comments

Comments
 (0)