fix(deps): update rust crate derive_more to v1 #433
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: build | |
on: | |
push: | |
branches: | |
- master | |
- renovate/** | |
tags: | |
- '**' | |
pull_request: | |
env: | |
ENABLE_PYO3: 1 | |
RUSTFLAGS: -D warnings | |
jobs: | |
checks: | |
name: Check code | |
runs-on: ubuntu-24.04 | |
steps: | |
- name: Checkout source code | |
uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- name: Install Protoc | |
uses: arduino/setup-protoc@v2 | |
- name: Install Rust toolchain | |
uses: actions-rs/toolchain@v1 | |
with: | |
target: ${{ matrix.target }} | |
profile: minimal | |
components: rustfmt,clippy | |
- name: Check formatting | |
uses: actions-rs/cargo@v1 | |
with: | |
command: fmt | |
args: -- --check | |
- name: Install cargo-hack | |
run: > | |
wget -O- | |
https://github.com/taiki-e/cargo-hack/releases/download/v0.5.12/cargo-hack-x86_64-unknown-linux-gnu.tar.gz | | |
tar -C $HOME/.cargo/bin -xz | |
- name: Run cargo check | |
uses: actions-rs/cargo@v1 | |
with: | |
command: hack | |
args: check --feature-powerset --no-dev-deps | |
- name: Run clippy | |
uses: actions-rs/cargo@v1 | |
with: | |
command: hack | |
# Allow clippy warnings until they're fixed, but report them | |
args: clippy --feature-powerset --no-dev-deps -- -W warnings | |
build: | |
name: Build hyperion.rs binaries | |
strategy: | |
fail-fast: false | |
matrix: | |
target: | |
- x86_64-unknown-linux-gnu | |
- arm-unknown-linux-gnueabihf | |
include: | |
- target: x86_64-unknown-linux-gnu | |
cross: "" | |
image: "ghcr.io/alixinne/cross:x86_64-bullseye" | |
- target: arm-unknown-linux-gnueabihf | |
cross: arm-linux-gnueabihf- | |
image: "ghcr.io/alixinne/cross:raspberrypi-bookworm" | |
runs-on: ubuntu-24.04 | |
steps: | |
- name: Checkout source code | |
uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- name: Install Protoc | |
id: protoc | |
uses: arduino/setup-protoc@v2 | |
- uses: actions/cache@v4 | |
with: | |
path: | | |
~/.cargo | |
target | |
key: ${{ runner.os }}-build-${{ matrix.target }}-${{ hashFiles('Cargo.lock', 'rust-toolchain') }} | |
restore-keys: | | |
${{ runner.os }}-build-${{ matrix.target }}-${{ hashFiles('Cargo.lock', 'rust-toolchain') }} | |
${{ runner.os }}-build-${{ matrix.target }}- | |
- name: Install Rust toolchain | |
uses: actions-rs/toolchain@v1 | |
with: | |
target: ${{ matrix.target }} | |
profile: minimal | |
- name: Move protoc | |
run: | | |
PROTOC=$GITHUB_WORKSPACE/protoc | |
cp ${{ steps.protoc.outputs.path }}/bin/protoc $PROTOC | |
echo "PROTOC=./protoc" >> $GITHUB_ENV | |
- name: Build project | |
uses: actions-rs/cargo@v1 | |
with: | |
use-cross: true | |
command: build | |
args: --release --target=${{ matrix.target }} | |
- name: Strip resulting binary | |
run: docker run -v ${{ github.workspace }}:/src ${{ matrix.image }} ${{ matrix.cross }}strip /src/target/${{ matrix.target }}/release/hyperiond | |
- name: Prepare release | |
run: | | |
./ci/prepare-release.sh ${{ matrix.target }} | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: hyperion.rs-${{ matrix.target }}.tar.xz | |
path: release/hyperion.rs-${{ matrix.target }}.tar.xz | |
release-nightly: | |
name: Release hyperion.rs | |
needs: [ checks, build ] | |
runs-on: ubuntu-latest | |
if: "github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/v')" | |
permissions: | |
contents: write | |
issues: write | |
pull-requests: write | |
steps: | |
- uses: actions/download-artifact@v4 | |
with: | |
path: release | |
- uses: marvinpinto/action-automatic-releases@latest | |
with: | |
repo_token: "${{ secrets.GITHUB_TOKEN }}" | |
automatic_release_tag: latest | |
prerelease: true | |
title: "Development Build" | |
files: | | |
release/**/* | |
if: "github.ref == 'refs/heads/master'" | |
- uses: marvinpinto/action-automatic-releases@latest | |
with: | |
repo_token: "${{ secrets.GITHUB_TOKEN }}" | |
prerelease: false | |
title: ${{ github.ref_name }} | |
files: | | |
release/**/* | |
if: "startsWith(github.ref, 'refs/tags/v')" | |
# vim: ts=2:sw=2 |