[nautilus-python/wip/jtojnar/ci: 2/2] ci: Add simple build action using Nix




commit c7ce2fb8ee03be9928a59091f768c4e6188cd871
Author: Jan Tojnar <jtojnar gmail com>
Date:   Tue Sep 6 11:16:00 2022 +0200

    ci: Add simple build action using Nix
    
    It will verify that the project still builds and upload the build docs to GitLab pages.

 .gitlab-ci.yml | 14 ++++++++++++++
 default.nix    |  2 ++
 2 files changed, 16 insertions(+)
---
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
new file mode 100644
index 0000000..e9e6a4d
--- /dev/null
+++ b/.gitlab-ci.yml
@@ -0,0 +1,14 @@
+pages:
+  image: nixpkgs/nix:latest
+  script:
+    # Sandboxing would require privileged docker.
+    - mkdir -p /etc/nix
+    - echo 'sandbox = false' > /etc/nix/nix.conf
+    # Build the project including docs.
+    - nix-build -A all
+    - cp -r result-devdoc/share/gtk-doc/html/nautilus-python/ public/
+  artifacts:
+    paths:
+      - public
+  # rules:
+  #   - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
diff --git a/default.nix b/default.nix
index 709b27d..0b1718a 100644
--- a/default.nix
+++ b/default.nix
@@ -75,6 +75,8 @@ in
 makeDerivation rec {
   name = "nautilus-python";
 
+  outputs = [ "out" "devdoc" ];
+
   src =
     let
       # Do not copy to the store paths listed in .gitignore files


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