feat: add yellowstone gRPC, update windows support #56
Workflow file for this run
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: Build TPU Native | |
| on: | |
| push: | |
| branches: | |
| - main | |
| paths: | |
| - 'packages/fastlane/**' | |
| - '.github/workflows/build-tpu-native.yml' | |
| pull_request: | |
| paths: | |
| - 'packages/fastlane/**' | |
| - '.github/workflows/build-tpu-native.yml' | |
| workflow_dispatch: | |
| inputs: | |
| publish: | |
| description: 'Publish to npm' | |
| required: false | |
| type: boolean | |
| default: false | |
| env: | |
| DEBUG: napi:* | |
| APP_NAME: fastlane | |
| permissions: | |
| contents: write | |
| id-token: write | |
| jobs: | |
| build: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| settings: | |
| - host: ubuntu-latest | |
| target: x86_64-unknown-linux-gnu | |
| - host: macos-latest | |
| target: aarch64-apple-darwin | |
| - host: windows-latest | |
| target: x86_64-pc-windows-msvc | |
| name: stable - ${{ matrix.settings.target }} - node@20 | |
| runs-on: ${{ matrix.settings.host }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@v4 | |
| - name: Setup node | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| cache: pnpm | |
| - name: Install Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| toolchain: stable | |
| targets: ${{ matrix.settings.target }} | |
| - name: Cache cargo | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.cargo/registry/index/ | |
| ~/.cargo/registry/cache/ | |
| ~/.cargo/git/db/ | |
| .cargo-cache | |
| target/ | |
| key: ${{ matrix.settings.target }}-cargo-${{ matrix.settings.host }} | |
| - name: Install dependencies | |
| run: pnpm install --no-frozen-lockfile | |
| - name: Build | |
| run: pnpm exec napi build --platform --release --target ${{ matrix.settings.target }} | |
| shell: bash | |
| working-directory: packages/fastlane | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: bindings-${{ matrix.settings.target }} | |
| path: packages/fastlane/*.node | |
| if-no-files-found: error | |
| test-bindings: | |
| name: Test bindings on ${{ matrix.settings.target }} - node@${{ matrix.node }} | |
| needs: | |
| - build | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| settings: | |
| - host: macos-latest | |
| target: aarch64-apple-darwin | |
| - host: ubuntu-latest | |
| target: x86_64-unknown-linux-gnu | |
| - host: windows-latest | |
| target: x86_64-pc-windows-msvc | |
| node: | |
| - '18' | |
| - '20' | |
| - '22' | |
| runs-on: ${{ matrix.settings.host }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@v4 | |
| - name: Setup node | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: ${{ matrix.node }} | |
| cache: pnpm | |
| - name: Install dependencies | |
| run: pnpm install --no-frozen-lockfile | |
| - name: Download artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: bindings-${{ matrix.settings.target }} | |
| path: packages/fastlane | |
| - name: List packages | |
| run: ls -R packages/fastlane | |
| shell: bash | |
| - name: Test bindings | |
| run: pnpm test | |
| working-directory: packages/fastlane | |
| publish: | |
| name: Publish to npm | |
| runs-on: ubuntu-latest | |
| needs: | |
| - test-bindings | |
| if: github.event_name == 'workflow_dispatch' && inputs.publish | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@v4 | |
| - name: Setup node | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| registry-url: https://registry.npmjs.org/ | |
| cache: pnpm | |
| - name: Install dependencies | |
| run: pnpm install --no-frozen-lockfile | |
| - name: Download all artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| path: packages/fastlane/artifacts | |
| - name: Move artifacts to package root | |
| run: | | |
| cp artifacts/bindings-aarch64-apple-darwin/*.node . | |
| cp artifacts/bindings-x86_64-unknown-linux-gnu/*.node . | |
| cp artifacts/bindings-x86_64-pc-windows-msvc/*.node . | |
| ls -la *.node | |
| working-directory: packages/fastlane | |
| - name: Publish | |
| run: | | |
| npm config set provenance true | |
| npm publish --access public --no-git-checks | |
| working-directory: packages/fastlane | |
| env: | |
| NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |