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

107 lines
3.2 KiB
YAML
Raw Permalink Normal View History

2025-01-08 21:35:09 -05:00
name: build and cache random stuff
on:
workflow_dispatch:
push:
jobs:
2025-01-19 19:54:35 -05:00
build-packages:
2025-01-08 22:22:02 -05:00
strategy:
matrix:
package:
2025-01-18 03:05:43 -05:00
- github:cything/nixpkgs/fd06e41125350bc3db5628df49d3b84e4652a59d#lact
2025-01-18 01:06:54 -05:00
os:
- ubuntu-latest
2025-01-19 20:08:27 -05:00
# - macos-latest
2025-01-18 01:06:54 -05:00
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-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 03:05:43 -05:00
- run: nix build -L '${{ matrix.package }}'
2025-01-19 19:54:35 -05:00
build-machines:
strategy:
matrix:
machine:
- chunk
- ytnix
- titan
2025-01-19 20:08:27 -05:00
os:
- ubuntu-latest
# - macos-latest
runs-on: ${{ matrix.os }}
continue-on-error: true
steps:
2025-01-19 21:05:49 -05:00
- name: Maximize build disk space
uses: easimon/maximize-build-space@v10
with:
2025-01-19 21:16:55 -05:00
overprovision-lvm: true
2025-01-19 21:05:49 -05:00
swap-size-mb: 1024
remove-dotnet: 'true'
remove-android: 'true'
remove-haskell: 'true'
remove-codeql: 'true'
remove-docker-images: 'true'
2025-01-19 21:16:55 -05:00
build-mount-path: /nix
build-mount-path-ownership: 'root:root'
2025-01-19 20:08:27 -05:00
- uses: DeterminateSystems/nix-installer-action@main
with:
logger: pretty
- 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 }}
- name: Sync repository
uses: actions/checkout@v4
with:
persist-credentials: false
- run: nix build -L --accept-flake-config .#nixosConfigurations.${{ matrix.machine }}.config.system.build.toplevel
build-homes:
strategy:
matrix:
2025-01-19 19:54:35 -05:00
home:
- yt@ytnix
- yt@chunk
os:
- ubuntu-latest
# - macos-latest
runs-on: ${{ matrix.os }}
continue-on-error: true
steps:
2025-01-19 21:05:49 -05:00
- name: Maximize build disk space
uses: easimon/maximize-build-space@v10
with:
2025-01-19 21:16:55 -05:00
overprovision-lvm: true
2025-01-19 21:05:49 -05:00
swap-size-mb: 1024
remove-dotnet: 'true'
remove-android: 'true'
remove-haskell: 'true'
remove-codeql: 'true'
remove-docker-images: 'true'
2025-01-19 21:16:55 -05:00
build-mount-path: /nix
build-mount-path-ownership: 'root:root'
2025-01-19 19:54:35 -05:00
- uses: DeterminateSystems/nix-installer-action@main
with:
logger: pretty
- 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 }}
- name: Sync repository
uses: actions/checkout@v4
with:
persist-credentials: false
2025-01-19 20:08:27 -05:00
- run: nix build -L --accept-flake-config .#homeConfigurations."${{ matrix.home }}".activationPackage