mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-20 16:15:43 +02:00
ci: rename update-scripts
→ ci
This changes how we think about this directory; it does not need to be exclusively for scripts related to updates, but should be a place for any scripts intended to be run by CI workflows. This mindset should make it easier to develop and test the business logic of workflows, without always needing to test "in production" on the nixvim repo or a fork.
This commit is contained in:
parent
7388c85c54
commit
2b2b1e6d8f
18 changed files with 13 additions and 12 deletions
4
.github/workflows/update.yml
vendored
4
.github/workflows/update.yml
vendored
|
@ -132,7 +132,7 @@ jobs:
|
||||||
id: update_flake_lock
|
id: update_flake_lock
|
||||||
if: inputs.update_lock || github.event_name == 'schedule'
|
if: inputs.update_lock || github.event_name == 'schedule'
|
||||||
run: |
|
run: |
|
||||||
nix-build ./update-scripts -A update
|
nix-build ./ci -A update
|
||||||
./result/bin/update --commit --github-output
|
./result/bin/update --commit --github-output
|
||||||
|
|
||||||
- name: Update generated files
|
- name: Update generated files
|
||||||
|
@ -140,7 +140,7 @@ jobs:
|
||||||
if: inputs.generate || github.event_name == 'schedule'
|
if: inputs.generate || github.event_name == 'schedule'
|
||||||
run: |
|
run: |
|
||||||
old=$(git show --no-patch --format=%h)
|
old=$(git show --no-patch --format=%h)
|
||||||
nix-build ./update-scripts -A generate
|
nix-build ./ci -A generate
|
||||||
./result/bin/generate --commit
|
./result/bin/generate --commit
|
||||||
new=$(git show --no-patch --format=%h)
|
new=$(git show --no-patch --format=%h)
|
||||||
if [ "$old" != "$new" ]; then
|
if [ "$old" != "$new" ]; then
|
||||||
|
|
|
@ -1,9 +1,7 @@
|
||||||
# Update scripts
|
# CI scripts
|
||||||
|
|
||||||
This directory contains update scripts that are not part of the actual flake.
|
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.
|
||||||
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`.
|
|
||||||
|
|
||||||
## Developing
|
## 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.
|
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.
|
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
|
## 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 built using the flake must follow the flake's `nixConfig`
|
||||||
- Packages included in the flake's output are checked by `nix flake check`
|
- 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`.
|
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.
|
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
|
[IFD]: https://nixos.org/manual/nix/stable/language/import-from-derivation
|
|
@ -66,7 +66,7 @@ writeShellApplication {
|
||||||
)
|
)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
nix-build ./update-scripts -A version-info
|
nix-build ./ci -A version-info
|
||||||
./result/bin/version-info
|
./result/bin/version-info
|
||||||
|
|
||||||
if [ -n "$commit" ]; then
|
if [ -n "$commit" ]; then
|
|
@ -1,5 +1,5 @@
|
||||||
# DO NOT MODIFY!
|
# 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"
|
nixpkgs_rev = "41da1e3ea8e23e094e5e3eeb1e6b830468a7399e"
|
||||||
release = "25.11"
|
release = "25.11"
|
||||||
unstable = true
|
unstable = true
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue