Skip to content

Commit 9ca8bb2

Browse files
authored
Merge branch 'bitcoin-core:main' into wsl-install-guide
2 parents a4bf253 + bc6f872 commit 9ca8bb2

File tree

955 files changed

+29232
-15321
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

955 files changed

+29232
-15321
lines changed

.cirrus.yml

-418
This file was deleted.

.github/PULL_REQUEST_TEMPLATE.md

+4-6
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,9 @@ patches often sit for a long time.
4343
-->
4444

4545
<!--
46-
Links for Windows and macOS build artifacts. Replace <PR> with the assigned pull request number.
46+
Link to github actions build artifacts.
47+
48+
[![Build Artifacts](https://img.shields.io/badge/Build%20Artifacts-green
49+
)]()
4750
48-
[![Windows](https://img.shields.io/badge/OS-Windows-green)](https://api.cirrus-ci.com/v1/artifact/github/bitcoin-core/gui-qml/win64/unsecure_win_gui.zip?branch=pull/<PR>)
49-
[![Intel macOS](https://img.shields.io/badge/OS-Intel%20macOS-green)](https://api.cirrus-ci.com/v1/artifact/github/bitcoin-core/gui-qml/macos/unsecure_mac_gui.zip?branch=pull/<PR>)
50-
[![Apple Silicon macOS](https://img.shields.io/badge/OS-Apple%20Silicon%20macOS-green)](https://api.cirrus-ci.com/v1/artifact/github/bitcoin-core/gui-qml/macos_arm64/unsecure_mac_arm64_gui.zip?branch=pull/<PR>)
51-
[![ARM64 Android](https://img.shields.io/badge/OS-Android-green)](https://api.cirrus-ci.com/v1/artifact/github/bitcoin-core/gui-qml/android/unsecure_android_apk.zip?branch=pull/<PR>)
52-
[![ARM32 Android](https://img.shields.io/badge/OS-Android%2032bit-green)](https://api.cirrus-ci.com/v1/artifact/github/bitcoin-core/gui-qml/android32/unsecure_android_32bit_apk.zip?branch=pull/<PR>)
5351
-->

.github/workflows/artifacts.yml

+189
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,189 @@
1+
# Copyright (c) 2023 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+
cross-build:
22+
name: ${{ matrix.host.name }}
23+
runs-on: ubuntu-latest
24+
25+
strategy:
26+
fail-fast: false
27+
matrix:
28+
host:
29+
- name: 'macOS arm64'
30+
packages: ''
31+
triplet: 'arm64-apple-darwin'
32+
compiler: 'clang'
33+
configure_options: ''
34+
gui_exe: 'bitcoin-qt'
35+
artifact: 'unsecure_macos_apple_silicon_gui'
36+
- name: 'macOS x86_64'
37+
packages: ''
38+
triplet: 'x86_64-apple-darwin'
39+
compiler: 'clang'
40+
configure_options: ''
41+
gui_exe: 'bitcoin-qt'
42+
artifact: 'unsecure_macos_intel_gui'
43+
- name: 'Windows'
44+
packages: 'g++-mingw-w64-x86-64-posix'
45+
triplet: 'x86_64-w64-mingw32'
46+
compiler: 'x86_64-w64-mingw32-g++-posix'
47+
configure_options: 'CXXFLAGS=-Wno-return-type'
48+
gui_exe: 'bitcoin-qt.exe'
49+
artifact: 'unsecure_windows_gui'
50+
51+
env:
52+
XCODE_VERSION: '12.2'
53+
XCODE_BUILD_ID: '12B45b'
54+
CCACHE_MAXSIZE: '30M'
55+
56+
steps:
57+
- name: Checkout
58+
uses: actions/checkout@v4
59+
60+
- name: Install dependency packages
61+
run: |
62+
sudo apt-get update
63+
sudo apt-get install ccache ${{ matrix.host.packages }}
64+
echo "CCACHE_DIR=${{ runner.temp }}/ccache" >> "$GITHUB_ENV"
65+
66+
- name: Depends fingerprint
67+
id: depends_fingerprint
68+
run: |
69+
if ${{ !endsWith(matrix.host.triplet, '-apple-darwin') }}; then ${{ matrix.host.compiler }} -v 2>&1 | tee depends/compiler-version; fi
70+
if ${{ endsWith(matrix.host.triplet, '-apple-darwin') }}; then echo ${{ env.XCODE_VERSION }} ${{ env.XCODE_BUILD_ID }} > depends/sdk-version; fi
71+
echo "hash=${{ hashFiles('./depends/**') }}" >> "$GITHUB_OUTPUT"
72+
73+
- name: Depends cache
74+
id: depends_cache
75+
uses: actions/cache@v3
76+
with:
77+
path: |
78+
depends/built
79+
depends/SDKs
80+
key: ${{ matrix.host.triplet }}-depends-${{ steps.depends_fingerprint.outputs.hash }}
81+
82+
- name: Fetch SDK
83+
if: endsWith(matrix.host.triplet, '-apple-darwin') && steps.depends_cache.outputs.cache-hit != 'true'
84+
run: |
85+
curl --location --fail https://bitcoincore.org/depends-sources/sdks/Xcode-${{ env.XCODE_VERSION }}-${{ env.XCODE_BUILD_ID }}-extracted-SDK-with-libcxx-headers.tar.gz -o sdk.tar.gz
86+
mkdir depends/SDKs
87+
tar -C depends/SDKs -xf sdk.tar.gz
88+
89+
- name: Build depends
90+
run: |
91+
patch -p1 -i ci/hosts_darwin_mk.patch
92+
cd depends
93+
make -j$(nproc) HOST=${{ matrix.host.triplet }} LOG=1
94+
95+
- name: Restore Ccache cache
96+
uses: actions/cache/restore@v3
97+
id: ccache-cache
98+
with:
99+
path: ${{ env.CCACHE_DIR }}
100+
key: ${{ matrix.host.triplet }}-ccache-${{ github.run_id }}
101+
restore-keys: ${{ matrix.host.triplet }}-ccache-
102+
103+
- name: Configure
104+
run: |
105+
./autogen.sh
106+
./configure CONFIG_SITE=${{ github.workspace }}/depends/${{ matrix.host.triplet }}/share/config.site --disable-dependency-tracking --enable-werror ${{ matrix.host.configure_options }} || (cat config.log; false)
107+
108+
- name: Build GUI
109+
run: |
110+
ccache --zero-stats
111+
make -j$(nproc) src/qt/${{ matrix.host.gui_exe }}
112+
ccache --version | head -n 1 && ccache --show-stats
113+
114+
- name: Save Ccache cache
115+
uses: actions/cache/save@v3
116+
if: github.event_name != 'pull_request' && steps.ccache-cache.outputs.cache-hit != 'true'
117+
with:
118+
path: ${{ env.CCACHE_DIR }}
119+
key: ${{ matrix.host.triplet }}-ccache-${{ github.run_id }}
120+
121+
- uses: actions/upload-artifact@v3
122+
with:
123+
name: ${{ matrix.host.artifact }}
124+
path: src/qt/${{ matrix.host.gui_exe }}
125+
126+
android:
127+
name: ${{ matrix.host.name }}
128+
runs-on: ubuntu-latest
129+
container: ubuntu:22.04
130+
131+
strategy:
132+
fail-fast: false
133+
matrix:
134+
host:
135+
- name: 'Android ARM 64-bit APK'
136+
triplet: 'aarch64-linux-android'
137+
artifact: 'unsecure_android_arm64'
138+
- name: 'Android ARM 32-bit APK'
139+
triplet: 'armv7a-linux-android'
140+
artifact: 'unsecure_android_arm32'
141+
- name: 'Android x86_64 APK'
142+
triplet: 'x86_64-linux-android'
143+
artifact: 'unsecure_android_x86_64'
144+
145+
env:
146+
ANDROID_HOME: '/tmp/Android'
147+
ANDROID_API_LEVEL: '28'
148+
ANDROID_BUILD_TOOLS_VERSION: '28.0.3'
149+
ANDROID_NDK_VERSION: '23.2.8568313'
150+
ANDROID_TOOLS_URL: 'https://dl.google.com/android/repository/commandlinetools-linux-8512546_latest.zip'
151+
152+
steps:
153+
- name: Checkout
154+
uses: actions/checkout@v4
155+
156+
- name: Install dependency packages
157+
run: |
158+
apt-get update
159+
apt-get install --no-install-recommends -y autoconf automake ca-certificates curl g++ gradle lbzip2 libtool make openjdk-8-jdk patch pkg-config python3 unzip xz-utils
160+
161+
- name: Install Android tools
162+
run: |
163+
curl --location --fail ${{ env.ANDROID_TOOLS_URL }} -o android-tools.zip
164+
mkdir -p ${{ env.ANDROID_HOME }}
165+
unzip -o android-tools.zip -d ${{ env.ANDROID_HOME }}
166+
yes | ${{ env.ANDROID_HOME }}/cmdline-tools/bin/sdkmanager --sdk_root=${{ env.ANDROID_HOME }} --install "build-tools;${{ env.ANDROID_BUILD_TOOLS_VERSION }}" "platform-tools" "platforms;android-31" "platforms;android-${{ env.ANDROID_API_LEVEL }}" "ndk;${{ env.ANDROID_NDK_VERSION }}"
167+
168+
- name: Build depends
169+
run: |
170+
cd depends
171+
make -j$(nproc) HOST=${{ matrix.host.triplet }} ANDROID_SDK=${{ env.ANDROID_HOME }} ANDROID_NDK=${{ env.ANDROID_HOME }}/ndk/${{ env.ANDROID_NDK_VERSION }} ANDROID_API_LEVEL=${{ env.ANDROID_API_LEVEL }} ANDROID_TOOLCHAIN_BIN=${{ env.ANDROID_HOME }}/ndk/${{ env.ANDROID_NDK_VERSION }}/toolchains/llvm/prebuilt/linux-x86_64/bin
172+
173+
- name: Configure
174+
run: |
175+
./autogen.sh
176+
./configure CONFIG_SITE=$PWD/depends/${{ matrix.host.triplet }}/share/config.site --disable-dependency-tracking --disable-tests --disable-bench --disable-fuzz-binary || (cat config.log; false)
177+
178+
- name: Build GUI
179+
run: |
180+
make -j$(nproc) -C src/qt bitcoin-qt
181+
182+
- name: Build APK
183+
run: |
184+
make -j$(nproc) -C src/qt apk
185+
186+
- uses: actions/upload-artifact@v3
187+
with:
188+
name: ${{ matrix.host.artifact }}
189+
path: src/qt/android/build/outputs/apk/debug/android-debug.apk

0 commit comments

Comments
 (0)