Skip to content

Commit c2bc9a5

Browse files
committed
build artifacts in CI
1 parent 023e4fb commit c2bc9a5

File tree

1 file changed

+68
-0
lines changed

1 file changed

+68
-0
lines changed

.github/workflows/artifacts.yml

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
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+
concurrency:
17+
group: ${{ github.workflow }}${{ github.event_name != 'pull_request' && github.run_id || github.ref }}
18+
cancel-in-progress: true
19+
20+
jobs:
21+
build:
22+
runs-on: ${{matrix.os}}
23+
strategy:
24+
matrix:
25+
os: [macos-latest, ubuntu-latest]
26+
27+
steps:
28+
- name: Checkout
29+
uses: actions/checkout@v4
30+
31+
- name: MacOS Install Deps
32+
if: matrix.os == 'macos-latest'
33+
run: |
34+
brew install cmake ccache boost pkgconf libevent qt@6 qrencode
35+
echo "CCACHE_DIR=${{ runner.temp }}/ccache" >> "$GITHUB_ENV"
36+
37+
- name: Ubuntu Install Deps
38+
if: matrix.os == 'ubuntu-latest'
39+
run: |
40+
sudo apt-get update && sudo apt-get install -y build-essential ccache cmake pkgconf libevent-dev libboost-dev libsqlite3-dev qt6-base-dev qt6-tools-dev qt6-l10n-tools qt6-tools-dev-tools libgl-dev libqrencode-dev
41+
echo "CCACHE_DIR=${{ runner.temp }}/ccache" >> "$GITHUB_ENV"
42+
43+
- name: Restore Ccache cache
44+
uses: actions/cache/restore@v4
45+
id: ccache-cache
46+
with:
47+
path: ${{ env.CCACHE_DIR }}
48+
key: ${{ matrix.os }}-ccache-${{ github.run_id }}
49+
restore-keys: ${{ matrix.os }}-ccache-
50+
51+
- name: Build
52+
run: |
53+
git submodule update --init --recursive --depth 1
54+
cmake -B build
55+
cmake --build build -j$(nproc)
56+
57+
- name: Save Ccache cache
58+
uses: actions/cache/save@v4
59+
if: github.event_name != 'pull_request' && steps.ccache-cache.outputs.cache-hit != 'true'
60+
with:
61+
path: ${{ env.CCACHE_DIR }}
62+
key: ${{ matrix.os }}-ccache-${{ github.run_id }}
63+
64+
- uses: actions/upload-artifact@v4
65+
with:
66+
name: unsecure_${{ matrix.os }}_gui
67+
path: build/bin/bitcoin-core-app
68+

0 commit comments

Comments
 (0)