Refactor how next/previous programs are selected. Add unit tests. #54
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: | |
build_test_and_release: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
steps: | |
- uses: actions/[email protected] | |
- name: Install dependencies | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y zlib1g-dev libelf-dev | |
- name: Test | |
run: cargo test | |
- name: Build | |
run: cargo build --release | |
- name: Create Release and Upload Artficat | |
uses: ncipollo/[email protected] | |
if: startsWith(github.ref, 'refs/tags/v') | |
with: | |
artifacts: "target/release/bpftop" | |
draft: true | |
allowUpdates: true | |
updateOnlyUnreleased: true |