Skip to content

Fix clippy complaints #547

Fix clippy complaints

Fix clippy complaints #547

Workflow file for this run

on:
push:
branches: [ master ]
tags:
- '*'
env:
CARGO_TERM_COLOR: always
jobs:
build_release:
strategy:
matrix:
include:
- target: x86_64-unknown-linux-gnu
os: ubuntu-20.04
- target: x86_64-apple-darwin
os: macos-latest
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- if: startsWith(matrix.os, 'ubuntu')
run: |
sudo apt-get update
sudo apt-get install -y libudev-dev
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
components: rustfmt, clippy
- name: cargo build --release
uses: actions-rs/cargo@v1
with:
command: build
args: --release
- run: mv target/release/sys sys-${{ matrix.target }}
- run: mv target/release/sys-lend sys-lend-${{ matrix.target }}
- uses: actions/upload-artifact@v4
with:
name: ${{ matrix.target }}
path: |
sys-${{ matrix.target }}
sys-lend-${{ matrix.target }}
if-no-files-found: error
publish_release:
needs: build_release
runs-on: ubuntu-20.04
steps:
- uses: actions/download-artifact@v4
- if: startsWith(github.ref, 'refs/tags/')
uses: softprops/action-gh-release@v1
with:
files: |
x86_64-apple-darwin/sys-x86_64-apple-darwin
x86_64-unknown-linux-gnu/sys-x86_64-unknown-linux-gnu
x86_64-apple-darwin/sys-lend-x86_64-apple-darwin
x86_64-unknown-linux-gnu/sys-lend-x86_64-unknown-linux-gnu
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- if: startsWith(github.ref, 'refs/heads/master')
run: |
set -x
mkdir master-bin
mv x86_64-apple-darwin/* master-bin/
mv x86_64-unknown-linux-gnu/* master-bin/
cd master-bin
git init .
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git add *
git commit -m "Build artifacts from $GITHUB_SHA" --allow-empty
- if: startsWith(github.ref, 'refs/heads/master')
uses: ad-m/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: master-bin
directory: master-bin
force: true