mac // build
This commit is contained in:
parent
02eda0b6cb
commit
3529b2271e
|
@ -7,8 +7,30 @@ on:
|
|||
- "v*"
|
||||
|
||||
jobs:
|
||||
build_mac:
|
||||
build_rust:
|
||||
runs-on: macos-12
|
||||
strategy:
|
||||
matrix:
|
||||
arch: [x86_64, aarch64]
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
submodules: recursive
|
||||
|
||||
- name: download params
|
||||
run: ./build-scripts/mac/download-params.sh
|
||||
|
||||
- name: build
|
||||
run: ./build-scripts/mac/build-${{ matrix.arch }}.sh
|
||||
|
||||
- uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: ${{ matrix.arch }}
|
||||
path: target/${{ matrix.arch }}-apple-darwin/release
|
||||
|
||||
build_flutter:
|
||||
runs-on: macos-12
|
||||
needs: build_rust
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
|
@ -19,8 +41,18 @@ jobs:
|
|||
cat build.env >> $GITHUB_ENV
|
||||
echo $PWD/flutter/bin >> $GITHUB_PATH
|
||||
|
||||
- name: build
|
||||
run: ./build-scripts/mac/build-mac.sh "$FLUTTER_VERSION"
|
||||
- uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: x86_64
|
||||
path: target/x86_64-apple-darwin/release
|
||||
|
||||
- uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: aarch64
|
||||
path: target/aarch64-apple-darwin/release
|
||||
|
||||
- name: build flutter
|
||||
run: ./build-scripts/mac/build-flutter.sh "$FLUTTER_VERSION"
|
||||
|
||||
- name: codesign
|
||||
env:
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
set -x
|
||||
rustup target add aarch64-apple-darwin
|
||||
cargo b -r --target=aarch64-apple-darwin --features=dart_ffi,sqlcipher,ledger
|
||||
cd target/aarch64-apple-darwin/release
|
||||
rm -rf build examples deps incremental
|
|
@ -0,0 +1,9 @@
|
|||
mkdir -p target/universal/release
|
||||
lipo target/x86_64-apple-darwin/release/libwarp_api_ffi.dylib target/aarch64-apple-darwin/release/libwarp_api_ffi.dylib -output target/universal/release/libwarp_api_ffi.dylib -create
|
||||
cp native/zcash-sync/binding.h packages/warp_api_ffi/ios/Classes/binding.h
|
||||
|
||||
git clone -b "$1" --depth 1 https://github.com/flutter/flutter.git flutter
|
||||
flutter doctor -v
|
||||
|
||||
./configure.sh
|
||||
flutter build macos
|
|
@ -1,23 +0,0 @@
|
|||
pushd $HOME
|
||||
mkdir .zcash-params
|
||||
curl https://download.z.cash/downloads/sapling-output.params --output .zcash-params/sapling-output.params
|
||||
curl https://download.z.cash/downloads/sapling-spend.params --output .zcash-params/sapling-spend.params
|
||||
|
||||
rustup target add aarch64-apple-darwin
|
||||
popd
|
||||
|
||||
git clone -b "$1" --depth 1 https://github.com/flutter/flutter.git flutter
|
||||
flutter doctor -v
|
||||
|
||||
sed -e 's/rlib/cdylib/' < native/zcash-sync/Cargo.toml >/tmp/out.toml
|
||||
mv /tmp/out.toml native/zcash-sync/Cargo.toml
|
||||
|
||||
cargo b -r --target=x86_64-apple-darwin --features=dart_ffi,sqlcipher,ledger
|
||||
cargo b -r --target=aarch64-apple-darwin --features=dart_ffi,sqlcipher,ledger
|
||||
|
||||
mkdir -p target/universal/release
|
||||
lipo target/x86_64-apple-darwin/release/libwarp_api_ffi.dylib target/aarch64-apple-darwin/release/libwarp_api_ffi.dylib -output target/universal/release/libwarp_api_ffi.dylib -create
|
||||
cp native/zcash-sync/binding.h packages/warp_api_ffi/ios/Classes/binding.h
|
||||
|
||||
./configure.sh
|
||||
flutter build macos
|
|
@ -0,0 +1,4 @@
|
|||
set -x
|
||||
cargo b -r --target=x86_64-apple-darwin --features=dart_ffi,sqlcipher,ledger
|
||||
cd target/x86_64-apple-darwin/release
|
||||
rm -rf build examples deps incremental
|
|
@ -0,0 +1,8 @@
|
|||
pushd $HOME
|
||||
mkdir .zcash-params
|
||||
curl https://download.z.cash/downloads/sapling-output.params --output .zcash-params/sapling-output.params
|
||||
curl https://download.z.cash/downloads/sapling-spend.params --output .zcash-params/sapling-spend.params
|
||||
popd
|
||||
|
||||
sed -e 's/rlib/cdylib/' < native/zcash-sync/Cargo.toml >/tmp/out.toml
|
||||
mv /tmp/out.toml native/zcash-sync/Cargo.toml
|
Loading…
Reference in New Issue