|
| 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 | + if [[ "${{ matrix.os }}" == macos* ]]; then |
| 56 | + export CPLUS_INCLUDE_PATH="$(brew --prefix boost)/include" |
| 57 | + export LIBRARY_PATH="$(brew --prefix boost)/lib" |
| 58 | + fi |
| 59 | + cmake -B build |
| 60 | + cmake --build build -j$(nproc) |
| 61 | +
|
| 62 | + - name: Save Ccache cache |
| 63 | + uses: actions/cache/save@v4 |
| 64 | + if: github.event_name != 'pull_request' && steps.ccache-cache.outputs.cache-hit != 'true' |
| 65 | + with: |
| 66 | + path: ${{ env.CCACHE_DIR }} |
| 67 | + key: ${{ matrix.os }}-ccache-${{ github.run_id }} |
| 68 | + |
| 69 | + - uses: actions/upload-artifact@v4 |
| 70 | + with: |
| 71 | + name: unsecure_${{ matrix.os }}_gui |
| 72 | + path: build/bin/bitcoin-core-app |
| 73 | + |
0 commit comments