Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(Feat): Support passing a bazel BuildEventProtocol path #197

10 changes: 10 additions & 0 deletions .github/actions/setup_rust_cargo/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,16 @@ runs:
with:
targets: wasm32-unknown-unknown

- name: Install protoc
shell: bash
run: |
if [ -f /opt/homebrew/bin/brew ]; then
/opt/homebrew/bin/brew install protobuf
elif [ -f /usr/bin/apt ]; then
sudo /usr/bin/apt update
sudo /usr/bin/apt install -y protobuf-compiler
fi

Comment on lines +12 to +21
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The arduino setup action was relentless with rate limiting (not sure why they don't allow bypassing the API call), and I didn't want to pass our whole GH token rn https://github.com/marketplace/actions/setup-protoc

- uses: actions/cache@v4
with:
path: |
Expand Down
15 changes: 13 additions & 2 deletions .github/workflows/pyo3.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ jobs:
linux:
runs-on: ${{ matrix.platform.runner }}
strategy:
fail-fast: false
matrix:
platform:
- runner: ubuntu-latest
Expand Down Expand Up @@ -52,12 +53,22 @@ jobs:
if [ -f /usr/bin/yum ]; then
# quay.io/pypa/manylinux2014_x86_64:latest
/usr/bin/yum -y upgrade
/usr/bin/yum -y install perl-IPC-Cmd perl-List-MoreUtils openssl-devel python3-pip
/usr/bin/yum -y install perl-IPC-Cmd perl-List-MoreUtils openssl-devel python3-pip unzip
/usr/bin/ln -s /usr/bin/pip3 /usr/bin/pip
elif [ -f /usr/bin/apt ]; then
# ghcr.io/rust-cross/manylinux2014-cross:aarch64
/usr/bin/apt update
/usr/bin/apt install -y pkg-config libssl-dev
/usr/bin/apt install -y pkg-config libssl-dev unzip
fi

if [ "$(uname -m)" == "aarch64" ]; then
curl -L https://github.com/protocolbuffers/protobuf/releases/download/v29.1/protoc-29.1-linux-aarch_64.zip -o protoc.zip
unzip protoc.zip
export PROTOC=$(pwd)/bin/protoc
else
curl -L https://github.com/protocolbuffers/protobuf/releases/download/v29.1/protoc-29.1-linux-x86_64.zip -o protoc.zip
unzip protoc.zip
export PROTOC=$(pwd)/bin/protoc
Comment on lines +64 to +71
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The package registries were giving me issues. This ended up being a more reliable way to install and pin within the VMs

fi
- name: Upload wheels
uses: actions/upload-artifact@v4
Expand Down
27 changes: 27 additions & 0 deletions .trunk/trunk.yaml
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

These changes didn't end up helping with CI like I'd hoped, but it may prove helpful locally. If need be we can remove later

Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,37 @@ actions:
- trunk-check-pre-push
- trunk-fmt-pre-commit
- trunk-upgrade-available
downloads:
- name: protoc
downloads:
- os:
linux: linux
macos: osx
cpu:
x86_64: x86_64
arm_64: aarch_64
url: https://github.com/protocolbuffers/protobuf/releases/download/v${version}/protoc-${version}-${os}-${cpu}.zip
- os:
windows: windows
cpu:
x86_64: x86_64
url: https://github.com/protocolbuffers/protobuf/releases/download/v29.1/protoc-29.1-win64.zip
tools:
definitions:
- name: protoc
download: protoc
known_good_version: 29.1
shims: [protoc]
environment:
- name: PATH
list: ["${tool}/bin"]
health_checks:
- command: protoc --version
parse_regex: libprotoc (\d+\.\d+)
runtimes:
- ruby
- node
enabled:
- gh@2.62.0
- pnpm@9.14.2
- protoc@29.1
Loading
Loading