Skip to content

Commit

Permalink
update flake ci checks
Browse files Browse the repository at this point in the history
  • Loading branch information
eureka-cpu committed Jul 23, 2024
1 parent 3011793 commit 45ff768
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 44 deletions.
53 changes: 9 additions & 44 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Pull Request
name: flake checks
on:
pull_request:
branches:
Expand All @@ -10,8 +10,8 @@ concurrency:
permissions: read-all

jobs:
flake-health-checks:
name: Nix flake health checks
flake-health-check:
name: Nix flake health check
runs-on: ubuntu-latest
permissions:
id-token: "write"
Expand All @@ -21,60 +21,25 @@ jobs:
- uses: DeterminateSystems/nix-installer-action@main
- uses: DeterminateSystems/magic-nix-cache-action@main
- uses: DeterminateSystems/flake-checker-action@main
# check the flake can be built
- run: nix flake check
# build flake packages
- run: nix build .#versa
- run: nix build .#lasr_node

check-flake-devShells:
name: Nix flake devShell checks
flake-devShell-check:
name: Nix flake devShell check
runs-on: ubuntu-latest
permissions:
id-token: "write"
contents: "read"
steps:
- name: Free Disk Space (Ubuntu)
uses: jlumbroso/free-disk-space@main
with:
tool-cache: true
- uses: actions/checkout@v4
- uses: DeterminateSystems/nix-installer-action@main
- uses: DeterminateSystems/magic-nix-cache-action@main
# build development shells
- run: nix develop .#protocol-dev
- run: nix develop .#lasr-dev
- run: nix develop .#versa-rs
- run: nix develop .#versa-hs
- run: nix develop

check-digitalocean-images:
name: Build NixOS DigitalOcean images
flake-fmt-check:
name: Nix flake format check
runs-on: ubuntu-latest
permissions:
id-token: "write"
contents: "read"
steps:
- name: Free Disk Space (Ubuntu)
uses: jlumbroso/free-disk-space@main
with:
tool-cache: true
- uses: actions/checkout@v4
- uses: DeterminateSystems/nix-installer-action@main
- uses: DeterminateSystems/magic-nix-cache-action@main
- run: nix build .#lasr_nightly_image -L

check-vm-images:
name: Build NixOS VM images
runs-on: ubuntu-latest
permissions:
id-token: "write"
contents: "read"
steps:
- name: Free Disk Space (Ubuntu)
uses: jlumbroso/free-disk-space@main
with:
tool-cache: true
- uses: actions/checkout@v4
- uses: DeterminateSystems/nix-installer-action@main
- uses: DeterminateSystems/magic-nix-cache-action@main
- run: nix build .#lasr_vm -L
- run: nix fmt --accept-flake-config -- --check .
2 changes: 2 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,8 @@
nixpkgs-fmt
];
};

formatter = pkgs.nixpkgs-fmt;
}
) // {
nixosModules = {
Expand Down

0 comments on commit 45ff768

Please sign in to comment.