Commit 81d15e47 authored by Valentin Reis's avatar Valentin Reis
Browse files

Merge branch 'continuous-integration' into 'master'

Continuous integration

See merge request !1
parents 061ce89c 551153dd
Pipeline #5390 passed with stages
in 1 minute and 17 seconds
variables:
ARGOPKGS : "./default.nix"
EXTRA : ""
stages:
- build
- test
- quality
nodelevel.test:
stage: test
script:
- cd pkgs
- nix-build -A nodelevel
except:
- /^wip\/.*/
- /^WIP\/.*/
tags:
- integration
include:
- /gitlab-ci/argonix.yml
- /gitlab-ci/components.yml
- /gitlab-ci/integration.yml
- /gitlab-ci/repoquality.yml
Swann Perarnau
Valentin Reis
Copyright (c) 2018 Valentin Reis
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
# argopkgs
Nix-packages for Argo.
this repo has two things:
- `pkgs`: Nix packages for argo components, target applications, and related tools.
- the only set of minimal useful nix expressions argo ever should need
- `deployments`, `modules`: NixOps server deployment related utilities for Argo CI.
There are a bunch of Hydra-related configurations, as well as some gitlab-runner configs.
- some gitlab files, wich are imported in turn by other repositories
that run integration tests
There are also a bunch of Hydra-related files that can be used to deploy an instance.
both these things are maintained
#### Integration tests:
see the `gitlab-ci.yml` file. The integration tests for this repo just make sure that
the nix expressions are basically able to build nrm, containers, libnrm anad libnrm-pmpi.
##### structure
#### Building and installing a specific packaged Argo component:
```
nix-env -iA argo.<packagename>
```
- `pkgs`: nix packages for argo components, applications, internal tools.
- `lib`: some supporting nix expressions
- `deployments`, `modules`: nixops CI server deployment related code.
- `.gitlab-ci.yml`: CI file.
#ARGUMENTS:
#The authoritative packaging source
#ARGOPKGS
#This updates argonix before each step if necessary. The trick with
#XDG_CACHE_HOME is there to make sure that no state is propagated through
#caching, making this file as much of a "pure" function as we can. the
#`argonix` binary does this too when wrapping nix utilities.
before_script:
- CACHE=$(mktemp -d --suffix=nixcache /tmp/deletable-nix-cache-XXXX)
- XDG_CACHE_HOME=$CACHE nix-env -f $ARGOPKGS -iA argonix
- rm -rf $CACHE
#ARGUMENTS:
#The authoritative packaging source
#ARGOPKGS
#Extra argonix arguments
#EXTRA
.build:
stage: build
tags:
- integration
nrm.build:
extends: .build
script:
- "argonix build nrm --argopkgs $ARGOPKGS $EXTRA --verbose"
libnrm.build:
extends: .build
script:
- "argonix build libnrm --argopkgs $ARGOPKGS $EXTRA --verbose"
containers.build:
extends: .build
script:
- "argonix build containers --argopkgs $ARGOPKGS $EXTRA --verbose"
argotk.build:
extends: .build
script:
- "argonix build argotk --argopkgs $ARGOPKGS $EXTRA --verbose"
tags:
- knl
#ARGUMENTS:
#The authoritative packaging source
#ARGOPKGS
#Extra argonix arguments
#EXTRA
.test:
stage: test
tags:
- integration
testHello.test:
extends: .test
script:
- "argonix build testHello --argopkgs $ARGOPKGS $EXTRA --verbose"
testListen.test:
extends: .test
script:
- "argonix build testListen --argopkgs $ARGOPKGS $EXTRA --verbose"
testPerfwrapper.test:
extends: .test
script:
- "argonix build testPerfwrapper --argopkgs $ARGOPKGS $EXTRA --verbose"
testPower.test:
extends: .test
script:
- "argonix build testPower --argopkgs $ARGOPKGS $EXTRA --verbose"
tags:
- knl
#Importing this file adds repository quality check.
#
repoquality:
stage: quality
script:
- nix run -f "$ARGOPKGS" repoquality --command repoquality
tags:
- integration
rec {
filter = path:
builtins.filterSource (path: _:
(baseNameOf path != ".hdevtools.sock") &&
(baseNameOf path != ".ghc.environment.x86_64-linux-8.4.4") &&
(baseNameOf path != "_output") &&
(baseNameOf path != "result") &&
(baseNameOf path != "README") &&
(baseNameOf path != ".README") &&
(baseNameOf path != "dist")) path;
devInputs = p: with p; [
git
htop
];
devHPackages = p: with p; [
cabal-install
apply-refact
hdevtools
hindent
hlint
shake
brittany
ghcid
];
getHackEnv = pkgs: super: package : super.shellFor {
packages = p: [package];
withHoogle = true;
buildInputs = devInputs pkgs ++ devHPackages super;
};
cabalDevLoader = self: path: set:
(self.callCabal2nix (baseNameOf path) (filter path) set);
}
{
"url": "https://github.com/nixos/nixpkgs-channels.git",
"rev": "d6c6c7fcec6dbd2b8ab14f0b35d56c7733872baa",
"date": "2018-07-20T16:40:00+02:00",
"sha256": "1bq59575b58lmh5w8bh7pwp17c3p2nm651bz1i3q224c4zsj9294",
"fetchSubmodules": true
"rev": "refs/heads/nixos-18.03",
type: "fetchgit"
}
{
"fetch": {
"args": {
"fetchSubmodules": false,
"rev": "182582ddd924a0e06d906952e4632c25324a1120",
"sha256": "16166g7ndlhvy96wg3rr5cf9h7f8lxdpi2xyyrrsls701wiizd09",
"url": "https://xgitlab.cels.anl.gov/argo/applications/amg.git"
},
"fn": "fetchgit"
},
"rev": "refs/heads/progress-nrm",
"type": "fetchgit",
"url": "https://xgitlab.cels.anl.gov/argo/applications/amg.git"
}
\ No newline at end of file
{
"url": "https://xgitlab.cels.anl.gov/argo/aml.git",
"rev": "c759c9dfad2b527fe33d1595eba1b66ee425ce88",
"date": "2018-08-27T10:57:55-05:00",
"sha256": "1l51c69mr4bs4p4k03bv2b04cn3dvgc4gls80qfhprifdnpd2dh3",
"fetchSubmodules": true
}
{ stdenv, src, autoreconfHook, fetchgit, pkgconfig, mpich2 }:
stdenv.mkDerivation {
inherit src;
name = "libnrm";
name = "aml";
nativeBuildInputs = [ autoreconfHook pkgconfig ];
buildInputs = [ ];
}
{
"fetch": {
"args": {
"fetchSubmodules": false,
"rev": "c759c9dfad2b527fe33d1595eba1b66ee425ce88",
"sha256": "1l51c69mr4bs4p4k03bv2b04cn3dvgc4gls80qfhprifdnpd2dh3",
"url": "https://xgitlab.cels.anl.gov/argo/aml.git"
},
"fn": "fetchgit"
},
"rev": "refs/heads/master",
"type": "fetchgit",
"url": "https://xgitlab.cels.anl.gov/argo/aml.git"
}
\ No newline at end of file
#!/usr/bin/env bash
nix-prefetch-git https://xgitlab.cels.anl.gov/argo/aml.git refs/heads/master > default.json
{
"url": "https://xgitlab.cels.anl.gov/argo/applications/amg.git",
"rev": "09fe8a78baf6ba5eaef7d2804f7b653885d60fee",
"date": "2018-02-07T02:03:46-08:00",
"sha256": "1iqdbkg4dm36qskbyfi30w6rw70g2r6mi0qhzavc21338bf4j9hy",
"fetchSubmodules": false
}
{
"url": "https://xgitlab.cels.anl.gov/argo/applications/amg.git",
"rev": "182582ddd924a0e06d906952e4632c25324a1120",
"date": "2019-02-11T15:51:19-06:00",
"sha256": "16166g7ndlhvy96wg3rr5cf9h7f8lxdpi2xyyrrsls701wiizd09",
"fetchSubmodules": false
}
#!/usr/bin/env bash
nix-prefetch-git https://xgitlab.cels.anl.gov/argo/applications/amg.git refs/heads/master > default.json
nix-prefetch-git https://xgitlab.cels.anl.gov/argo/applications/amg.git refs/heads/progress-nrm > nrm.json
{
"url": "https://xgitlab.cels.anl.gov/argo/applications/lammps.git",
"rev": "b47e49223377d4ff6779e712bae54bbddc3596cf",
"date": "2018-08-22T08:45:41-06:00",
"sha256": "1dlifm9wm1jcw2zwal3fnzzl41ng08c7v48w6hx2mz84zljg1nsj",
"fetchSubmodules": false
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment