Skip to content

Commit

Permalink
refactor: move development inputs/outputs back to dev flake (#458)
Browse files Browse the repository at this point in the history
* refactor: move development inputs/outputs back to dev flake

* ci: drop nix-fast-build

Doesn't work with Nix 2.26 yet, maybe we'll use it again some day
For now, Nix's default scheduling with a linkFarm and `nix flake check`
should be fine
  • Loading branch information
getchoo authored Jan 22, 2025
1 parent e68bce8 commit 6c244e5
Show file tree
Hide file tree
Showing 9 changed files with 400 additions and 364 deletions.
16 changes: 12 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,16 @@ on:
push:
branches: [ main ]
paths:
- '**.lock'
- '**.nix'
- 'flake.lock'
- 'pkgs/**'

- '.github/workflows/ci.yml'
pull_request:
paths:
- '**.lock'
- '**.nix'
- 'flake.lock'
- 'pkgs/**'

- '.github/workflows/ci.yml'
workflow_dispatch:
Expand All @@ -33,6 +35,9 @@ jobs:

- name: Install Nix
uses: cachix/install-nix-action@V27
with:
# NOTE: Required for subflake
install_url: https://releases.nixos.org/nix/nix-2.26.0/install

- name: Install Cachix
uses: cachix/cachix-action@v15
Expand All @@ -42,7 +47,7 @@ jobs:

- name: Run build
run: |
nix run .#build-outputs -- 'packages'
nix build './dev#all-ports' --print-build-logs --show-trace
modules:
name: Test Modules
Expand All @@ -61,6 +66,9 @@ jobs:

- name: Install Nix
uses: cachix/install-nix-action@V27
with:
# NOTE: Required for subflake
install_url: https://releases.nixos.org/nix/nix-2.26.0/install

- name: Install Cachix
uses: cachix/cachix-action@v15
Expand All @@ -70,7 +78,7 @@ jobs:

- name: Run tests
run: |
nix run .#build-outputs -- 'checks'
nix flake check './dev' --print-build-logs --show-trace
release-gate:
name: Release Gate
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:
branches: [ main ]
paths:
- "**.nix"
- "**.lock"

- ".github/workflows/format.yml"
workflow_dispatch:
Expand Down
15 changes: 10 additions & 5 deletions .github/workflows/website.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,20 @@ on:
push:
branches: [main]
paths:
- 'docs/**'
- 'CHANGELOG.md'
- '**.lock'
- '**.nix'
- 'docs/**'
- 'pkgs/**'
- 'CHANGELOG.md'

- '.github/workflows/website.yml'
pull_request:
paths:
- 'docs/**'
- 'CHANGELOG.md'
- '**.lock'
- '**.nix'
- 'docs/**'
- 'pkgs/**'
- 'CHANGELOG.md'

- '.github/workflows/website.yml'
workflow_dispatch:
Expand All @@ -32,6 +34,9 @@ jobs:

- name: Install Nix
uses: cachix/install-nix-action@V27
with:
# NOTE: Required for subflake
install_url: https://releases.nixos.org/nix/nix-2.26.0/install

- name: Install Cachix
uses: cachix/cachix-action@v15
Expand All @@ -44,7 +49,7 @@ jobs:
nix build \
--print-build-logs \
--show-trace \
'.#site'
'./dev#site'
- name: Get artifact directory
id: find-path
Expand Down
4 changes: 4 additions & 0 deletions dev/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
> [!WARNING]
> This is using features from the currently unstable Nix 2.26 release.
> ***It will not evaluate on versions prior to 2.26***.
> It is recommended to enter a shell with it by running `nix shell 'github:NixOS/nix/refs/tags/2.26.0'`
220 changes: 220 additions & 0 deletions dev/flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 6c244e5

Please sign in to comment.