-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
46 changed files
with
3,288 additions
and
1,565 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,104 @@ | ||
name: ci/gh-actions/guix | ||
|
||
on: | ||
push: | ||
paths: | ||
- 'contrib/depends/**' | ||
- 'contrib/guix/**' | ||
- '!contrib/**.md' | ||
- '.github/workflows/guix.yml' | ||
pull_request: | ||
paths: | ||
- 'contrib/depends/**' | ||
- 'contrib/guix/**' | ||
- '!contrib/**.md' | ||
- '.github/workflows/guix.yml' | ||
|
||
jobs: | ||
cache-sources: | ||
runs-on: ubuntu-24.04 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
- name: depends sources cache | ||
id: cache | ||
uses: actions/cache@v4 | ||
with: | ||
path: contrib/depends/sources | ||
key: sources-${{ hashFiles('contrib/depends/packages/*') }} | ||
- name: download depends sources | ||
if: steps.cache.outputs.cache-hit != 'true' | ||
run: make -C contrib/depends download | ||
|
||
build-guix: | ||
runs-on: ubuntu-24.04 | ||
needs: [cache-sources] | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
toolchain: | ||
- target: "x86_64-linux-gnu" | ||
- target: "aarch64-linux-gnu" | ||
- target: "arm-linux-gnueabihf" | ||
- target: "riscv64-linux-gnu" | ||
- target: "i686-linux-gnu" | ||
- target: "x86_64-w64-mingw32" | ||
- target: "x86_64-unknown-freebsd" | ||
- target: "x86_64-apple-darwin" | ||
- target: "aarch64-apple-darwin" | ||
- target: "aarch64-linux-android" | ||
- target: "arm-linux-androideabi" | ||
|
||
name: ${{ matrix.toolchain.target }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
submodules: recursive | ||
- name: remove bundled packages | ||
# This is faster than rm -rf | ||
run: | | ||
sudo mkdir /empty | ||
sudo rsync -a --delete /empty/ /usr/local | ||
- name: depends sources cache | ||
uses: actions/cache/restore@v4 | ||
with: | ||
path: contrib/depends/sources | ||
key: sources-${{ hashFiles('contrib/depends/packages/*') }} | ||
- name: install dependencies | ||
run: sudo apt update; sudo apt -y install guix git ca-certificates | ||
- name: apparmor workaround | ||
# https://bugs.launchpad.net/ubuntu/+source/guix/+bug/2064115 | ||
run: | | ||
sudo tee /etc/apparmor.d/guix << EOF | ||
abi <abi/4.0>, | ||
include <tunables/global> | ||
profile guix /usr/bin/guix flags=(unconfined) { | ||
userns, | ||
include if exists <local/guix> | ||
} | ||
EOF | ||
sudo /etc/init.d/apparmor reload | ||
sudo aa-enforce guix || true | ||
sudo apt purge apparmor | ||
- name: build | ||
run: SUBSTITUTE_URLS='http://bordeaux.guix.gnu.org' HOSTS="${{ matrix.toolchain.target }}" ./contrib/guix/guix-build | ||
- uses: actions/upload-artifact@v4 | ||
with: | ||
name: ${{ matrix.toolchain.target }} | ||
path: | | ||
guix/guix-build-*/output/${{ matrix.toolchain.target }}/* | ||
guix/guix-build-*/logs/${{ matrix.toolchain.target }}/* | ||
bundle-logs: | ||
runs-on: ubuntu-24.04 | ||
needs: [build-guix] | ||
steps: | ||
- uses: actions/download-artifact@v4 | ||
with: | ||
merge-multiple: true | ||
- uses: actions/upload-artifact@v4 | ||
with: | ||
name: "logs" | ||
path: '**/logs/**' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,65 @@ | ||
OSX_MIN_VERSION=10.13 | ||
OSX_SDK_VERSION=11.0 | ||
XCODE_VERSION=12.2 | ||
XCODE_BUILD_ID=12B45b | ||
LD64_VERSION=609 | ||
ifeq (aarch64, $(host_arch)) | ||
CC_target=arm64-apple-$(host_os) | ||
else | ||
CC_target=$(host) | ||
endif | ||
darwin_CC=clang -target $(CC_target) -mmacosx-version-min=$(OSX_MIN_VERSION) --sysroot $(host_prefix)/native/SDK/ -iwithsysroot/usr/include -iframeworkwithsysroot/System/Library/Frameworks -mlinker-version=$(LD64_VERSION) -B$(host_prefix)/native/bin/$(host)- | ||
darwin_CXX=clang++ -target $(CC_target) -mmacosx-version-min=$(OSX_MIN_VERSION) --sysroot $(host_prefix)/native/SDK/ -iwithsysroot/usr/include/c++/v1 -iwithsysroot/usr/include -iframeworkwithsysroot/System/Library/Frameworks -mlinker-version=$(LD64_VERSION) -stdlib=libc++ -B$(host_prefix)/native/bin/$(host)- | ||
|
||
OSX_SDK=$(host_prefix)/native/SDK | ||
|
||
darwin_native_toolchain=darwin_sdk native_cctools | ||
|
||
clang_prog=$(shell $(SHELL) $(.SHELLFLAGS) "command -v clang") | ||
clangxx_prog=$(shell $(SHELL) $(.SHELLFLAGS) "command -v clang++") | ||
|
||
# Flag explanations: | ||
# | ||
# -mlinker-version | ||
# | ||
# Ensures that modern linker features are enabled. See here for more | ||
# details: https://github.com/bitcoin/bitcoin/pull/19407. | ||
# | ||
# -B$(build_prefix)/bin | ||
# | ||
# Explicitly point to our binaries (e.g. cctools) so that they are | ||
# ensured to be found and preferred over other possibilities. | ||
# | ||
# -isysroot$(OSX_SDK) -nostdlibinc | ||
# | ||
# Disable default include paths built into the compiler as well as | ||
# those normally included for libc and libc++. The only path that | ||
# remains implicitly is the clang resource dir. | ||
# | ||
# -iwithsysroot / -iframeworkwithsysroot | ||
# | ||
# Adds the desired paths from the SDK | ||
# | ||
|
||
darwin_CC=env -u C_INCLUDE_PATH -u CPLUS_INCLUDE_PATH \ | ||
-u OBJC_INCLUDE_PATH -u OBJCPLUS_INCLUDE_PATH -u CPATH \ | ||
-u LIBRARY_PATH \ | ||
$(clang_prog) --target=$(host) -mmacosx-version-min=$(OSX_MIN_VERSION) \ | ||
-B$(build_prefix)/bin -mlinker-version=$(LD64_VERSION) \ | ||
-isysroot$(OSX_SDK) \ | ||
-isysroot$(OSX_SDK) -nostdlibinc \ | ||
-iwithsysroot/usr/include -iframeworkwithsysroot/System/Library/Frameworks | ||
|
||
darwin_CXX=env -u C_INCLUDE_PATH -u CPLUS_INCLUDE_PATH \ | ||
-u OBJC_INCLUDE_PATH -u OBJCPLUS_INCLUDE_PATH -u CPATH \ | ||
-u LIBRARY_PATH \ | ||
$(clangxx_prog) --target=$(host) -mmacosx-version-min=$(OSX_MIN_VERSION) \ | ||
-B$(build_prefix)/bin -mlinker-version=$(LD64_VERSION) \ | ||
-isysroot$(OSX_SDK) -nostdlibinc \ | ||
-iwithsysroot/usr/include/c++/v1 \ | ||
-iwithsysroot/usr/include -iframeworkwithsysroot/System/Library/Frameworks | ||
|
||
darwin_CFLAGS=-pipe | ||
darwin_CXXFLAGS=$(darwin_CFLAGS) | ||
darwin_ARFLAGS=cr | ||
|
||
darwin_release_CFLAGS=-O1 | ||
darwin_release_CFLAGS=-O2 | ||
darwin_release_CXXFLAGS=$(darwin_release_CFLAGS) | ||
|
||
darwin_debug_CFLAGS=-O1 | ||
darwin_debug_CXXFLAGS=$(darwin_debug_CFLAGS) | ||
|
||
darwin_native_toolchain=native_cctools darwin_sdk | ||
|
||
darwin_cmake_system=Darwin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.