Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
76 changes: 31 additions & 45 deletions .github/workflows/autoBuild.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,15 @@
name: Auto Build Release

on:
push:
tags:
- "v*"

permissions:
contents: write
packages: write

env:
CARGO_TERM_COLOR: always

CARGO_INCREMENTAL: 0
RUSTFLAGS: "-C codegen-units=1 -C strip=symbols"
jobs:
build:
name: Build ${{ matrix.target }}
Expand All @@ -21,20 +19,14 @@ jobs:
include:
- target: x86_64-unknown-linux-gnu
os: ubuntu-latest
format: tar.gz
- target: aarch64-unknown-linux-gnu
os: ubuntu-latest
format: tar.gz
- target: x86_64-pc-windows-msvc
os: windows-latest
format: zip
- target: x86_64-apple-darwin
os: macos-latest
format: tar.gz
- target: aarch64-apple-darwin
os: macos-latest
format: tar.gz

steps:
- uses: actions/checkout@v4

Expand All @@ -45,23 +37,34 @@ jobs:

- uses: Swatinem/rust-cache@v2
with:
prefix-key: release
key: ${{ matrix.target }}
cache-on-failure: true

- name: Cache cargo tools
uses: actions/cache@v4
if: matrix.target == 'x86_64-unknown-linux-gnu'
with:
path: ~/.cargo/bin
key: cargo-tools-${{ runner.os }}-deb-rpm
restore-keys: cargo-tools-${{ runner.os }}-

- 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
echo "CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER=aarch64-linux-gnu-gcc" >> $GITHUB_ENV

- name: Install cargo-deb
- name: Install cargo tools
if: matrix.target == 'x86_64-unknown-linux-gnu'
run: cargo install cargo-deb

- name: Install cargo-generate-rpm
if: matrix.target == 'x86_64-unknown-linux-gnu'
run: cargo install cargo-generate-rpm
run: |
if ! command -v cargo-deb &> /dev/null; then
cargo install cargo-deb
fi
if ! command -v cargo-generate-rpm &> /dev/null; then
cargo install cargo-generate-rpm
fi

- name: Build
run: cargo build --release --target ${{ matrix.target }}
Expand All @@ -73,22 +76,19 @@ jobs:
echo "version=${GITHUB_REF#refs/tags/v}" >> $GITHUB_OUTPUT
shell: bash

- name: Create generic archive (Unix)
if: runner.os != 'Windows'
- name: Create archives and packages
run: |
cd target/${{ matrix.target }}/release
tar czf ../../../${{ steps.crate_info.outputs.name }}-${{ matrix.target }}-${{ steps.crate_info.outputs.version }}.tar.gz ${{ steps.crate_info.outputs.name }}

- name: Create generic archive (Windows)
if: runner.os == 'Windows'
run: |
cd target/${{ matrix.target }}/release
7z a ../../../${{ steps.crate_info.outputs.name }}-${{ matrix.target }}-${{ steps.crate_info.outputs.version }}.zip ${{ steps.crate_info.outputs.name }}.exe

- name: Create Windows executable
if: runner.os == 'Windows'
run: |
cp target/${{ matrix.target }}/release/${{ steps.crate_info.outputs.name }}.exe ${{ steps.crate_info.outputs.name }}-${{ matrix.target }}-${{ steps.crate_info.outputs.version }}.exe
case "${{ runner.os }}" in
"Windows")
7z a ../../../${{ steps.crate_info.outputs.name }}-${{ matrix.target }}-${{ steps.crate_info.outputs.version }}.zip ${{ steps.crate_info.outputs.name }}.exe
cp ${{ steps.crate_info.outputs.name }}.exe ../../../${{ steps.crate_info.outputs.name }}-${{ matrix.target }}-${{ steps.crate_info.outputs.version }}.exe
;;
*)
tar czf ../../../${{ steps.crate_info.outputs.name }}-${{ matrix.target }}-${{ steps.crate_info.outputs.version }}.tar.gz ${{ steps.crate_info.outputs.name }}
;;
esac
shell: bash

- name: Create DEB package
if: matrix.target == 'x86_64-unknown-linux-gnu'
Expand All @@ -112,41 +112,27 @@ jobs:
*.exe
*.deb
*.rpm
retention-days: 1

release:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Download artifacts
uses: actions/download-artifact@v4
with:
path: artifacts

- name: Get crate info
id: crate_info
run: |
echo "name=$(cargo metadata --no-deps --format-version 1 | jq -r '.packages[0].name')" >> $GITHUB_OUTPUT
echo "version=${GITHUB_REF#refs/tags/v}" >> $GITHUB_OUTPUT

- name: Create release
uses: softprops/action-gh-release@v1
with:
files: artifacts/**/*
name: "v${{ steps.crate_info.outputs.version }}"
body: |
## Installation

