Skip to content
41 changes: 32 additions & 9 deletions .github/workflows/build-cli-release.reusable.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ on:
type: boolean
default: true
required: false

push:
branches:
- protoc-fix
env:
MACOSX_DEPLOYMENT_TARGET: "10.13"

Expand Down Expand Up @@ -69,6 +71,7 @@ jobs:
# shell: bash
# run: |
# ci/ubuntu-install-packages


- uses: dtolnay/rust-toolchain@stable
with:
Expand All @@ -81,6 +84,26 @@ jobs:

- name: Install protoc-gen-go
run: go install github.com/golang/protobuf/protoc-gen-go@latest

- name: Add protoc-gen-go to path
shell: bash
run: |
echo "$HOME/go/bin" >> $GITHUB_PATH
# Also set for current step
export PATH="$PATH:$HOME/go/bin"
echo "PATH=$PATH:$HOME/go/bin" >> $GITHUB_ENV

- name: Test protoc-gen-go availability
shell: bash
run: |
echo "Current PATH: $PATH"
echo "Go bin directory contents:"
ls -la $HOME/go/bin/
echo "Which protoc-gen-go:"
which protoc-gen-go
echo "Testing protoc can find protoc-gen-go plugin..."
# Test that protoc can find the go plugin (this will show an error about missing .proto file, but that's expected)
protoc --go_out=/tmp --help | grep -q "go_out" && echo "✅ protoc recognizes --go_out flag" || echo "❌ protoc does not recognize --go_out flag"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider failing the step if '--go_out' isn’t recognized instead of only echoing a message.

Suggested change
protoc --go_out=/tmp --help | grep -q "go_out" && echo "✅ protoc recognizes --go_out flag" || echo "❌ protoc does not recognize --go_out flag"
protoc --go_out=/tmp --help | grep -q "go_out" && echo "✅ protoc recognizes --go_out flag" || (echo "❌ protoc does not recognize --go_out flag"; exit 1)


- name: Use Cross
if: contains(matrix._.os, 'ubuntu')
Expand Down Expand Up @@ -111,14 +134,14 @@ jobs:
workspaces: engine
prefix-key: "v5-rust-${{ matrix._.target }}"

# Build the CLI - Always use static-ssl features
- name: Build CLI Binary
# This single step now handles all builds
run: >
${{ env.CARGO }} build --release --bin baml-cli ${{ env.TARGET_FLAGS }}
--features static-ssl
--no-default-features
working-directory: engine
# # Build the CLI - Always use static-ssl features
# - name: Build CLI Binary
# # This single step now handles all builds
# run: >
# ${{ env.CARGO }} build --release --bin baml-cli ${{ env.TARGET_FLAGS }}
# --features static-ssl
# --no-default-features
# working-directory: engine

- name: Build CFFI Library
run: >
Expand Down