Skip to content

Commit

Permalink
ci: improve architecture coverage for precompiled_binaries
Browse files Browse the repository at this point in the history
  • Loading branch information
ethicnology committed Jan 22, 2025
1 parent c97a3fc commit e1453b3
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 12 deletions.
39 changes: 27 additions & 12 deletions .github/workflows/precompiled_binaries.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
on:
push:
branches: [ main ]
branches: [ develop ]

name: Precompile Binaries
jobs:
Expand All @@ -16,28 +16,43 @@ jobs:
steps:
- uses: actions/checkout@v4
- uses: dart-lang/setup-dart@v1

- name: Install Rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly
override: true

- name: Set RUSTFLAGS for macOS
if: (matrix.os == 'macOS-latest')
run: |
echo "RUSTFLAGS=-C link-arg=-undefined -C link-arg=dynamic_lookup" >> $GITHUB_ENV
echo "MACOSX_DEPLOYMENT_TARGET=17.5" >> $GITHUB_ENV
echo "IPHONEOS_DEPLOYMENT_TARGET=17.5" >> $GITHUB_ENV
- name: Install Xcode Tools
if: (matrix.os == 'macOS-latest')
run: xcode-select --install || echo "Xcode tools already installed"

- name: Install GTK
if: (matrix.os == 'ubuntu-latest')
run: sudo apt-get update && sudo apt-get install libgtk-3-dev
- name: Set up Android SDK
if: (matrix.os == 'ubuntu-20.04')
uses: android-actions/setup-android@v2
uses: android-actions/setup-android@v2

- name: Install Specific NDK
if: (matrix.os == 'ubuntu-20.04')
run: sdkmanager --install "ndk;24.0.8215888"
- name: Precompile
if: (matrix.os == 'macOS-latest') || (matrix.os == 'windows-latest')
run: dart run build_tool precompile-binaries -v --manifest-dir=../../rust --repository=SatoshiPortal/boltz-dart
run: sdkmanager --install "ndk;25.1.8937393"
- name: Precompile (with iOS)
if: (matrix.os == 'macOS-latest')
run: dart run build_tool precompile-binaries -v --manifest-dir=../../rust --repository=SatoshiPortal/lwk-dart
working-directory: cargokit/build_tool
env:
GITHUB_TOKEN: ${{ secrets.RELEASE_GITHUB_TOKEN }}
PRIVATE_KEY: ${{ secrets.RELEASE_PRIVATE_KEY }}

- name: Precompile (with Android)
if: (matrix.os == 'ubuntu-latest')
run: dart run build_tool precompile-binaries -v --manifest-dir=../../rust --repository=SatoshiPortal/boltz-dart --android-sdk-location=/usr/local/lib/android/sdk --android-ndk-version=24.0.8215888 --android-min-sdk-version=23
if: (matrix.os == 'ubuntu-20.04')
run: dart run build_tool precompile-binaries -v --manifest-dir=../../rust --repository=SatoshiPortal/lwk-dart --android-sdk-location=/usr/local/lib/android/sdk --android-ndk-version=25.1.8937393 --android-min-sdk-version=23
working-directory: cargokit/build_tool
env:
GITHUB_TOKEN: ${{ secrets.RELEASE_GITHUB_TOKEN }}
Expand Down
6 changes: 6 additions & 0 deletions rust/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,9 @@ opt-level = "z"
lto = true
codegen-units = 1
panic = "abort"

[target.'cfg(target_os = "macos")']
rustflags = [
"-C", "link-arg=-undefined",
"-C", "link-arg=dynamic_lookup",
]

0 comments on commit e1453b3

Please sign in to comment.