From d21e69aeefb0a831d88796c78838818f204e881d Mon Sep 17 00:00:00 2001 From: ethicnology Date: Wed, 20 Nov 2024 11:33:39 -0500 Subject: [PATCH] feat: cargokit for precompiled_binaries --- .github/workflows/precompiled_binaries.yml | 36 ++++++++++++++++++++++ bindings/dart-bip85/rust/cargokit.yaml | 15 +++++++++ 2 files changed, 51 insertions(+) create mode 100644 .github/workflows/precompiled_binaries.yml create mode 100644 bindings/dart-bip85/rust/cargokit.yaml diff --git a/.github/workflows/precompiled_binaries.yml b/.github/workflows/precompiled_binaries.yml new file mode 100644 index 0000000..6c2b41a --- /dev/null +++ b/.github/workflows/precompiled_binaries.yml @@ -0,0 +1,36 @@ +on: + push: + branches: [ master ] + +name: Precompile Binaries + +jobs: + Precompile: + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: + - ubuntu-latest + - macOS-latest + - windows-latest + steps: + - uses: actions/checkout@v2 + - 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: Precompile + if: (matrix.os == 'macOS-latest') || (matrix.os == 'windows-latest') + run: dart run build_tool precompile-binaries -v --manifest-dir=../../rust --repository=superlistapp/super_native_extensions + working-directory: super_native_extensions/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=superlistapp/super_native_extensions --android-sdk-location=/usr/local/lib/android/sdk --android-ndk-version=24.0.8215888 --android-min-sdk-version=23 + working-directory: super_native_extensions/cargokit/build_tool + env: + GITHUB_TOKEN: ${{ secrets.RELEASE_GITHUB_TOKEN }} + PRIVATE_KEY: ${{ secrets.RELEASE_PRIVATE_KEY }} \ No newline at end of file diff --git a/bindings/dart-bip85/rust/cargokit.yaml b/bindings/dart-bip85/rust/cargokit.yaml new file mode 100644 index 0000000..d933bd4 --- /dev/null +++ b/bindings/dart-bip85/rust/cargokit.yaml @@ -0,0 +1,15 @@ +cargo: + debug: # Configuration of cargo execution during debug builds + toolchain: stable # default + release: # Configuration of cargo execution for release builds + toolchain: nightly # rustup will be invoked with nightly toolchain + extra_flags: # extra arguments passed to cargo build + - -Z + - build-std=panic_abort,std + +precompiled_binaries: + # Uri prefix used when downloading precompiled binaries. + url_prefix: https://github.com/ethicnology/rust-bip85/releases/download/precompiled_ + + # Public key for verifying downloaded precompiled binaries. + public_key: e56a85ab8294c9f0cd8bb58a624e23b83b5682380d048e41b041b6624d949976 \ No newline at end of file