-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
64 lines (59 loc) · 1.51 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
stages:
- build
- release
- deploy
variables:
PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip"
BUILDKIT_PROGRESS: "plain"
CPU_TARGET: ivybridge
OGSCM_ARGUMENTS:
value: "compiler.py ogs.py --ogs ogs/ogs@master --cmake_args ' -DOGS_CPU_ARCHITECTURE=OFF -DBUILD_TESTING=OFF'"
description: "Arguments to ogscm. -B -C -R --ccache are always passed automatically. For more args see README.md!"
dev images:
tags: ['envinf2-shell']
stage: build
rules:
- if: $CI_COMMIT_TAG
when: never
- if: $CI_PIPELINE_SOURCE == "web"
when: never
- if: $CI_COMMIT_BRANCH == "main"
script:
- black --check ogscm
- poetry install
- poetry run ogscm compiler.py ogs.py -B --ogs off --cpu-target $CPU_TARGET
release:
stage: release
image: registry.gitlab.com/gitlab-org/release-cli:latest
rules:
- if: $CI_COMMIT_TAG
script:
- echo 'Running release job.'
release:
tag_name: '$CI_COMMIT_TAG'
description: 'Created using the GitLab release-cli.'
publish:
tags: ['shell']
stage: deploy
rules:
- if: $CI_COMMIT_TAG
script:
- poetry install
- poetry build
- poetry publish -u $PYPI_USERNAME -p $PYPI_PASSWORD
manual build:
tags: ['envinf2-shell']
stage: build
rules:
- if: $CI_PIPELINE_SOURCE != "web"
when: never
- if: $CI_COMMIT_BRANCH
script:
- poetry install
- eval poetry run ogscm -B -C -R --ccache --cpu-target $CPU_TARGET $OGSCM_ARGUMENTS
artifacts:
paths:
- _out/images/*.sif
cache:
paths:
- .venv