nixos-config/.github/workflows/build-and-cache.yml

41 lines
1.1 KiB
YAML
Raw Normal View History

2025-01-08 21:35:09 -05:00
name: build and cache random stuff
on:
workflow_dispatch:
push:
jobs:
build:
2025-01-08 22:22:02 -05:00
strategy:
matrix:
package:
2025-01-18 16:45:02 -05:00
- github:cything/nixpkgs/d89cb92a38516c06964fbd814767c9936edaeb4d#lact
2025-01-18 01:06:54 -05:00
os:
- ubuntu-latest
- macos-latest
runs-on: ${{ matrix.os }}
2025-01-18 01:24:30 -05:00
continue-on-error: true
2025-01-08 21:35:09 -05:00
steps:
- uses: DeterminateSystems/nix-installer-action@main
2025-01-08 23:43:42 -05:00
with:
logger: pretty
2025-01-18 16:48:57 -05:00
# use sccache for Rust
- name: Run sccache-cache
if: (env.SCCACHE_GHA_ENABLED == 'true')
uses: mozilla-actions/sccache-action@main
# use rust-cache
- uses: Swatinem/rust-cache@v2
with:
cache-all-crates: "true"
cache-on-failure: "true"
cache-targets: "true"
2025-01-08 21:35:09 -05:00
- uses: DeterminateSystems/magic-nix-cache-action@main
- name: Setup Attic cache
uses: ryanccn/attic-action@v0
with:
endpoint: ${{ vars.ATTIC_ENDPOINT }}
cache: ${{ vars.ATTIC_CACHE }}
token: ${{ secrets.ATTIC_TOKEN }}
2025-01-18 16:19:33 -05:00
- run: nix build -L '${{ matrix.package }}'