Skip to content

ci/bindings: build o1js bindings in CI #1

ci/bindings: build o1js bindings in CI

ci/bindings: build o1js bindings in CI #1

# Purpose: We want to build the o1js bindings in CI so that people in the
# community can change them without being scared of breaking things, or
# needing to do the complicated (without nix) build setup.
name: Build o1js bindings
on:
pull_request:
push:
jobs:
nix-matrix:
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
steps:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v30
- id: set-matrix
name: Generate Nix Matrix
run: |
set -Eeu
matrix="$(nix eval --json '.#githubActions.matrix')"
echo "matrix=$matrix" >> "$GITHUB_OUTPUT"
nix-build:
name: ${{ matrix.name }} (${{ matrix.system }})
needs: nix-matrix
runs-on: ${{ matrix.os }}
strategy:
matrix: ${{fromJSON(needs.nix-matrix.outputs.matrix)}}
steps:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v30
- run: ./pin.sh
- run: 'nix develop o1js --command bash --command "npm run build:bindings && npm run build:update-bindings"'