mirror of
https://github.com/perstarkse/minne.git
synced 2026-06-29 13:26:22 +02:00
ci: nix flake fixes
This commit is contained in:
@@ -1,7 +1,6 @@
|
|||||||
name: CI
|
name: CI
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
id-token: write
|
|
||||||
actions: write
|
actions: write
|
||||||
|
|
||||||
on:
|
on:
|
||||||
@@ -10,33 +9,18 @@ on:
|
|||||||
branches: [main]
|
branches: [main]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
checks:
|
check:
|
||||||
name: Nix checks
|
name: Format, lint, build & test
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
permissions:
|
|
||||||
id-token: write
|
|
||||||
contents: read
|
|
||||||
actions: write
|
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
submodules: recursive
|
submodules: recursive
|
||||||
|
|
||||||
- name: Install Nix
|
- uses: DeterminateSystems/determinate-nix-action@v3
|
||||||
uses: DeterminateSystems/determinate-nix-action@main
|
|
||||||
|
|
||||||
- name: Set up Nix store cache
|
- uses: DeterminateSystems/magic-nix-cache-action@main
|
||||||
uses: nix-community/cache-nix-action@v6
|
|
||||||
with:
|
|
||||||
primary-key: nix-${{ runner.os }}-${{ hashFiles('**/*.nix', '**/flake.lock', 'Cargo.lock') }}
|
|
||||||
restore-prefixes-first-match: nix-${{ runner.os }}-
|
|
||||||
gc-max-store-size-linux: 10G
|
|
||||||
purge: true
|
|
||||||
purge-prefixes: nix-${{ runner.os }}-
|
|
||||||
purge-created: 14
|
|
||||||
purge-last-access: 7
|
|
||||||
purge-primary-key: never
|
|
||||||
|
|
||||||
- name: Run all flake checks
|
- name: Check formatting, clippy lint, unit tests & ort version
|
||||||
run: nix flake check -L --show-trace
|
run: nix flake check --show-trace
|
||||||
|
|||||||
@@ -26,29 +26,16 @@ jobs:
|
|||||||
submodules: recursive
|
submodules: recursive
|
||||||
|
|
||||||
- name: Install Nix
|
- name: Install Nix
|
||||||
uses: DeterminateSystems/determinate-nix-action@main
|
uses: DeterminateSystems/determinate-nix-action@v3
|
||||||
with:
|
|
||||||
extra-conf: |
|
|
||||||
experimental-features = nix-command flakes
|
|
||||||
|
|
||||||
- name: Set up Nix store cache
|
- uses: DeterminateSystems/magic-nix-cache-action@main
|
||||||
uses: nix-community/cache-nix-action@v6
|
|
||||||
with:
|
|
||||||
primary-key: nix-${{ runner.os }}-${{ hashFiles('**/*.nix', '**/flake.lock', 'Cargo.lock') }}
|
|
||||||
restore-prefixes-first-match: nix-${{ runner.os }}-
|
|
||||||
gc-max-store-size-linux: 10G
|
|
||||||
purge: true
|
|
||||||
purge-prefixes: nix-${{ runner.os }}-
|
|
||||||
purge-created: 14
|
|
||||||
purge-last-access: 7
|
|
||||||
purge-primary-key: never
|
|
||||||
|
|
||||||
- name: Read ORT version from flake
|
- name: Read ORT version from flake
|
||||||
id: ort_version
|
id: ort_version
|
||||||
run: echo "value=$(nix eval .#lib.ortVersion --raw)" >> "$GITHUB_OUTPUT"
|
run: echo "value=$(nix eval .#lib.ortVersion --raw)" >> "$GITHUB_OUTPUT"
|
||||||
|
|
||||||
- name: Verify ort-version matches nixpkgs onnxruntime
|
- name: Verify ort-version matches nixpkgs onnxruntime
|
||||||
run: nix flake check --system x86_64-linux -L
|
run: nix flake check --system x86_64-linux
|
||||||
|
|
||||||
- name: Install dist
|
- name: Install dist
|
||||||
shell: bash
|
shell: bash
|
||||||
@@ -217,19 +204,9 @@ jobs:
|
|||||||
submodules: recursive
|
submodules: recursive
|
||||||
|
|
||||||
- name: Install Nix
|
- name: Install Nix
|
||||||
uses: DeterminateSystems/determinate-nix-action@main
|
uses: DeterminateSystems/determinate-nix-action@v3
|
||||||
|
|
||||||
- name: Set up Nix store cache
|
- uses: DeterminateSystems/magic-nix-cache-action@main
|
||||||
uses: nix-community/cache-nix-action@v6
|
|
||||||
with:
|
|
||||||
primary-key: nix-${{ runner.os }}-${{ hashFiles('**/*.nix', '**/flake.lock', 'Cargo.lock') }}
|
|
||||||
restore-prefixes-first-match: nix-${{ runner.os }}-
|
|
||||||
gc-max-store-size-linux: 10G
|
|
||||||
purge: true
|
|
||||||
purge-prefixes: nix-${{ runner.os }}-
|
|
||||||
purge-created: 14
|
|
||||||
purge-last-access: 7
|
|
||||||
purge-primary-key: never
|
|
||||||
|
|
||||||
- name: Build Docker image with Nix
|
- name: Build Docker image with Nix
|
||||||
run: nix build .#dockerImage -L --show-trace
|
run: nix build .#dockerImage -L --show-trace
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
## Unreleased
|
## Unreleased
|
||||||
|
|
||||||
|
- Infra: CI workflow fixes. CI is now a nix flake check which includes compilation, caching and running tests, clippy, fmt, validation for ort version.
|
||||||
- Docker-compose: The example now references the ghcr image, this is so we can remove the Dockerfile and reducing maintenance scope.
|
- Docker-compose: The example now references the ghcr image, this is so we can remove the Dockerfile and reducing maintenance scope.
|
||||||
- Refactor: web scraping now uses `servo-fetch` (pure-Rust Servo engine) and PDF rendering uses `pdfium-render` (direct PDFium bindings) — reduces Docker image size by ~300MB, improves startup latency by ~100× for PDF rendering, and provides more stable output
|
- Refactor: web scraping now uses `servo-fetch` (pure-Rust Servo engine) and PDF rendering uses `pdfium-render` (direct PDFium bindings) — reduces Docker image size by ~300MB, improves startup latency by ~100× for PDF rendering, and provides more stable output
|
||||||
- Fix: added `pkgs.libglvnd` to `LD_LIBRARY_PATH` in devenv so Servo engine can find `libEGL.so` at runtime
|
- Fix: added `pkgs.libglvnd` to `LD_LIBRARY_PATH` in devenv so Servo engine can find `libEGL.so` at runtime
|
||||||
|
|||||||
Reference in New Issue
Block a user