Skip to content

update dependencies #134

update dependencies

update dependencies #134

Workflow file for this run

name: Rust
on:
push:
branches:
- main
release:
workflow_dispatch:
pull_request:
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- name: Setup | Checkout
uses: actions/checkout@v2
- name: Install Protoc
uses: arduino/setup-protoc@v3
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Setup | Rust
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
rust-version: stable
components: clippy
- name: Build | Lint
run: cargo clippy
- uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: lint
build_macos:
name: 'Build for MacOS'
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- uses: arduino/setup-protoc@v3
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
rust-version: stable
- name: Build all
run: |
export CGO_LDFLAGS="-framework Security -framework CoreFoundation"
make all
- uses: actions/upload-artifact@v3
with:
name: macos
path: build/*
build_linux:
name: 'Build for Linux'
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
arch:
- aarch64-unknown-linux-gnu
- aarch64-unknown-linux-musl
- armv7-unknown-linux-gnueabi
- armv7-unknown-linux-gnueabihf
- armv7-unknown-linux-musleabi
- armv7-unknown-linux-musleabihf
- x86_64-unknown-linux-gnu
- x86_64-unknown-linux-musl
- x86_64-pc-windows-gnu
steps:
- uses: actions/checkout@v2
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
rust-version: stable
- uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ matrix.arch }}
- name: Build all
run: |
cargo install cross --git https://github.com/cross-rs/cross
cargo install --force --locked bindgen-cli
export CROSS_CONTAINER_ENGINE_NO_BUILDKIT=1
cross build --release --target ${{ matrix.arch }}
mkdir -p ./build
cp target/${{ matrix.arch }}/release/* ./build/ || true
rm ./build/*.{d,rlib}
- uses: actions/upload-artifact@v3
with:
name: release-${{ matrix.arch }}
path: build/*