Skip to content

Commit 9cd9a22

Browse files
authored
v0.0.5
2 parents 58f214b + 0100a8a commit 9cd9a22

5 files changed

Lines changed: 87 additions & 55 deletions

File tree

.github/workflows/autoBuild.yml

Lines changed: 31 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,15 @@
11
name: Auto Build Release
2-
32
on:
43
push:
54
tags:
65
- "v*"
7-
86
permissions:
97
contents: write
108
packages: write
11-
129
env:
1310
CARGO_TERM_COLOR: always
14-
11+
CARGO_INCREMENTAL: 0
12+
RUSTFLAGS: "-C codegen-units=1 -C strip=symbols"
1513
jobs:
1614
build:
1715
name: Build ${{ matrix.target }}
@@ -21,20 +19,14 @@ jobs:
2119
include:
2220
- target: x86_64-unknown-linux-gnu
2321
os: ubuntu-latest
24-
format: tar.gz
2522
- target: aarch64-unknown-linux-gnu
2623
os: ubuntu-latest
27-
format: tar.gz
2824
- target: x86_64-pc-windows-msvc
2925
os: windows-latest
30-
format: zip
3126
- target: x86_64-apple-darwin
3227
os: macos-latest
33-
format: tar.gz
3428
- target: aarch64-apple-darwin
3529
os: macos-latest
36-
format: tar.gz
37-
3830
steps:
3931
- uses: actions/checkout@v4
4032

@@ -45,23 +37,34 @@ jobs:
4537

4638
- uses: Swatinem/rust-cache@v2
4739
with:
40+
prefix-key: release
4841
key: ${{ matrix.target }}
4942
cache-on-failure: true
5043

44+
- name: Cache cargo tools
45+
uses: actions/cache@v4
46+
if: matrix.target == 'x86_64-unknown-linux-gnu'
47+
with:
48+
path: ~/.cargo/bin
49+
key: cargo-tools-${{ runner.os }}-deb-rpm
50+
restore-keys: cargo-tools-${{ runner.os }}-
51+
5152
- name: Install cross-compilation tools
5253
if: matrix.target == 'aarch64-unknown-linux-gnu'
5354
run: |
5455
sudo apt-get update
5556
sudo apt-get install -y gcc-aarch64-linux-gnu
5657
echo "CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER=aarch64-linux-gnu-gcc" >> $GITHUB_ENV
5758
58-
- name: Install cargo-deb
59+
- name: Install cargo tools
5960
if: matrix.target == 'x86_64-unknown-linux-gnu'
60-
run: cargo install cargo-deb
61-
62-
- name: Install cargo-generate-rpm
63-
if: matrix.target == 'x86_64-unknown-linux-gnu'
64-
run: cargo install cargo-generate-rpm
61+
run: |
62+
if ! command -v cargo-deb &> /dev/null; then
63+
cargo install cargo-deb
64+
fi
65+
if ! command -v cargo-generate-rpm &> /dev/null; then
66+
cargo install cargo-generate-rpm
67+
fi
6568
6669
- name: Build
6770
run: cargo build --release --target ${{ matrix.target }}
@@ -73,22 +76,19 @@ jobs:
7376
echo "version=${GITHUB_REF#refs/tags/v}" >> $GITHUB_OUTPUT
7477
shell: bash
7578

76-
- name: Create generic archive (Unix)
77-
if: runner.os != 'Windows'
79+
- name: Create archives and packages
7880
run: |
7981
cd target/${{ matrix.target }}/release
80-
tar czf ../../../${{ steps.crate_info.outputs.name }}-${{ matrix.target }}-${{ steps.crate_info.outputs.version }}.tar.gz ${{ steps.crate_info.outputs.name }}
81-
82-
- name: Create generic archive (Windows)
83-
if: runner.os == 'Windows'
84-
run: |
85-
cd target/${{ matrix.target }}/release
86-
7z a ../../../${{ steps.crate_info.outputs.name }}-${{ matrix.target }}-${{ steps.crate_info.outputs.version }}.zip ${{ steps.crate_info.outputs.name }}.exe
87-
88-
- name: Create Windows executable
89-
if: runner.os == 'Windows'
90-
run: |
91-
cp target/${{ matrix.target }}/release/${{ steps.crate_info.outputs.name }}.exe ${{ steps.crate_info.outputs.name }}-${{ matrix.target }}-${{ steps.crate_info.outputs.version }}.exe
82+
case "${{ runner.os }}" in
83+
"Windows")
84+
7z a ../../../${{ steps.crate_info.outputs.name }}-${{ matrix.target }}-${{ steps.crate_info.outputs.version }}.zip ${{ steps.crate_info.outputs.name }}.exe
85+
cp ${{ steps.crate_info.outputs.name }}.exe ../../../${{ steps.crate_info.outputs.name }}-${{ matrix.target }}-${{ steps.crate_info.outputs.version }}.exe
86+
;;
87+
*)
88+
tar czf ../../../${{ steps.crate_info.outputs.name }}-${{ matrix.target }}-${{ steps.crate_info.outputs.version }}.tar.gz ${{ steps.crate_info.outputs.name }}
89+
;;
90+
esac
91+
shell: bash
9292

