Skip to content

Commit b754b38

Browse files
committed
build(ci): align workflows with flake and enable mold/chafa
- Enable `chafa-dyn` feature for `ratatui-image` to support dynamic linking - Add `pkgs.chafa` to `flake.nix` build inputs - Update CI to install `libchafa`, `mold`, and `clang` - Configure `mold` linker and `clang` environment variables for Linux and macOS
1 parent d39355c commit b754b38

4 files changed

Lines changed: 17 additions & 2 deletions

File tree

.github/workflows/ci.yml

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,20 @@ jobs:
3737

3838
- name: Install Linux dependencies
3939
if: runner.os == 'Linux'
40-
run: sudo apt-get update && sudo apt-get install -y libdbus-1-dev pkg-config
40+
run: |
41+
sudo apt-get update
42+
sudo apt-get install -y libdbus-1-dev pkg-config libchafa-dev libglib2.0-dev mold clang
43+
echo "RUSTFLAGS=-C link-arg=-fuse-ld=mold" >> $GITHUB_ENV
44+
echo "CC=clang" >> $GITHUB_ENV
45+
echo "CXX=clang++" >> $GITHUB_ENV
46+
47+
- name: Install macOS dependencies
48+
if: runner.os == 'macOS'
49+
run: |
50+
brew install chafa pkg-config mold llvm
51+
echo "RUSTFLAGS=-C link-arg=-fuse-ld=mold" >> $GITHUB_ENV
52+
echo "CC=$(brew --prefix llvm)/bin/clang" >> $GITHUB_ENV
53+
echo "CXX=$(brew --prefix llvm)/bin/clang++" >> $GITHUB_ENV
4154
4255
- run: cargo test --release --target ${{ matrix.target }}
4356

Cargo.lock

Lines changed: 1 addition & 0 deletions
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
@@ -51,7 +51,7 @@ lru = "0.16.3"
5151
unicode-width = "0.2.0"
5252

5353
# Image rendering
54-
ratatui-image = { version = "10.0.3", features = ["crossterm"], default-features = false }
54+
ratatui-image = { version = "10.0.3", features = ["crossterm", "chafa-dyn"], default-features = false }
5555
image = { version = "0.25.9", default-features = false, features = ["png", "jpeg", "webp"] }
5656
sha2 = "0.10.9"
5757
hex = "0.4.3"

flake.nix

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@
4343
buildInputs =
4444
[
4545
pkgs.dbus
46+
pkgs.chafa
4647
]
4748
++ pkgs.lib.optionals pkgs.stdenv.hostPlatform.isDarwin [
4849
pkgs.darwin.apple_sdk.frameworks.Security

0 commit comments

Comments
 (0)