Skip to content

ext

ext #74

Workflow file for this run

name: "Build and populate cache"
on:
push:
branches:
- main
- master
workflow_dispatch:
inputs:
debug_enabled:
type: boolean
description: 'Run the build with tmate debugging enabled (https://github.com/marketplace/actions/debugging-with-tmate)'
required: false
default: false
jobs:
build:
strategy:
matrix:
cachixName:
- henriquekh
runs-on: ubuntu-latest
steps:
- name: Maximize build space
uses: easimon/maximize-build-space@master
with:
swap-size-mb: 1024
root-reserve-mb: 4096
build-mount-path: /nix/store
remove-dotnet: 'true'
remove-android: 'true'
remove-haskell: 'true'
remove-codeql: 'true'
- name: Checkout repository
uses: actions/checkout@v5
- name: Setup tmate session
uses: mxschmitt/action-tmate@v3
if: ${{ github.event_name == 'workflow_dispatch' && inputs.debug_enabled }}
- name: Install nix
uses: cachix/install-nix-action@v31
with:
nix_path: nixpkgs=https://github.com/NixOS/nixpkgs/archive/refs/heads/nixos-unstable.tar.gz
extra_nix_config: |
experimental-features = nix-command flakes
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
- name: Show nixpkgs version
run: nix-instantiate --eval -E '(import <nixpkgs> {}).lib.version'
- name: Setup cachix
uses: cachix/cachix-action@v16
# Don't replace <YOUR_CACHIX_NAME> here!
if: ${{ matrix.cachixName != '<YOUR_CACHIX_NAME>' }}
with:
name: ${{ matrix.cachixName }}
signingKey: '${{ secrets.CACHIX_SIGNING_KEY }}'
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
extraPullNames: nix-community,hyprland,niri
- name: Build all outputs
run: |
nix build github:srid/devour-flake \
-L --no-link --print-out-paths \
--override-input flake . \
> result
- name: Cache results
if: ${{ matrix.cachixName != '<YOUR_CACHIX_NAME>' }}
run: cachix push ${{ matrix.cachixName }} < result