[file-roller/wip/jtojnar/nix] ci: Add a Nix build




commit f7163ff47afe4a6e005b6f6082968a1c0f0c2b9f
Author: Jan Tojnar <jtojnar gmail com>
Date:   Fri Apr 1 15:16:57 2022 +0200

    ci: Add a Nix build
    
    I am using Nix for CI rather than the usual Fedora or Ubuntu,
    since that is what I am most familiar with, and it also allows
    to reproduce the same environment locally as on CI.

 ci/gitlab-ci.yaml | 9 +++++++++
 1 file changed, 9 insertions(+)
---
diff --git a/ci/gitlab-ci.yaml b/ci/gitlab-ci.yaml
index 35d58944..b1762c43 100644
--- a/ci/gitlab-ci.yaml
+++ b/ci/gitlab-ci.yaml
@@ -1,5 +1,14 @@
 include: 'https://gitlab.gnome.org/GNOME/citemplates/raw/master/flatpak/flatpak_ci_initiative.yml'
 
+build:
+    stage: test
+    image: nixpkgs/nix:latest
+    script:
+        # Sandboxing would require privileged docker.
+        - mkdir -p /etc/nix
+        - echo 'sandbox = false' > /etc/nix/nix.conf
+        - nix-build
+
 flatpak:
     image: 'registry.gitlab.gnome.org/gnome/gnome-runtime-images/gnome:master'
     extends: '.flatpak'


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]