9393
- name: Create DEB package
9494
if: matrix.target == 'x86_64-unknown-linux-gnu'
@@ -112,41 +112,27 @@ jobs:
112112
*.exe
113113
*.deb
114114
*.rpm
115+
retention-days: 1
115116

116117
release:
117118
needs: build
118119
runs-on: ubuntu-latest
119120
steps:
120121
- uses: actions/checkout@v4
121-
122122
- name: Download artifacts
123123
uses: actions/download-artifact@v4
124124
with:
125125
path: artifacts
126-
127126
- name: Get crate info
128127
id: crate_info
129128
run: |
130129
echo "name=$(cargo metadata --no-deps --format-version 1 | jq -r '.packages[0].name')" >> $GITHUB_OUTPUT
131130
echo "version=${GITHUB_REF#refs/tags/v}" >> $GITHUB_OUTPUT
132-
133131
- name: Create release
134132
uses: softprops/action-gh-release@v1
135133
with:
136134
files: artifacts/**/*
137135
name: "v${{ steps.crate_info.outputs.version }}"
138-
body: |
139-
## Installation
140-
141-
| System / Distribution | File | Description |
142-
|:----------------------|:-----|:------------|
143-
| **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 |
144-
| **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` |
145-
| **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` |
146-
| **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 |
147-
| **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 |
148-
| **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 |
149-
| **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 |
150136
generate_release_notes: true
151137
env:
152138
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/ci.yml

Lines changed: 19 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,15 @@
11
name: Rust CI
2-
32
on:
43
pull_request:
54
push:
65
branches:
76
- master
87
schedule:
98
- cron: "11 7 * * 1,4"
10-
119
env:
1210
RUSTFLAGS: -Dwarnings
13-
11+
CARGO_INCREMENTAL: 0
12+
CARGO_TERM_COLOR: always
1413
jobs:
1514
fmt:
1615
runs-on: ubuntu-latest
@@ -28,7 +27,11 @@ jobs:
2827
- uses: dtolnay/rust-toolchain@stable
2928
with:
3029
components: clippy
31-
- uses: swatinem/rust-cache@v2
30+
- uses: Swatinem/rust-cache@v2
31+
with:
32+
prefix-key: clippy
33+
shared-key: stable
34+
save-if: ${{ github.ref == 'refs/heads/master' }}
3235
- run: cargo clippy --workspace --tests --examples -- -D warnings
3336

3437
docs:
@@ -40,12 +43,17 @@ jobs:
4043
- uses: dtolnay/rust-toolchain@stable
4144
with:
4245
components: rust-docs
43-
- uses: swatinem/rust-cache@v2
46+
- uses: Swatinem/rust-cache@v2
47+
with:
48+
prefix-key: docs
49+
shared-key: stable
50+
save-if: ${{ github.ref == 'refs/heads/master' }}
4451
- run: cargo doc --workspace --no-deps
4552

4653
test:
4754
runs-on: ${{ matrix.os }}
4855
strategy:
56+
fail-fast: false
4957
matrix:
5058
os: [ubuntu-latest, windows-latest, macos-latest]
5159
rust: [stable]
@@ -54,8 +62,11 @@ jobs:
5462
- uses: dtolnay/rust-toolchain@stable
5563
with:
5664
toolchain: ${{ matrix.rust }}
57-
- uses: swatinem/rust-cache@v2
65+
- uses: Swatinem/rust-cache@v2
5866
with:
67+
prefix-key: test
5968
key: ${{ matrix.os }}
60-
- run: cargo test --workspace
61-
- run: cargo test --workspace --examples --bins
69+
shared-key: stable
70+
save-if: ${{ github.ref == 'refs/heads/master' }}
71+
- run: cargo test --workspace --no-fail-fast
72+
- run: cargo test --workspace --examples --bins --no-fail-fast

CHANGELOG.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,41 @@
22

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

5+
## [0.0.4] - 2025-11-07
6+
7+
### Documentation
8+
9+
- Removed duplicate packaging status badge
10+
- Update changelog
11+
- Added preview image, packaging status images
12+
- Updated repology packaging status
13+
- Added benchmark, updated badges
14+
15+
### Features
16+
17+
- Added funding file
18+
19+
### Miscellaneous Tasks
20+
21+
- Add owo-colors and criterion benchmark
22+
23+
### Performance
24+
25+
- Added criterion benchmark
26+
- Updated get_size function with very performance-friendly implemetation
27+
28+
### Refactor
29+
30+
- Clippy lint fix
31+
- Cargo fmt linting fix
32+
- Main code moved to lib.rs
33+
- Clippy lint fix
34+
35+
### Ci
36+
37+
- Removed unneccesary whats changed title
38+
- Added testing workflow action
39+
540
## [0.0.3] - 2025-11-02
641

742
### Bug Fixes

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "cachefetch"
3-
version = "0.0.4"
3+
version = "0.0.5"
44
edition = "2024"
55

66
authors = ["ErenayDev <erenaydev@proton.me>"]

0 commit comments

Comments
 (0)