mirror of
https://github.com/daylinmorgan/oizys.git
synced 2024-11-05 01:53:15 -06:00
add nightly build process
This commit is contained in:
parent
3c93835312
commit
0c172affc5
3 changed files with 53 additions and 5 deletions
47
.github/workflows/nightly.yml
vendored
Normal file
47
.github/workflows/nightly.yml
vendored
Normal file
|
@ -0,0 +1,47 @@
|
|||
name: Build NixOS (on demand)
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
schedule:
|
||||
- cron: 0 0 * * *
|
||||
|
||||
# concurrency:
|
||||
# group: ${{ github.workflow }}-${{ github.ref }}-${{ inputs.host }}
|
||||
# cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- uses: ./.github/actions/clean-disk
|
||||
|
||||
- uses: DeterminateSystems/nix-installer-action@v12
|
||||
with:
|
||||
extra-conf: |
|
||||
accept-flake-config = true
|
||||
|
||||
- uses: DeterminateSystems/magic-nix-cache-action@v7
|
||||
|
||||
- uses: cachix/cachix-action@v15
|
||||
with:
|
||||
name: daylin
|
||||
authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}"
|
||||
|
||||
- name: Update nix flake
|
||||
run:
|
||||
nix flake update >> $GITHUB_STEP_SUMMARY
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
nix run . \
|
||||
-- \
|
||||
build --minimal \
|
||||
--host "othalan" \
|
||||
--flake . \
|
||||
--verbose \
|
||||
--debug \
|
||||
-- \
|
||||
--print-build-logs
|
|
@ -1,6 +1,5 @@
|
|||
inputs:
|
||||
inputs@{ nixpkgs, self, ... }:
|
||||
let
|
||||
inherit (inputs) nixpkgs self;
|
||||
lib = nixpkgs.lib.extend (import ./extended.nix);
|
||||
|
||||
inherit (builtins) mapAttrs readDir listToAttrs;
|
||||
|
@ -11,8 +10,7 @@ let
|
|||
#supportedSystems = ["x86_64-linux" "x86_64-darwin" "aarch64-linux" "aarch64-darwin"];
|
||||
supportedSystems = [ "x86_64-linux" ];
|
||||
forAllSystems = f: genAttrs supportedSystems (system: f (import nixpkgs { inherit system; }));
|
||||
in
|
||||
{
|
||||
|
||||
oizysFlake = {
|
||||
nixosModules = listToAttrs (findModulesList ../modules);
|
||||
nixosConfigurations = mapAttrs (name: _: mkSystem name) (readDir ../hosts);
|
||||
|
@ -38,4 +36,7 @@ in
|
|||
);
|
||||
formatter = forAllSystems (pkgs: pkgs.nixfmt-rfc-style);
|
||||
};
|
||||
in
|
||||
{
|
||||
inherit oizysFlake;
|
||||
}
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
let
|
||||
inherit (lib) mkIfIn;
|
||||
cfg = config.oizys.languages;
|
||||
zig = inputs.zig2nix.outputs.packages.${pkgs.system}.zig.default.bin;
|
||||
zig = inputs.zig2nix.outputs.packages.${pkgs.system}.zig.master.bin;
|
||||
zls = inputs.zls.outputs.packages.${pkgs.system}.default.overrideAttrs {
|
||||
nativeBuildInputs = [ zig ];
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue