Skip to content

fix: set target branch to this branch to test #101

fix: set target branch to this branch to test

fix: set target branch to this branch to test #101

Workflow file for this run

name: Build and Test Zig and Bun
on:
push:
branches:
- main
- te/consume_bun-ffi-z_release-please
pull_request:
branches:
- main
jobs:
zig-build-upload:
strategy:
matrix:
settings:
- os: ubuntu-latest
bun-target: linux-x64-gnu
runs-on: ${{ matrix.settings.os }}
steps:
- name: Checkout Repository
uses: actions/checkout@v4
with:
submodules: recursive # Ensures submodules are cloned
fetch-depth: 0 # Fetches the entire history for all branches
- name: Install Zig
uses: mlugg/setup-zig@v1
with:
version: "0.14.0" # Set the required Zig version
- name: Build and Test
run: |
zig build test
- name: Install Bun
uses: oven-sh/setup-bun@v2
with:
version: 1.2.13
- name: Bun - Install Dependencies
run: bun install
working-directory: ./bun
- name: Build binary using bun-ffi-z
run: bun ./node_modules/.bin/bun-ffi-z build --target ${{ matrix.settings.bun-target }} --optimize ReleaseSafe
working-directory: ./bun
- name: Upload Zig Artifacts
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.settings.bun-target }}
path: 'zig-out/lib/*state-transition-utils.*'
if-no-files-found: error
publish:
name: Publish
runs-on: ubuntu-latest
needs:
- zig-build-upload
steps:
- uses: googleapis/release-please-action@v4
id: release
with:
config-file: release-please-config.json
manifest-file: .release-please-manifest.json
target-branch: te/consume_bun-ffi-z_release-please
- name: Checkout Repository
uses: actions/checkout@v4
- name: Install Bun
uses: oven-sh/setup-bun@v2
with:
version: 1.2.13
- name: Bun - Install Dependencies
if: ${{ steps.release.outputs.release_created }}
run: bun install
working-directory: ./bun
- name: Download all artifacts
if: ${{ steps.release.outputs.release_created }}
uses: actions/download-artifact@v4
with:
path: bun/artifacts
- name: List artifacts
if: ${{ steps.release.outputs.release_created }}
run: ls -R ./bun/artifacts
shell: bash