2023-04-15 10:44:12 +02:00
|
|
|
name: "Set up binary cache"
|
2023-02-05 14:59:06 +01:00
|
|
|
|
2023-02-05 23:31:19 +01:00
|
|
|
on:
|
|
|
|
workflow_dispatch:
|
2023-02-05 23:24:00 +01:00
|
|
|
push:
|
2023-02-06 20:02:44 +01:00
|
|
|
branches:
|
|
|
|
- main
|
2023-02-05 23:24:00 +01:00
|
|
|
paths-ignore:
|
2023-02-16 20:01:59 +01:00
|
|
|
- .github/**
|
|
|
|
- assets/**
|
|
|
|
- .gitignore
|
2023-02-05 14:59:06 +01:00
|
|
|
|
|
|
|
jobs:
|
2023-07-24 07:19:27 +02:00
|
|
|
cachix:
|
2023-02-05 14:59:06 +01:00
|
|
|
runs-on: ubuntu-latest
|
2023-07-24 16:26:21 +02:00
|
|
|
|
2023-02-05 23:31:19 +01:00
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
package:
|
2023-07-24 07:19:27 +02:00
|
|
|
- default
|
|
|
|
- nix
|
|
|
|
- tidal
|
|
|
|
- maximal
|
2023-02-05 14:59:06 +01:00
|
|
|
steps:
|
|
|
|
- uses: easimon/maximize-build-space@v6
|
2023-10-01 15:17:48 +02:00
|
|
|
name: Maximize build space
|
2023-02-05 14:59:06 +01:00
|
|
|
with:
|
|
|
|
overprovision-lvm: true
|
|
|
|
remove-android: true
|
|
|
|
remove-dotnet: true
|
|
|
|
remove-haskell: true
|
2023-10-01 15:17:48 +02:00
|
|
|
remove-codeql: true
|
|
|
|
|
2023-02-05 14:59:06 +01:00
|
|
|
- uses: actions/checkout@v3
|
2023-10-01 15:17:48 +02:00
|
|
|
name: Checkout
|
|
|
|
|
2023-03-19 21:41:09 +01:00
|
|
|
- uses: cachix/install-nix-action@v20
|
2023-02-05 14:59:06 +01:00
|
|
|
with:
|
2023-07-24 07:19:27 +02:00
|
|
|
extra_nix_config: |
|
2023-02-05 23:31:19 +01:00
|
|
|
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
|
|
|
|
auto-optimise-store = true
|
|
|
|
experimental-features = nix-command flakes
|
2023-02-05 23:33:45 +01:00
|
|
|
nix_path: nixpkgs=channel:nixos-unstable
|
2023-10-01 15:17:48 +02:00
|
|
|
|
2023-02-05 14:59:06 +01:00
|
|
|
- uses: cachix/cachix-action@v12
|
|
|
|
with:
|
|
|
|
authToken: ${{ secrets.CACHIX_TOKEN }}
|
|
|
|
extraPullNames: nix-community
|
|
|
|
name: neovim-flake
|
2023-10-01 15:17:48 +02:00
|
|
|
|
2023-02-05 14:59:06 +01:00
|
|
|
- name: Set default git branch (to reduce log spam)
|
|
|
|
run: git config --global init.defaultBranch main
|
2023-10-01 15:17:48 +02:00
|
|
|
|
2023-02-05 14:59:06 +01:00
|
|
|
- name: Validate Flakes
|
|
|
|
run: nix flake check
|
2023-10-01 15:17:48 +02:00
|
|
|
|
2023-04-15 10:33:50 +02:00
|
|
|
- name: Build neovim-flake with default settings
|
2023-02-05 23:31:19 +01:00
|
|
|
run: nix build .#${{ matrix.package }} --print-build-logs
|