Skip to content

Commit

Permalink
Merge branch 'bitcoin-core:main' into wsl-install-guide
Browse files Browse the repository at this point in the history
  • Loading branch information
D33r-Gee authored Dec 1, 2023
2 parents a4bf253 + bc6f872 commit 9ca8bb2
Show file tree
Hide file tree
Showing 955 changed files with 29,232 additions and 15,321 deletions.
418 changes: 0 additions & 418 deletions .cirrus.yml

This file was deleted.

10 changes: 4 additions & 6 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,9 @@ patches often sit for a long time.
-->

<!--
Links for Windows and macOS build artifacts. Replace <PR> with the assigned pull request number.
Link to github actions build artifacts.
[![Build Artifacts](https://img.shields.io/badge/Build%20Artifacts-green
)]()
[![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>)
[![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>)
[![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>)
[![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>)
[![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>)
-->
189 changes: 189 additions & 0 deletions .github/workflows/artifacts.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,189 @@
# Copyright (c) 2023 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.

name: Artifacts
on:
# See: https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#pull_request.
pull_request:
# See: https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#push.
push:
branches:
- '**'
tags-ignore:
- '**'

concurrency:
group: ${{ github.workflow }}${{ github.event_name != 'pull_request' && github.run_id || github.ref }}
cancel-in-progress: true

jobs:
cross-build:
name: ${{ matrix.host.name }}
runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
host:
- name: 'macOS arm64'
packages: ''
triplet: 'arm64-apple-darwin'
compiler: 'clang'
configure_options: ''
gui_exe: 'bitcoin-qt'
artifact: 'unsecure_macos_apple_silicon_gui'
- name: 'macOS x86_64'
packages: ''
triplet: 'x86_64-apple-darwin'
compiler: 'clang'
configure_options: ''
gui_exe: 'bitcoin-qt'
artifact: 'unsecure_macos_intel_gui'
- name: 'Windows'
packages: 'g++-mingw-w64-x86-64-posix'
triplet: 'x86_64-w64-mingw32'
compiler: 'x86_64-w64-mingw32-g++-posix'
configure_options: 'CXXFLAGS=-Wno-return-type'
gui_exe: 'bitcoin-qt.exe'
artifact: 'unsecure_windows_gui'

env:
XCODE_VERSION: '12.2'
XCODE_BUILD_ID: '12B45b'
CCACHE_MAXSIZE: '30M'

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Install dependency packages
run: |
sudo apt-get update
sudo apt-get install ccache ${{ matrix.host.packages }}
echo "CCACHE_DIR=${{ runner.temp }}/ccache" >> "$GITHUB_ENV"
- name: Depends fingerprint
id: depends_fingerprint
run: |
if ${{ !endsWith(matrix.host.triplet, '-apple-darwin') }}; then ${{ matrix.host.compiler }} -v 2>&1 | tee depends/compiler-version; fi
if ${{ endsWith(matrix.host.triplet, '-apple-darwin') }}; then echo ${{ env.XCODE_VERSION }} ${{ env.XCODE_BUILD_ID }} > depends/sdk-version; fi
echo "hash=${{ hashFiles('./depends/**') }}" >> "$GITHUB_OUTPUT"
- name: Depends cache
id: depends_cache
uses: actions/cache@v3
with:
path: |
depends/built
depends/SDKs
key: ${{ matrix.host.triplet }}-depends-${{ steps.depends_fingerprint.outputs.hash }}

- name: Fetch SDK
if: endsWith(matrix.host.triplet, '-apple-darwin') && steps.depends_cache.outputs.cache-hit != 'true'
run: |
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
mkdir depends/SDKs
tar -C depends/SDKs -xf sdk.tar.gz
- name: Build depends
run: |
patch -p1 -i ci/hosts_darwin_mk.patch
cd depends
make -j$(nproc) HOST=${{ matrix.host.triplet }} LOG=1
- name: Restore Ccache cache
uses: actions/cache/restore@v3
id: ccache-cache
with:
path: ${{ env.CCACHE_DIR }}
key: ${{ matrix.host.triplet }}-ccache-${{ github.run_id }}
restore-keys: ${{ matrix.host.triplet }}-ccache-

- name: Configure
run: |
./autogen.sh
./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)
- name: Build GUI
run: |
ccache --zero-stats
make -j$(nproc) src/qt/${{ matrix.host.gui_exe }}
ccache --version | head -n 1 && ccache --show-stats
- name: Save Ccache cache
uses: actions/cache/save@v3
if: github.event_name != 'pull_request' && steps.ccache-cache.outputs.cache-hit != 'true'
with:
path: ${{ env.CCACHE_DIR }}
key: ${{ matrix.host.triplet }}-ccache-${{ github.run_id }}

- uses: actions/upload-artifact@v3
with:
name: ${{ matrix.host.artifact }}
path: src/qt/${{ matrix.host.gui_exe }}

android:
name: ${{ matrix.host.name }}
runs-on: ubuntu-latest
container: ubuntu:22.04

strategy:
fail-fast: false
matrix:
host:
- name: 'Android ARM 64-bit APK'
triplet: 'aarch64-linux-android'
artifact: 'unsecure_android_arm64'
- name: 'Android ARM 32-bit APK'
triplet: 'armv7a-linux-android'
artifact: 'unsecure_android_arm32'
- name: 'Android x86_64 APK'
triplet: 'x86_64-linux-android'
artifact: 'unsecure_android_x86_64'

env:
ANDROID_HOME: '/tmp/Android'
ANDROID_API_LEVEL: '28'
ANDROID_BUILD_TOOLS_VERSION: '28.0.3'
ANDROID_NDK_VERSION: '23.2.8568313'
ANDROID_TOOLS_URL: 'https://dl.google.com/android/repository/commandlinetools-linux-8512546_latest.zip'

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Install dependency packages
run: |
apt-get update
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
- name: Install Android tools
run: |
curl --location --fail ${{ env.ANDROID_TOOLS_URL }} -o android-tools.zip
mkdir -p ${{ env.ANDROID_HOME }}
unzip -o android-tools.zip -d ${{ env.ANDROID_HOME }}
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 }}"
- name: Build depends
run: |
cd depends
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
- name: Configure
run: |
./autogen.sh
./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)
- name: Build GUI
run: |
make -j$(nproc) -C src/qt bitcoin-qt
- name: Build APK
run: |
make -j$(nproc) -C src/qt apk
- uses: actions/upload-artifact@v3
with:
name: ${{ matrix.host.artifact }}
path: src/qt/android/build/outputs/apk/debug/android-debug.apk
Loading

0 comments on commit 9ca8bb2

Please sign in to comment.