diff --git a/.github/workflows/update.yml b/.github/workflows/update.yml index ea987d6a..e92c9fb2 100644 --- a/.github/workflows/update.yml +++ b/.github/workflows/update.yml @@ -132,7 +132,7 @@ jobs: id: update_flake_lock if: inputs.update_lock || github.event_name == 'schedule' run: | - nix-build ./update-scripts -A update + nix-build ./ci -A update ./result/bin/update --commit --github-output - name: Update generated files @@ -140,7 +140,7 @@ jobs: if: inputs.generate || github.event_name == 'schedule' run: | old=$(git show --no-patch --format=%h) - nix-build ./update-scripts -A generate + nix-build ./ci -A generate ./result/bin/generate --commit new=$(git show --no-patch --format=%h) if [ "$old" != "$new" ]; then diff --git a/update-scripts/README.md b/ci/README.md similarity index 64% rename from update-scripts/README.md rename to ci/README.md index b32e304c..24146fba 100644 --- a/update-scripts/README.md +++ b/ci/README.md @@ -1,9 +1,7 @@ -# Update scripts +# CI scripts -This directory contains update scripts that are not part of the actual flake. - -These scripts are used by the `update` CI workflow, so you shouldn't need to run them manually. -This workflow is found at `.github/workflows/update.yml`. +This directory contains CI-related scripts that are not part of the actual flake. +Unless developing or testing changes, you shouldn't need to run them manually. ## Developing @@ -14,17 +12,20 @@ For example, `nix-build -A generate` will build `./generate.nix` into `./result/ A `shell.nix` is available that will place `generate` on your PATH. You could use this directory's shell/packages from another working directory by supplying `nix-build` or `nix-shell` with a path. -E.g. `nix-shell ./update-scripts`. +E.g. `nix-shell ./ci`. ## Explanation -These packages are not in the flake outputs for two main reasons: +These packages are not in the flake outputs for three main reasons: - Packages built using the flake must follow the flake's `nixConfig` - Packages included in the flake's output are checked by `nix flake check` +- Some of the packages should have no dependency on the flake at all, + allowing this directory to be [sparse checked out][sparse-checkout] by a workflow -Being unable to bypass `nixConfig` is an issue because we want to disable [IFD] for the flake, but not for these generate scripts. +Being unable to bypass `nixConfig` is an issue because we want to disable [IFD] for the flake, but not for these scripts. If something changes upstream that causes the builds to fail, we don't want this to block us updating `flake.lock`. We'd still be made aware of any issues by the `update` CI workflow failing. +[sparse-checkout]: https://github.com/actions/checkout#scenarios [IFD]: https://nixos.org/manual/nix/stable/language/import-from-derivation diff --git a/update-scripts/default.nix b/ci/default.nix similarity index 100% rename from update-scripts/default.nix rename to ci/default.nix diff --git a/update-scripts/efmls-configs.nix b/ci/efmls-configs.nix similarity index 100% rename from update-scripts/efmls-configs.nix rename to ci/efmls-configs.nix diff --git a/update-scripts/generate.nix b/ci/generate.nix similarity index 100% rename from update-scripts/generate.nix rename to ci/generate.nix diff --git a/update-scripts/none-ls.nix b/ci/none-ls.nix similarity index 100% rename from update-scripts/none-ls.nix rename to ci/none-ls.nix diff --git a/update-scripts/nvim-lspconfig/clean-desc.py b/ci/nvim-lspconfig/clean-desc.py similarity index 100% rename from update-scripts/nvim-lspconfig/clean-desc.py rename to ci/nvim-lspconfig/clean-desc.py diff --git a/update-scripts/nvim-lspconfig/default.nix b/ci/nvim-lspconfig/default.nix similarity index 100% rename from update-scripts/nvim-lspconfig/default.nix rename to ci/nvim-lspconfig/default.nix diff --git a/update-scripts/nvim-lspconfig/desc-filter.lua b/ci/nvim-lspconfig/desc-filter.lua similarity index 100% rename from update-scripts/nvim-lspconfig/desc-filter.lua rename to ci/nvim-lspconfig/desc-filter.lua diff --git a/update-scripts/nvim-lspconfig/lspconfig-servers.lua b/ci/nvim-lspconfig/lspconfig-servers.lua similarity index 100% rename from update-scripts/nvim-lspconfig/lspconfig-servers.lua rename to ci/nvim-lspconfig/lspconfig-servers.lua diff --git a/update-scripts/rust-analyzer/default.nix b/ci/rust-analyzer/default.nix similarity index 100% rename from update-scripts/rust-analyzer/default.nix rename to ci/rust-analyzer/default.nix diff --git a/update-scripts/rust-analyzer/heading_filter.lua b/ci/rust-analyzer/heading_filter.lua similarity index 100% rename from update-scripts/rust-analyzer/heading_filter.lua rename to ci/rust-analyzer/heading_filter.lua diff --git a/update-scripts/shell.nix b/ci/shell.nix similarity index 100% rename from update-scripts/shell.nix rename to ci/shell.nix diff --git a/update-scripts/update.nix b/ci/update.nix similarity index 97% rename from update-scripts/update.nix rename to ci/update.nix index 0da63739..33c5c887 100644 --- a/update-scripts/update.nix +++ b/ci/update.nix @@ -66,7 +66,7 @@ writeShellApplication { ) fi - nix-build ./update-scripts -A version-info + nix-build ./ci -A version-info ./result/bin/version-info if [ -n "$commit" ]; then diff --git a/update-scripts/version-info/default.nix b/ci/version-info/default.nix similarity index 100% rename from update-scripts/version-info/default.nix rename to ci/version-info/default.nix diff --git a/update-scripts/version-info/main.nix b/ci/version-info/main.nix similarity index 100% rename from update-scripts/version-info/main.nix rename to ci/version-info/main.nix diff --git a/update-scripts/version-info/supported-versions.nix b/ci/version-info/supported-versions.nix similarity index 100% rename from update-scripts/version-info/supported-versions.nix rename to ci/version-info/supported-versions.nix diff --git a/version-info.toml b/version-info.toml index 0adb2e01..5e60d437 100644 --- a/version-info.toml +++ b/version-info.toml @@ -1,5 +1,5 @@ # DO NOT MODIFY! -# This file was generated by update-scripts/version-info/default.nix +# This file was generated by ci/version-info/default.nix nixpkgs_rev = "41da1e3ea8e23e094e5e3eeb1e6b830468a7399e" release = "25.11" unstable = true