Skip to content

v1.0.2: Add total CPU% and available/cached RAM display #3

v1.0.2: Add total CPU% and available/cached RAM display

v1.0.2: Add total CPU% and available/cached RAM display #3

Workflow file for this run

name: Release
on:
push:
tags:
- "v*"
permissions:
contents: write
jobs:
build:
strategy:
matrix:
include:
- target: x86_64-unknown-linux-gnu
os: ubuntu-latest
- target: aarch64-unknown-linux-gnu
os: ubuntu-latest
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.target }}
- name: Install cross-compilation tools
if: matrix.target == 'aarch64-unknown-linux-gnu'
run: |
sudo apt-get update
sudo apt-get install -y gcc-aarch64-linux-gnu
- name: Build
working-directory: ktop-rs
run: |
if [ "${{ matrix.target }}" = "aarch64-unknown-linux-gnu" ]; then
export CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER=aarch64-linux-gnu-gcc
fi
cargo build --release --target ${{ matrix.target }}
- name: Package binary
run: |
cp ktop-rs/target/${{ matrix.target }}/release/ktop ktop-${{ matrix.target }}
chmod +x ktop-${{ matrix.target }}
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: ktop-${{ matrix.target }}
path: ktop-${{ matrix.target }}
release:
needs: build
runs-on: ubuntu-latest
steps:
- name: Download artifacts
uses: actions/download-artifact@v4
with:
merge-multiple: true
- name: Create release
uses: softprops/action-gh-release@v2
with:
files: ktop-*
generate_release_notes: true