Skip to content

Commit

Permalink
Remove unused features, and attempt to only install protobuf when needed
Browse files Browse the repository at this point in the history
  • Loading branch information
scottopell committed Mar 14, 2024
1 parent 89fdf98 commit ba35054
Showing 1 changed file with 13 additions and 25 deletions.
38 changes: 13 additions & 25 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,19 +28,22 @@ jobs:
matrix:
include:
- target: aarch64-unknown-linux-gnu
os: ubuntu-20.04

- target: aarch64-apple-darwin
os: macos-latest
requires-cross-compilation: true # assuming x86-64 runner
os: ubuntu-latest

- target: x86_64-unknown-linux-gnu
os: ubuntu-20.04
os: ubuntu-latest

- target: x86_64-unknown-linux-musl
os: ubuntu-20.04
os: ubuntu-latest

- target: aarch64-unknown-linux-musl
os: ubuntu-20.04
requires-cross-compilation: true # assuming x86-64 runner
os: ubuntu-latest

- target: aarch64-apple-darwin
requires-cross-compilation: true # assuming x86-64 runner
os: macos-latest

- target: x86_64-apple-darwin
os: macos-latest
Expand All @@ -55,32 +58,17 @@ jobs:
with:
tool: cross

- name: Install protobuf (Apt)
run: sudo apt-get update && sudo apt-get install -y protobuf-compiler
if: matrix.os == 'ubuntu-20.04'

- name: Install protobuf (Brew)
run: brew install protobuf
if: matrix.os == 'macos-latest'

- name: Check protobuf
run: protoc --version; which protoc; echo "PROTOC IS ${PROTOC}";
- name: Install Protobuf
if: matrix.requires-cross-compilation == false
uses: ./.github/actions/install-protobuf

# Run the build & upload artifacts
- name: Build and upload lading binaries
uses: taiki-e/upload-rust-binary-action@v1

env:
# Setting CFLAGS or CXXFLAGS will override the default flags provided by the cc crate
CFLAGS: ${{ matrix.cflags }}
CXXFLAGS: ${{ matrix.cxxflags }}
CC: ${{ matrix.cc }}
CXX: ${{ matrix.cxx }}

with:
bin: lading
no_default_features: true
features: ${{ matrix.features || '' }}
target: ${{ matrix.target }}
checksum: sha256
token: ${{ secrets.GITHUB_TOKEN }}
Expand Down

0 comments on commit ba35054

Please sign in to comment.