2023-12-26 20:17:26 +01:00
|
|
|
name: Nix CI
|
|
|
|
|
|
|
|
on:
|
|
|
|
workflow_dispatch: # allows manual triggering
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- master
|
|
|
|
pull_request:
|
|
|
|
types: [opened, synchronize, reopened]
|
|
|
|
|
2024-03-22 18:15:06 +01:00
|
|
|
concurrency:
|
|
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
|
|
cancel-in-progress: true
|
|
|
|
|
2023-12-26 20:17:26 +01:00
|
|
|
jobs:
|
2023-12-30 18:19:11 +01:00
|
|
|
nix-eval:
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
|
|
|
os: [ ubuntu-latest, macos-latest ]
|
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
steps:
|
|
|
|
- name: Checkout repository
|
|
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Install Nix
|
|
|
|
uses: DeterminateSystems/nix-installer-action@v9
|
|
|
|
with:
|
|
|
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
extra-conf: |
|
2024-02-22 17:32:09 +01:00
|
|
|
extra-substituters = https://llama-cpp.cachix.org https://cuda-maintainers.cachix.org
|
|
|
|
extra-trusted-public-keys = llama-cpp.cachix.org-1:H75X+w83wUKTIPSO1KWy9ADUrzThyGs8P5tmAbkWhQc= cuda-maintainers.cachix.org-1:0dq3bujKpuEPMCX6U4WylrUDZ9JyUG0VpVZa7CNfq5E=
|
2023-12-30 18:19:11 +01:00
|
|
|
- uses: DeterminateSystems/magic-nix-cache-action@v2
|
|
|
|
with:
|
|
|
|
upstream-cache: https://${{ matrix.cachixName }}.cachix.org
|
|
|
|
- name: List all flake outputs
|
|
|
|
run: nix flake show --all-systems
|
|
|
|
- name: Show all output paths
|
|
|
|
run: >
|
|
|
|
nix run github:nix-community/nix-eval-jobs
|
|
|
|
-- --gc-roots-dir gcroot
|
|
|
|
--flake
|
|
|
|
".#packages.$(nix eval --raw --impure --expr builtins.currentSystem)"
|
2023-12-26 20:17:26 +01:00
|
|
|
nix-build:
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
|
|
|
os: [ ubuntu-latest, macos-latest ]
|
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
steps:
|
|
|
|
- name: Checkout repository
|
|
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Install Nix
|
|
|
|
uses: DeterminateSystems/nix-installer-action@v9
|
|
|
|
with:
|
|
|
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
extra-conf: |
|
2024-02-22 17:32:09 +01:00
|
|
|
extra-substituters = https://llama-cpp.cachix.org https://cuda-maintainers.cachix.org
|
|
|
|
extra-trusted-public-keys = llama-cpp.cachix.org-1:H75X+w83wUKTIPSO1KWy9ADUrzThyGs8P5tmAbkWhQc= cuda-maintainers.cachix.org-1:0dq3bujKpuEPMCX6U4WylrUDZ9JyUG0VpVZa7CNfq5E=
|
2023-12-26 20:17:26 +01:00
|
|
|
- uses: DeterminateSystems/magic-nix-cache-action@v2
|
|
|
|
with:
|
|
|
|
upstream-cache: https://${{ matrix.cachixName }}.cachix.org
|
|
|
|
- name: Set-up cachix to push the results to
|
|
|
|
uses: cachix/cachix-action@v13
|
|
|
|
with:
|
|
|
|
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
|
2024-02-22 17:32:09 +01:00
|
|
|
name: llama-cpp
|
2023-12-26 20:17:26 +01:00
|
|
|
- name: Build
|
|
|
|
run: >
|
|
|
|
nix run github:Mic92/nix-fast-build
|
|
|
|
-- --skip-cached --no-nom
|
|
|
|
--flake
|
|
|
|
".#checks.$(nix eval --raw --impure --expr builtins.currentSystem)"
|