From 10dff5e82cde85127cafc013c64807d6e3310ef2 Mon Sep 17 00:00:00 2001 From: szymon Date: Wed, 30 Sep 2026 19:45:06 +0200 Subject: [PATCH] fix: ci using ubuntu old deps --- .github/workflows/static.yml | 11 ++++++++++- .github/workflows/tests.yml | 24 ++++++++++++++++-------- README.md | 2 +- 3 files changed, 27 insertions(+), 10 deletions(-) diff --git a/.github/workflows/static.yml b/.github/workflows/static.yml index ea5a2de..545d291 100644 --- a/.github/workflows/static.yml +++ b/.github/workflows/static.yml @@ -33,13 +33,22 @@ jobs: steps: - name: Checkout uses: actions/checkout@v4 + - name: Install dependencies run: sudo apt update && sudo apt install libnotify-dev clang pkg-config -y + + - uses: cachix/install-nix-action@v31 + - uses: cachix/cachix-action@v16 + with: + name: devenv + - name: Install devenv.sh + run: nix profile add nixpkgs#devenv + - name: Setup Pages uses: actions/configure-pages@v5 - name: Generate docs run: | - cargo doc --no-deps + devenv shell cargo doc --no-deps echo '' > target/doc/index.html - name: Upload artifact uses: actions/upload-pages-artifact@v3 diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index e47dc09..d199662 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -39,14 +39,18 @@ jobs: - uses: actions/checkout@v6 - uses: Swatinem/rust-cache@v2 - - name: Install dependencies - run: sudo apt-get update && sudo apt-get install -y libnotify-dev clang pkg-config + - uses: cachix/install-nix-action@v31 + - uses: cachix/cachix-action@v16 + with: + name: devenv + - name: Install devenv.sh + run: nix profile add nixpkgs#devenv - name: Test dev build - run: cargo test + run: devenv shell cargo test - name: Test release build - run: cargo test --release + run: devenv shell cargo test --release style-checks: runs-on: ubuntu-latest @@ -55,11 +59,15 @@ jobs: - uses: actions/checkout@v6 - uses: Swatinem/rust-cache@v2 - - name: Install dependencies - run: sudo apt install libnotify-dev clang pkg-config -y + - uses: cachix/install-nix-action@v31 + - uses: cachix/cachix-action@v16 + with: + name: devenv + - name: Install devenv.sh + run: nix profile add nixpkgs#devenv - name: Clippy check - run: cargo clippy -- -D warnings + run: devenv shell cargo clippy -- -D warnings - name: Format check - run: cargo fmt -- --check + run: devenv shell cargo fmt -- --check diff --git a/README.md b/README.md index 7eeb4ae..12fed61 100644 --- a/README.md +++ b/README.md @@ -38,7 +38,7 @@ cargo add --git "https://github.com/szymon-jozef/libnotify-rs" ## Dependencies To use this crate you need to have installed: -- [libnotify](https://gitlab.gnome.org/GNOME/libnotify), duh +- [libnotify](https://gitlab.gnome.org/GNOME/libnotify), duh (version 0.8.8 >= is supported) - [clang](https://clang.llvm.org/) for bindgen - [pkg-config](https://www.freedesktop.org/wiki/Software/pkg-config/?__goaway_challenge=meta-refresh&__goaway_id=e567f4f3ff21df0fb2b589fc86ed197e&__goaway_referer=https%3A%2F%2Fsearch.brave.com%2F), to find the above