Skip to content

update deps to support latest Rust #3

update deps to support latest Rust

update deps to support latest Rust #3

name: build Linux binaries
on:
push:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Cache cargo registry
uses: actions/cache@v3
with:
path: ~/.cargo/registry
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
- name: Cache cargo index
uses: actions/cache@v3
with:
path: ~/.cargo/git
key: ${{ runner.os }}-cargo-git-${{ hashFiles('**/Cargo.lock') }}
- name: Cache cargo build
uses: actions/cache@v3
with:
path: ~/.cargo/bin
key: ${{ runner.os }}-cargo-bin-${{ hashFiles('**/Cargo.lock') }}
- name: Install cross
run: |
if ! [ -x "$(command -v cross)" ]; then
cargo install cross
fi
- name: Build x86_64-unknown-linux-gnu
run: cross build --target x86_64-unknown-linux-gnu --release
- name: Build aarch64-unknown-linux-gnu
run: cross build --target aarch64-unknown-linux-gnu --release
- name: Build aarch64-unknown-linux-musl
run: cross build --target aarch64-unknown-linux-musl --release
- name: Build armv7-unknown-linux-gnueabihf
run: cross build --target armv7-unknown-linux-gnueabihf --release
- name: Rename binaries
run: |
mkdir -p cicada-bins
for arch in $(ls target); do
if [[ -e "target/${arch}/release/cicada" ]]; then
cp target/${arch}/release/cicada cicada-bins/cicada-${arch}
fi
done
- name: Upload release binary
uses: actions/upload-artifact@v3
with:
name: cicada-builds
path: cicada-bins/