Skip to content
This repository has been archived by the owner on Jun 4, 2024. It is now read-only.

ci: simplify CI

ci: simplify CI #325

Workflow file for this run

name: Nix Flake
on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:
jobs:
self-care:
name: Flake self-check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Check Nix flake inputs
uses: DeterminateSystems/flake-checker-action@v5
with:
fail-mode: true
config-tests:
name: "${{ matrix.os-name }} Nix Test"
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- os: ubuntu-latest
os-name: "Linux x86"
flake-attr: nixosConfigurations.framework.config.system.build.toplevel
- os: macos-latest
os-name: "macOS x86"
flake-attr: darwinConfigurations.macbook_x86.config.system.build.toplevel
- os: macos-14
os-name: "macOS Apple Silicon"
flake-attr: darwinConfigurations.macbook.config.system.build.toplevel
steps:
- name: "Checkout Repo"
uses: actions/checkout@v4
- name: Free Disk Space (Ubuntu)
if: matrix.os == 'ubuntu-latest'
uses: jlumbroso/free-disk-space@main
with:
# this might remove tools that are actually needed,
# when set to "true" but frees about 6 GB
tool-cache: true
# all of these default to true, but feel free to set to
# "false" if necessary for your workflow
android: true
dotnet: true
haskell: true
large-packages: true
swap-storage: true
- name: "Maximize Disk Space"
if: matrix.os == 'ubuntu-latest'
uses: easimon/maximize-build-space@v8
with:
build-mount-path: /nix
remove-dotnet: "true"
remove-android: "true"
remove-haskell: "true"
temp-reserve-mb: "100"
swap-size-mb: "4096"
root-reserve-mb: "1024"
- name: "Install Nix"
uses: DeterminateSystems/nix-installer-action@v10
- name: "Nix Cache"
uses: DeterminateSystems/magic-nix-cache-action@v4
- name: "Test Nix config"
run: nix build -L '.#${{ matrix.flake-attr }}'