| System / Distribution | File | Description |
|:----------------------|:-----|:------------|
| **Generic Linux** | [${{ steps.crate_info.outputs.name }}-x86_64-unknown-linux-gnu-${{ steps.crate_info.outputs.version }}.tar.gz](https://github.com/${{ github.repository }}/releases/download/v${{ steps.crate_info.outputs.version }}/${{ steps.crate_info.outputs.name }}-x86_64-unknown-linux-gnu-${{ steps.crate_info.outputs.version }}.tar.gz) | Extract and run the binary |
| **Debian / Ubuntu** | [${{ steps.crate_info.outputs.name }}-${{ steps.crate_info.outputs.version }}-amd64.deb](https://github.com/${{ github.repository }}/releases/download/v${{ steps.crate_info.outputs.version }}/${{ steps.crate_info.outputs.name }}-${{ steps.crate_info.outputs.version }}-amd64.deb) | Install using `dpkg -i` |
| **Fedora / CentOS / openSUSE** | [${{ steps.crate_info.outputs.name }}-${{ steps.crate_info.outputs.version }}-1.x86_64.rpm](https://github.com/${{ github.repository }}/releases/download/v${{ steps.crate_info.outputs.version }}/${{ steps.crate_info.outputs.name }}-${{ steps.crate_info.outputs.version }}-1.x86_64.rpm) | Install using `rpm -i` or `dnf install` |
| **Windows** | [${{ steps.crate_info.outputs.name }}-x86_64-pc-windows-msvc-${{ steps.crate_info.outputs.version }}.exe](https://github.com/${{ github.repository }}/releases/download/v${{ steps.crate_info.outputs.version }}/${{ steps.crate_info.outputs.name }}-x86_64-pc-windows-msvc-${{ steps.crate_info.outputs.version }}.exe) | Standalone executable |
| **Windows (Archive)** | [${{ steps.crate_info.outputs.name }}-x86_64-pc-windows-msvc-${{ steps.crate_info.outputs.version }}.zip](https://github.com/${{ github.repository }}/releases/download/v${{ steps.crate_info.outputs.version }}/${{ steps.crate_info.outputs.name }}-x86_64-pc-windows-msvc-${{ steps.crate_info.outputs.version }}.zip) | Extract and run |
| **macOS Intel** | [${{ steps.crate_info.outputs.name }}-x86_64-apple-darwin-${{ steps.crate_info.outputs.version }}.tar.gz](https://github.com/${{ github.repository }}/releases/download/v${{ steps.crate_info.outputs.version }}/${{ steps.crate_info.outputs.name }}-x86_64-apple-darwin-${{ steps.crate_info.outputs.version }}.tar.gz) | Extract and run the binary |
| **macOS Apple Silicon** | [${{ steps.crate_info.outputs.name }}-aarch64-apple-darwin-${{ steps.crate_info.outputs.version }}.tar.gz](https://github.com/${{ github.repository }}/releases/download/v${{ steps.crate_info.outputs.version }}/${{ steps.crate_info.outputs.name }}-aarch64-apple-darwin-${{ steps.crate_info.outputs.version }}.tar.gz) | Extract and run the binary |
generate_release_notes: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
27 changes: 19 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
name: Rust CI

on:
pull_request:
push:
branches:
- master
schedule:
- cron: "11 7 * * 1,4"

env:
RUSTFLAGS: -Dwarnings

CARGO_INCREMENTAL: 0
CARGO_TERM_COLOR: always
jobs:
fmt:
runs-on: ubuntu-latest
Expand All @@ -28,7 +27,11 @@ jobs:
- uses: dtolnay/rust-toolchain@stable
with:
components: clippy
- uses: swatinem/rust-cache@v2
- uses: Swatinem/rust-cache@v2
with:
prefix-key: clippy
shared-key: stable
save-if: ${{ github.ref == 'refs/heads/master' }}
- run: cargo clippy --workspace --tests --examples -- -D warnings

docs:
Expand All @@ -40,12 +43,17 @@ jobs:
- uses: dtolnay/rust-toolchain@stable
with:
components: rust-docs
- uses: swatinem/rust-cache@v2
- uses: Swatinem/rust-cache@v2
with:
prefix-key: docs
shared-key: stable
save-if: ${{ github.ref == 'refs/heads/master' }}
- run: cargo doc --workspace --no-deps

test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
rust: [stable]
Expand All @@ -54,8 +62,11 @@ jobs:
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{ matrix.rust }}
- uses: swatinem/rust-cache@v2
- uses: Swatinem/rust-cache@v2
with:
prefix-key: test
key: ${{ matrix.os }}
- run: cargo test --workspace
- run: cargo test --workspace --examples --bins
shared-key: stable
save-if: ${{ github.ref == 'refs/heads/master' }}
- run: cargo test --workspace --no-fail-fast
- run: cargo test --workspace --examples --bins --no-fail-fast
35 changes: 35 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,41 @@

All notable changes to this project will be documented in this file.

## [0.0.4] - 2025-11-07

### Documentation

- Removed duplicate packaging status badge
- Update changelog
- Added preview image, packaging status images
- Updated repology packaging status
- Added benchmark, updated badges

### Features

- Added funding file

### Miscellaneous Tasks

- Add owo-colors and criterion benchmark

### Performance

- Added criterion benchmark
- Updated get_size function with very performance-friendly implemetation

### Refactor

- Clippy lint fix
- Cargo fmt linting fix
- Main code moved to lib.rs
- Clippy lint fix

### Ci

- Removed unneccesary whats changed title
- Added testing workflow action

## [0.0.3] - 2025-11-02

### Bug Fixes
Expand Down
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "cachefetch"
version = "0.0.4"
version = "0.0.5"
edition = "2024"

authors = ["ErenayDev <erenaydev@proton.me>"]
Expand Down
Loading