From edbdcd42871a6394074891b7ffebeb0cfe5a3d59 Mon Sep 17 00:00:00 2001 From: Valentin Reis Date: Mon, 7 Jan 2019 17:11:32 -0600 Subject: [PATCH] [ci] Offloading CI versioning to argotest. This commits simplifies the CI setup for this repository, offloading all complexity to the "argotest" repository. --- .gitlab-ci.yml | 68 ++++++++++++++++++++++++++++++------------------ .nix/default.nix | 7 +++++ 2 files changed, 49 insertions(+), 26 deletions(-) create mode 100644 .nix/default.nix diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index e7270d2..65bdd5d 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -18,20 +18,13 @@ stages: #- /^WIP.*/ # -libnrm.build: +.nix-build: stage: build - script: - - nix-build .integration.nix -A libnrm - except: - - /^wip\/.*/ - - /^WIP\/.*/ tags: - integration -helloworld.integration.test: +.nix-integration: stage: test - script: - - nix-shell .integration.nix -A test --run "argotk.hs helloworld" artifacts: paths: - _output/cmd_err.log @@ -47,21 +40,44 @@ helloworld.integration.test: tags: - integration -perfwrapper.integration.test: - stage: test +containers.build: + extends: .nix-build script: - - nix-shell .integration.nix -A test --run "argotk.hs perfwrapper" - artifacts: - paths: - - _output/cmd_err.log - - _output/cmd_out.log - - _output/daemon_out.log - - _output/daemon_out.log - - _output/nrm.log - - _output/.argo_nodeos_config_exit_message - expire_in: 1 week - except: - - /^wip\/.*/ - - /^WIP\/.*/ - tags: - - integration + - CACHE=$(mktemp -d --suffix=nixcache /tmp/deletable-nix-cache-XXXX) + - XDG_CACHE_HOME=$CACHE nix-build .nix -A containers + - rm -rf $CACHE + +libnrm.build: + extends: .nix-build + script: + - CACHE=$(mktemp -d --suffix=nixcache /tmp/deletable-nix-cache-XXXX) + - XDG_CACHE_HOME=$CACHE nix-build .nix -A libnrm + - rm -rf $CACHE + +nrm.build: + extends: .nix-build + script: + - CACHE=$(mktemp -d --suffix=nixcache /tmp/deletable-nix-cache-XXXX) + - XDG_CACHE_HOME=$CACHE nix-build .nix -A nrm + - rm -rf $CACHE + +TestHello.test: + extends: .nix-integration + script: + - CACHE=$(mktemp -d --suffix=nixcache /tmp/deletable-nix-cache-XXXX) + - XDG_CACHE_HOME=$CACHE nix-shell .nix -A test --run "argotk.hs TestHello" + - rm -rf $CACHE + +TestListen.test: + extends: .nix-integration + script: + - CACHE=$(mktemp -d --suffix=nixcache /tmp/deletable-nix-cache-XXXX) + - XDG_CACHE_HOME=$CACHE nix-shell .nix -A test --run "argotk.hs TestListen" + - rm -rf $CACHE + +TestPerfwrapper.test: + extends: .nix-integration + script: + - CACHE=$(mktemp -d --suffix=nixcache /tmp/deletable-nix-cache-XXXX) + - XDG_CACHE_HOME=$CACHE nix-shell .nix -A test --run "argotk.hs TestPerfwrapper" + - rm -rf $CACHE diff --git a/.nix/default.nix b/.nix/default.nix new file mode 100644 index 0000000..0f0c8c9 --- /dev/null +++ b/.nix/default.nix @@ -0,0 +1,7 @@ +let argotest = + builtins.fetchTarball + "https://xgitlab.cels.anl.gov/argo/argotest/-/archive/master/argotest-master.tar.gz"; +in import "${argotest}/test.nix" { + libnrm-override = ./..; + testName = "base"; +} -- 2.26.2