diff options
author | Théo Zimmermann <theo.zimmermann@univ-paris-diderot.fr> | 2018-07-01 18:42:50 +0200 |
---|---|---|
committer | Théo Zimmermann <theo.zimmermann@univ-paris-diderot.fr> | 2018-07-03 15:04:37 +0200 |
commit | 89d8674c6ac2c826f157ff0a007cc5eecda9b313 (patch) | |
tree | b209c5231590201991616f2e0df0f0571e32bf9f | |
parent | fcbb16841aa036d029a7336bca9afcda9081bdee (diff) |
Add a test build of Nix package to GitLab CI.
We pin default.nix again to make the CI build predictable.
As in Windows builds, we need to override the default before_script.
As in other test-suite jobs, we export logs as artifacts on failure.
-rw-r--r-- | .gitlab-ci.yml | 16 | ||||
-rw-r--r-- | default.nix | 6 |
2 files changed, 21 insertions, 1 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 8469d6119..f54171412 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -233,6 +233,22 @@ windows32: variables: ARCH: "32" +pkg:nix: + image: nixorg/nix:latest # Minimal NixOS image which doesn't even contain git + stage: test + variables: + GIT_STRATEGY: none + dependencies: [] # We don't need to download build artifacts + before_script: [] # We don't want to use the shared 'before_script' + script: + - export TMPDIR=$PWD + - nix-build "$CI_PROJECT_URL/-/archive/$CI_COMMIT_SHA.tar.gz" -K + artifacts: + name: "$CI_JOB_NAME.logs" + when: on_failure + paths: + - nix-build-coq.drv-0/*/test-suite/logs + warnings:base: <<: *warnings-template diff --git a/default.nix b/default.nix index e4834ae3a..d5e7674d4 100644 --- a/default.nix +++ b/default.nix @@ -21,7 +21,11 @@ # Once the build is finished, you will find, in the current directory, # a symlink to where Coq was installed. -{ pkgs ? (import <nixpkgs> {}) +{ pkgs ? + (import (fetchTarball { + url = "https://github.com/NixOS/nixpkgs/archive/060a98e9f4ad879492e48d63e887b0b6db26299e.tar.gz"; + sha256 = "1lzvp3md0hf6kp2bvc6dbzh40navlyd51qlns9wbkz6lqk3lgf6j"; + }) {}) , ocamlPackages ? pkgs.ocaml-ng.ocamlPackages_4_06 , buildIde ? true , buildDoc ? true |