Bump anyhow from 1.0.89 to 1.0.90 #284
Workflow file for this run
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: Rust | |
on: | |
push: | |
branches: [ "main" ] | |
tags: | |
- 'v*' # Trigger the workflow on push to tags like v1.0, v20.15.10 | |
pull_request: | |
branches: [ "main" ] | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
install_dependencies: | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Install cross | |
run: cargo install cross --git https://github.com/cross-rs/cross | |
- name: Cache dependencies | |
uses: actions/[email protected] | |
with: | |
path: ~/.cargo/bin | |
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} | |
restore-keys: | | |
${{ runner.os }}-cargo- | |
build_and_test: | |
needs: install_dependencies | |
runs-on: ubuntu-20.04 | |
permissions: | |
contents: write | |
strategy: | |
matrix: | |
target: | |
- x86_64-unknown-linux-gnu | |
- aarch64-unknown-linux-gnu | |
steps: | |
- uses: actions/[email protected] | |
- name: Restore dependencies from cache | |
uses: actions/[email protected] | |
with: | |
path: ~/.cargo/bin | |
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} | |
restore-keys: | | |
${{ runner.os }}-cargo- | |
- name: Test | |
run: cross test --target ${{ matrix.target }} | |
- name: Clippy | |
run: cross clippy --target ${{ matrix.target }} --all --tests --all-features --no-deps | |
- name: Build | |
run: cross build --target ${{ matrix.target }} --release | |
- name: Rename binary | |
run: mv target/${{ matrix.target }}/release/bpftop target/${{ matrix.target }}/release/bpftop-${{ matrix.target }} | |
- name: Upload artifact | |
uses: actions/[email protected] | |
with: | |
name: bpftop-${{ matrix.target }} | |
path: target/${{ matrix.target }}/release/bpftop-${{ matrix.target }} | |
if-no-files-found: error | |
create_release: | |
needs: build_and_test | |
runs-on: ubuntu-20.04 | |
if: startsWith(github.ref, 'refs/tags/v') | |
steps: | |
- name: Download all artifacts | |
id: download_artifacts | |
uses: actions/[email protected] | |
with: | |
pattern: bpftop-* | |
path: artifacts | |
merge-multiple: true | |
- name: Create Release and Upload Artifacts | |
uses: ncipollo/[email protected] | |
with: | |
artifacts: artifacts/bpftop-* | |
draft: true | |
allowUpdates: true | |
updateOnlyUnreleased: true |