Skip to content

Commit

Permalink
Use Zig to build aarch64 binaries (#1249)
Browse files Browse the repository at this point in the history
  • Loading branch information
hronro authored Jun 6, 2022
1 parent 012b226 commit 3ca2e70
Show file tree
Hide file tree
Showing 6 changed files with 264 additions and 6 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/make-plugin-arm.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Make ARM Plugins (Windows/macOS/Linux)

on:
workflow_dispatch:
inputs:
version_number:
description: 'Version number'
required: true
default: '1.x.x'

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: 'recursive'
- name: Setup Zig
run: |
mkdir /zig
curl 'https://ziglang.org/download/0.9.1/zig-linux-x86_64-0.9.1.tar.xz' | tar xJ --strip-components=1 --directory=/zig
ln -s /zig/zig /usr/bin/zig
- name: Build plugin
env:
VERSION: ${{ github.event.inputs.version_number }}
run: |
cd javascript/net/grpc/web/generator
zig build -Drelease-fast
- name: gen and verify sha256
run: |
cd javascript/net/grpc/web/generator/zig-out/bin
for exe in $(ls)
do
openssl dgst -sha256 -r -out $exe'.sha256' $exe
sha256sum -c $exe'.sha256'
done
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: plugin
path: javascript/net/grpc/web/generator/zig-out/bin/
4 changes: 2 additions & 2 deletions .github/workflows/make-plugin-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Build plugin docker image
run: docker-compose build prereqs protoc-plugin
- name: Copy binary from Docker image
Expand All @@ -26,7 +26,7 @@ jobs:
- name: verify sha256
run: sha256sum -c protoc-gen-grpc-web-${{ github.event.inputs.version_number }}-linux-x86_64.sha256
- name: Upload artifacts
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: plugin
path: protoc-gen-grpc-web*
4 changes: 2 additions & 2 deletions .github/workflows/make-plugin-mac-os.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
build:
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Install build utils
run: brew install coreutils automake
- name: Checkout protobuf code
Expand Down Expand Up @@ -42,7 +42,7 @@ jobs:
- name: verify sha256
run: sha256sum -c protoc-gen-grpc-web-${{ github.event.inputs.version_number }}-darwin-x86_64.sha256
- name: Upload artifacts
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: plugin
path: protoc-gen-grpc-web*
4 changes: 2 additions & 2 deletions .github/workflows/make-plugin-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
build:
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Print Bazel version
run: |
bazel version
Expand All @@ -31,7 +31,7 @@ jobs:
# TODO: Check sha256 (sha256sum not available for now. )
#- name: verify sha256
- name: Upload artifacts
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: plugin
path: protoc-gen-grpc-web*
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,5 @@ target
.project
.classpath
.settings
zig-out
zig-cache
Loading

0 comments on commit 3ca2e70

Please sign in to comment.