Sourcehut will not populate secrets when running CI for patches, but it would be better if CI runs and passes, even if CI can't push the artifacts.
33 lines
1 KiB
YAML
33 lines
1 KiB
YAML
image: nixos/25.05
|
|
environment:
|
|
NIX_CONFIG: "experimental-features = nix-command flakes"
|
|
secrets:
|
|
- a0a725d2-f640-4a64-b71c-021d2f3f8378
|
|
sources:
|
|
- https://git.sr.ht/~alexdavid/jail.nix
|
|
tasks:
|
|
- setup: |
|
|
sudo ln -s /etc/zoneinfo/EST /etc/localtime
|
|
nix-env -iA cachix -f https://cachix.org/api/v1/install
|
|
cachix use jailnix
|
|
cachix doctor
|
|
- build-pkgs: |
|
|
cd jail.nix
|
|
nix build --print-build-logs --out-link result-tests ./tests#all-for-ci
|
|
if [ -e ~/.config/cachix/cachix.dhall ]; then
|
|
cachix push jailnix result-tests
|
|
fi
|
|
nix build --print-build-logs --out-link result-website ./website#default
|
|
if [ -e ~/.config/cachix/cachix.dhall ]; then
|
|
cachix push jailnix result-website
|
|
fi
|
|
- run-tests: |
|
|
cd jail.nix
|
|
if [ -e ~/.config/cachix/cachix.dhall ]; then
|
|
cachix watch-exec jailnix -- result-tests/run-tests/bin/run-tests
|
|
else
|
|
result-tests/run-tests/bin/run-tests
|
|
fi
|
|
- check-fmt: |
|
|
cd jail.nix
|
|
result-tests/check-fmt/bin/check-fmt
|