Skip to content

Commit

Permalink
feat: add dependencies in cargo
Browse files Browse the repository at this point in the history
Signed-off-by: Gaius <[email protected]>
  • Loading branch information
gaius-qi committed Dec 27, 2023
1 parent 9771151 commit e773588
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 15 deletions.
39 changes: 24 additions & 15 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,23 @@ on:
- v*

jobs:
build-cross:
runs-on: ubuntu-latest
release-github:
runs-on: ${{ matrix.os }}
strategy:
matrix:
target:
- x86_64-unknown-linux-gnu
- x86_64-unknown-linux-musl
- aarch64-unknown-linux-gnu
- aarch64-unknown-linux-musl
include:
- build: linux
os: ubuntu-latest
target: x86_64-unknown-linux-gnu
- build: linux
os: ubuntu-latest
target: x86_64-unknown-linux-musl
- build: linux
os: ubuntu-latest
target: aarch64-unknown-linux-gnu
- build: linux
os: ubuntu-latest
target: aarch64-unknown-linux-musl

steps:
- name: Checkout
Expand All @@ -25,15 +33,16 @@ jobs:
run: echo "VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV

- name: Install Rust
run: |
rustup set profile minimal
rustup toolchain install stable
rustup default stable
rustup override set stable
rustup target add --toolchain stable ${{ matrix.target }}
uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.target }}
override: true

- name: Install cross
run: cargo install cross
# - name: Install dependencies
# shell: bash
# run: |
# sudo apt-get update
# sudo apt-get install -y pkg-config libssl-dev libclang-dev protobuf-compiler build-essential libudev-dev perl

- name: Build
uses: actions-rs/cargo@v1
Expand Down
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -74,3 +74,4 @@ fs2 = "0.4.3"
hashring = "0.3.3"
libc = "0.2"
fslock = "0.2.1"
openssl = { version = "0.10", features = ["vendored"] }

0 comments on commit e773588

Please sign in to comment.