CI: cache built *.dylib on macOS
note: the extra copies in make_osx.sh are needed because of the CI caching (pyinstaller needs to see the .dylib's inside electrum/, e.g. when importing electrum during Analysis)
This commit is contained in:
10
.cirrus.yml
10
.cirrus.yml
@@ -162,9 +162,11 @@ task:
|
||||
dll_cache:
|
||||
folder: contrib/build-wine/.cache/win32/dlls
|
||||
fingerprint_script:
|
||||
- echo $CIRRUS_TASK_NAME
|
||||
- cat contrib/make_libsecp256k1.sh | sha256sum
|
||||
- cat contrib/make_libusb.sh | sha256sum
|
||||
- cat contrib/make_zbar.sh | sha256sum
|
||||
- find contrib/build-wine/ -type f -print0 | sort -z | xargs -0 sha256sum | sha256sum
|
||||
populate_script: mkdir -p contrib/build-wine/.cache/win32/dlls
|
||||
build_script:
|
||||
- cd contrib/build-wine
|
||||
@@ -246,6 +248,14 @@ task:
|
||||
- find contrib/deterministic-build/*.txt -type f -print0 | sort -z | xargs -0 shasum -a 256 | shasum -a 256
|
||||
- find contrib/osx/ -type f -print0 | sort -z | xargs -0 shasum -a 256 | shasum -a 256
|
||||
populate_script: mkdir -p ~/Library/Caches/pip
|
||||
build2_cache:
|
||||
folder: contrib/osx/.cache
|
||||
fingerprint_script:
|
||||
- echo $CIRRUS_TASK_NAME
|
||||
- cat contrib/make_libsecp256k1.sh | shasum -a 256
|
||||
- cat contrib/make_libusb.sh | shasum -a 256
|
||||
- cat contrib/make_zbar.sh | shasum -a 256
|
||||
- find contrib/osx/ -type f -print0 | sort -z | xargs -0 shasum -a 256 | shasum -a 256
|
||||
install_script:
|
||||
- git fetch --all --tags
|
||||
build_script:
|
||||
|
||||
@@ -19,8 +19,9 @@ CONTRIB_OSX="$(dirname "$(realpath "$0")")"
|
||||
CONTRIB="$CONTRIB_OSX/.."
|
||||
PROJECT_ROOT="$CONTRIB/.."
|
||||
CACHEDIR="$CONTRIB_OSX/.cache"
|
||||
export DLL_TARGET_DIR="$CACHEDIR/dlls"
|
||||
|
||||
mkdir -p "$CACHEDIR"
|
||||
mkdir -p "$CACHEDIR" "$DLL_TARGET_DIR"
|
||||
|
||||
cd "$PROJECT_ROOT"
|
||||
|
||||
@@ -177,29 +178,29 @@ info "generating locale"
|
||||
) || fail "failed generating locale"
|
||||
|
||||
|
||||
if [ ! -f "$PROJECT_ROOT"/electrum/libsecp256k1.0.dylib ]; then
|
||||
if [ ! -f "$DLL_TARGET_DIR/libsecp256k1.0.dylib" ]; then
|
||||
info "Building libsecp256k1 dylib..."
|
||||
"$CONTRIB"/make_libsecp256k1.sh || fail "Could not build libsecp"
|
||||
else
|
||||
info "Skipping libsecp256k1 build: reusing already built dylib."
|
||||
fi
|
||||
cp "$PROJECT_ROOT"/electrum/libsecp256k1.0.dylib "$CONTRIB"/osx
|
||||
cp -f "$DLL_TARGET_DIR/libsecp256k1.0.dylib" "$PROJECT_ROOT/electrum/" || fail "Could not copy libsecp256k1 dylib"
|
||||
|
||||
if [ ! -f "$PROJECT_ROOT"/electrum/libzbar.0.dylib ]; then
|
||||
if [ ! -f "$DLL_TARGET_DIR/libzbar.0.dylib" ]; then
|
||||
info "Building ZBar dylib..."
|
||||
"$CONTRIB"/make_zbar.sh || fail "Could not build ZBar dylib"
|
||||
else
|
||||
info "Skipping ZBar build: reusing already built dylib."
|
||||
fi
|
||||
cp "$PROJECT_ROOT"/electrum/libzbar.0.dylib "$CONTRIB"/osx
|
||||
cp -f "$DLL_TARGET_DIR/libzbar.0.dylib" "$PROJECT_ROOT/electrum/" || fail "Could not copy ZBar dylib"
|
||||
|
||||
if [ ! -f "$PROJECT_ROOT"/electrum/libusb-1.0.dylib ]; then
|
||||
if [ ! -f "$DLL_TARGET_DIR/libusb-1.0.dylib" ]; then
|
||||
info "Building libusb dylib..."
|
||||
"$CONTRIB"/make_libusb.sh || fail "Could not build libusb dylib"
|
||||
else
|
||||
info "Skipping libusb build: reusing already built dylib."
|
||||
fi
|
||||
cp "$PROJECT_ROOT"/electrum/libusb-1.0.dylib "$CONTRIB"/osx
|
||||
cp -f "$DLL_TARGET_DIR/libusb-1.0.dylib" "$PROJECT_ROOT/electrum/" || fail "Could not copy libusb dylib"
|
||||
|
||||
|
||||
info "Installing requirements..."
|
||||
|
||||
@@ -48,9 +48,9 @@ datas += collect_data_files('ckcc')
|
||||
datas += collect_data_files('bitbox02')
|
||||
|
||||
# Add libusb so Trezor and Safe-T mini will work
|
||||
binaries = [(electrum + "contrib/osx/libusb-1.0.dylib", ".")]
|
||||
binaries += [(electrum + "contrib/osx/libsecp256k1.0.dylib", ".")]
|
||||
binaries += [(electrum + "contrib/osx/libzbar.0.dylib", ".")]
|
||||
binaries = [(electrum + "electrum/libusb-1.0.dylib", ".")]
|
||||
binaries += [(electrum + "electrum/libsecp256k1.0.dylib", ".")]
|
||||
binaries += [(electrum + "electrum/libzbar.0.dylib", ".")]
|
||||
|
||||
# Workaround for "Retro Look":
|
||||
binaries += [b for b in collect_dynamic_libs('PyQt5') if 'macstyle' in b[0]]
|
||||
|
||||
Reference in New Issue
Block a user