Add basic CI job (#2)
Reviewed-on: #2 Reviewed-by: Lars Sjöström <lars@radicore.se>
This commit is contained in:
commit
eb68bd10df
1 changed files with 33 additions and 0 deletions
33
.woodpecker/ci.yaml
Normal file
33
.woodpecker/ci.yaml
Normal file
|
@ -0,0 +1,33 @@
|
|||
when:
|
||||
- event: pull_request
|
||||
- event: push
|
||||
branch:
|
||||
- ${CI_REPO_DEFAULT_BRANCH}
|
||||
|
||||
steps:
|
||||
check:
|
||||
image: alpine
|
||||
volumes:
|
||||
- nix:/nix
|
||||
commands:
|
||||
# install nix
|
||||
- |
|
||||
test -f /nix/installer || wget -O /nix/installer https://github.com/DeterminateSystems/nix-installer/releases/download/v0.18.0/nix-installer-x86_64-linux
|
||||
chmod +x /nix/installer
|
||||
rm -f /nix/receipt.json /nix/nix-installer
|
||||
/nix/installer install linux --init=none --no-confirm
|
||||
. /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh
|
||||
|
||||
# configure nix
|
||||
- |
|
||||
mkdir -p /etc/nix
|
||||
cat <<EOF > /etc/nix/nix.conf
|
||||
sandbox = false
|
||||
experimental-features = nix-command flakes
|
||||
EOF
|
||||
|
||||
# build
|
||||
- nix build .#patos_image
|
||||
|
||||
# check
|
||||
- nix flake check
|
Loading…
Reference in a new issue