Add fee estimator API for boarding #353
This file contains hidden or 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
| name: CI | |
| on: | |
| pull_request: | |
| push: | |
| branches: | |
| - master | |
| env: | |
| CARGO_TERM_COLOR: always | |
| # Self-hosted runners persist /nix/store; avoid stale Magic Nix Cache hooks/proxies. | |
| NIX_CONFIG: | | |
| post-build-hook = | |
| extra-substituters = | |
| substituters = https://cache.nixos.org/ | |
| jobs: | |
| check_if_release_commit: | |
| runs-on: self-hosted | |
| outputs: | |
| is_release: ${{ steps.check_tag.outputs.is_release }} | |
| steps: | |
| - name: Checkout code with tags | |
| uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 # Fetches all history and tags | |
| - name: Check if commit is tagged for release (v*) | |
| id: check_tag | |
| run: | | |
| # Check if any tag starting with 'v' points to the current commit HEAD | |
| if git tag --points-at HEAD | grep -q "^v"; then | |
| echo "Commit is tagged with a 'v*' tag. Build/test steps will be skipped in this workflow." | |
| echo "is_release=true" >> $GITHUB_OUTPUT | |
| else | |
| echo "Commit is NOT tagged with a 'v*' tag. Build/test steps will proceed." | |
| echo "is_release=false" >> $GITHUB_OUTPUT | |
| fi | |
| shell: bash | |
| rust_typescript_checks_and_tests: | |
| runs-on: self-hosted | |
| needs: check_if_release_commit | |
| if: needs.check_if_release_commit.outputs.is_release == 'false' | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v6 | |
| # - name: Install Nix | |
| # uses: DeterminateSystems/nix-installer-action@main | |
| # - name: Enable Nix Magic Cache | |
| # uses: DeterminateSystems/magic-nix-cache-action@main | |
| - name: Check formatting (bark-cpp) | |
| run: nix develop .# --command bash -c "unset SDKROOT && cd bark-cpp && cargo fmt -- --check" | |
| - name: Run tests (bark-cpp) | |
| run: nix develop .# --command bash -c "unset SDKROOT && cd bark-cpp && cargo test" | |
| - name: Install React Native app dependencies | |
| run: nix develop .# --command bash -c "cd react-native-nitro-ark && yarn install --immutable" | |
| - name: Prepare React Native package (lint, typecheck, build) | |
| run: nix develop .# --command bash -c "cd react-native-nitro-ark && yarn prepare" | |
| android_build: | |
| runs-on: ubuntu-self-hosted | |
| needs: | |
| - check_if_release_commit | |
| - rust_typescript_checks_and_tests | |
| if: needs.check_if_release_commit.outputs.is_release == 'false' | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v6 | |
| # - name: Install Nix | |
| # uses: DeterminateSystems/nix-installer-action@main | |
| # - name: Enable Nix Magic Cache | |
| # uses: DeterminateSystems/magic-nix-cache-action@main | |
| - name: Build bark-cpp for Android | |
| run: nix develop .# --command bash -c "unset SDKROOT && cd bark-cpp && ./build-android.sh" | |
| - name: Install example app dependencies | |
| run: nix develop .# --command bash -c "cd react-native-nitro-ark && yarn install --immutable" | |
| - name: Build example Android app | |
| run: nix develop .# --command bash -c "cd react-native-nitro-ark && yarn example build:android" | |
| ios_build: | |
| runs-on: macOS | |
| needs: | |
| - check_if_release_commit | |
| - rust_typescript_checks_and_tests | |
| if: needs.check_if_release_commit.outputs.is_release == 'false' | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v6 | |
| # - name: Install Nix | |
| # uses: DeterminateSystems/nix-installer-action@main | |
| # - name: Enable Nix Magic Cache | |
| # uses: DeterminateSystems/magic-nix-cache-action@main | |
| - name: Build bark-cpp for iOS | |
| run: nix develop .# --command bash -c "unset SDKROOT && cd bark-cpp && ./build-ios.sh" | |
| - name: Install example app dependencies | |
| run: nix develop .# --command bash -c "cd react-native-nitro-ark && yarn install --immutable && yarn ios:prebuild" | |
| - name: Build example iOS app | |
| run: nix develop .# --command bash -c "cd react-native-nitro-ark && yarn example build:ios:xcode" |