forked from Fluorescence-Tools/IMP.bff
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
91 lines (85 loc) · 2.04 KB
/
.gitlab-ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
stages:
- build
- test
- deploy
.build: &build
stage: build
artifacts:
paths:
- bld-dir/
.build_posix: &build_posix
<<: *build
script:
- ./tools/build.sh
.build:lnx: &build_lnx
<<: *build_posix
before_script:
- source "/opt/conda/etc/profile.d/conda.sh"
- conda activate /opt/conda/
- git submodule foreach git pull
build:lnx_x86:
<<: *build_lnx
image:
name: condaforge/linux-anvil-cos7-x86_64
entrypoint: [ "/bin/bash", "-i", "-c" ]
tags:
- x86_64
# No PPC or ARM64 IMP builds
#build:lnx_ppc64le:
# <<: *build_lnx
# image:
# name: condaforge/linux-anvil-ppc64le
# entrypoint: [ "/bin/bash", "-i", "-c" ]
# tags:
# - ppc64le
#build:lnx_aarch64:
# <<: *build_lnx
# image:
# name: condaforge/linux-anvil-aarch64
# entrypoint: [ "/bin/bash", "-i", "-c" ]
# tags:
# - aarch64
build:osx:
<<: *build_posix
tags:
- osx
before_script:
- git submodule foreach git pull
build:windows:
<<: *build
# image: mambaforge:vs16
tags:
- win
script:
- cmd.exe
- conda activate base
- cd tools && git pull --force && cd..
- .\tools\build.bat
test:linux:
stage: test
tags:
- linux
image: condaforge/mambaforge
needs: ["build:lnx_x86"]
script:
- source activate base
- apt update && apt install -y mongodb
- conda config --add channels "file://`pwd`/bld-dir"
- mamba install python imp.bff nose numba numpy pandas
- mkdir db & nohup mongod --dbpath db &
- cd test
- nosetests
deploy:
stage: deploy
image: condaforge/mambaforge
tags:
- linux
before_script:
- git submodule update --init --recursive --remote
script:
- source activate
- mamba install anaconda-client
- if [[ "$CI_COMMIT_REF_NAME" == "master" ]]; then DEPLOY_LABEL=main; else DEPLOY_LABEL=nightly; fi
- anaconda -t ${ANACONDA_API_TOKEN} upload -l ${DEPLOY_LABEL} -u ${CONDA_USER} --force bld-dir/**/*.tar.bz2
- git switch -c ${CI_COMMIT_REF_NAME}
- git push --force https://${GITHUB_TOKEN}@github.com/fluorescence-tools/imp.bff