-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #41 from SatoshiPortal/precompiled-binaries
feat: precompiled binaries
- Loading branch information
Showing
4 changed files
with
69 additions
and
1 deletion.
There are no files selected for viewing
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,44 @@ | ||
on: | ||
push: | ||
branches: [ trunk ] | ||
|
||
name: Precompile Binaries | ||
jobs: | ||
Precompile: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: | ||
- ubuntu-20.04 | ||
- macOS-latest | ||
- windows-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: dart-lang/setup-dart@v1 | ||
|
||
- 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 | ||
|
||
- 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/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/lwk-dart --android-sdk-location=/usr/local/lib/android/sdk --android-ndk-version=24.0.8215888 --android-min-sdk-version=23 | ||
working-directory: cargokit/build_tool | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.RELEASE_GITHUB_TOKEN }} | ||
PRIVATE_KEY: ${{ secrets.RELEASE_PRIVATE_KEY } |
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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# Enables verbose logging of cargokit during build | ||
verbose_logging: false | ||
|
||
# Opts out of using precompiled binaries. If crate has configured | ||
# and deployed precompiled binaries, these will be by default used whenever Rustup | ||
# is not installed. With `use_precompiled_binaries` set to false, the build will | ||
# instead be aborted prompting user to install Rustup. | ||
use_precompiled_binaries: true |
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,13 @@ | ||
cargo: | ||
debug: | ||
toolchain: stable | ||
release: | ||
toolchain: nightly | ||
extra_flags: | ||
- -Z | ||
- build-std=panic_abort,std | ||
precompiled_binaries: | ||
# Uri prefix used when downloading precompiled binaries. | ||
url_prefix: https://github.com/SatoshiPortal/lwk-dart/releases/download/precompiled_ | ||
# Public key for verifying downloaded precompiled binaries. | ||
public_key: 496885349368a850fa21668c1d0af5f9aa0748415be20a11545695383ef7851b |