Skip to content

Commit

Permalink
ci: protoc install (#731)
Browse files Browse the repository at this point in the history
* ci: fix class sizes

* ci: install protoc for unix binary builds

* ci: test binaries

* ci: fix arch download

* ci: update mac xcode

* ci: fix arm64 arch

* ci: just downgrade the machine

* ci: put mac on medium

* ci: install protoc on windows

* ci: adjust protoc install path

* ci: renable github release publishing

---------

Co-authored-by: Iulian Barbu <iulianbarbu2@gmail.com>
  • Loading branch information
chesedo and iulianbarbu authored Mar 20, 2023
1 parent 8ace3ff commit 5df37f4
Showing 1 changed file with 22 additions and 7 deletions.
29 changes: 22 additions & 7 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -117,14 +117,19 @@ commands:
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --target add wasm32-wasi
sudo apt update && sudo apt install -y libssl1.1
install-protoc:
parameters:
arch:
description: "The architecture of protoc to install"
type: string
default: "linux-x86_64"
steps:
- run:
name: Install protoc
command: |
curl -OL https://github.com/protocolbuffers/protobuf/releases/download/v21.9/protoc-21.9-linux-x86_64.zip &&\
sudo unzip -o protoc-21.9-linux-x86_64.zip -d /usr bin/protoc &&\
sudo unzip -o protoc-21.9-linux-x86_64.zip -d /usr/ 'include/*' &&\
rm -f protoc-21.9-linux-x86_64.zip
curl -OL https://github.com/protocolbuffers/protobuf/releases/download/v21.9/protoc-21.9-<< parameters.arch >>.zip &&\
sudo unzip -o protoc-21.9-<< parameters.arch >>.zip -d /usr/local bin/protoc &&\
sudo unzip -o protoc-21.9-<< parameters.arch >>.zip -d /usr/local 'include/*' &&\
rm -f protoc-21.9-<< parameters.arch >>.zip
make-artifact:
parameters:
target:
Expand Down Expand Up @@ -295,9 +300,14 @@ jobs:
resource_class:
description: "The resource type to use for the machine"
type: string
protoc_arch:
description: "Architecture to use to install protoc"
type: string
steps:
- checkout
- run: sudo apt update && sudo DEBIAN_FRONTEND=noninteractive apt install -y libssl-dev musl-tools clang
- install-protoc:
arch: << parameters.protoc_arch >>
- run:
name: Install Rust
command: curl --proto '=https' --tlsv1.3 https://sh.rustup.rs -sSf | bash -s -- -y --default-toolchain 1.65.0 --target << parameters.target >>
Expand All @@ -313,13 +323,13 @@ jobs:
build-binaries-windows:
executor:
name: win/server-2022
size: medium
size: xlarge
shell: bash.exe
environment:
CARGO_NET_GIT_FETCH_WITH_CLI: "true"
steps:
- checkout
- run: choco install -y strawberryperl
- run: choco install -y strawberryperl protoc
- run:
name: Install Rust
command: |
Expand All @@ -341,9 +351,11 @@ jobs:
build-binaries-mac:
macos:
xcode: 12.5.1
resource_class: xlarge
resource_class: medium
steps:
- checkout
- install-protoc:
arch: osx-x86_64
- run:
name: Install Rust
command: curl --proto '=https' https://sh.rustup.rs -sSf | bash -s -- -y --default-toolchain 1.65.0 --target x86_64-apple-darwin
Expand Down Expand Up @@ -437,6 +449,7 @@ workflows:
name: build-binaries-x86_64-gnu
image: ubuntu-2204:2022.04.1
target: x86_64-unknown-linux-gnu
protoc_arch: linux-x86_64
resource_class: xlarge
filters:
branches:
Expand All @@ -445,6 +458,7 @@ workflows:
name: build-binaries-x86_64-musl
image: ubuntu-2204:2022.04.1
target: x86_64-unknown-linux-musl
protoc_arch: linux-x86_64
resource_class: xlarge
filters:
branches:
Expand All @@ -453,6 +467,7 @@ workflows:
name: build-binaries-aarch64
image: ubuntu-2004:202101-01
target: aarch64-unknown-linux-musl
protoc_arch: linux-aarch_64
resource_class: arm.xlarge
filters:
branches:
Expand Down

0 comments on commit 5df37f4

Please sign in to comment.