-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
executable file
·92 lines (81 loc) · 2.5 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
92
###### Currently not in use!!
stages:
- test
- build
- publish
variables:
GIT_SUBMODULE_STRATEGY: recursive
TWINE_USERNAME: $TWINE_USERNAME
TWINE_PASSWORD: $TWINE_PASSWORD
PYPI_TOKEN: $PYPI_TOKEN
VERSION: $CI_COMMIT_TAG
PYPI_REPO_TAG: pypi
.poetry_before_script: &poetry_before_script
before_script:
- python3.8 --version # For debugging
- python3.9 --version # For debugging
- python3.10 --version # For debugging
- ls -l # For debugging
- |
VERSION=$(echo $(curl --insecure -Ss --request GET --header "PRIVATE-TOKEN: $GITLAB_ACCESS_TOKEN" "https://gitlab.blubblub.tech/api/v4/projects/$CI_PROJECT_ID/repository/tags" | grep -Po '("[0-9]\.[0-9].[0-9]?")' | sed "s/\"//g" | sed 's/\n.*//') | sed 's/ .*//')
- python3.8 -m pip install --upgrade pip
- python3.9 -m pip install --upgrade pip
- python3.10 -m pip install --upgrade pip
- python3.8 -m pip install virtualenv
- python3.9 -m pip install virtualenv
- python3.10 -m pip install virtualenv
- python3.8 -m venv ./venv38
- python3.9 -m venv ./venv39
- python3.10 -m venv ./venv310
- source venv38/bin/activate
- pip install poetry
- pip install ninja
- pip install pytest
- pip install nox-poetry
- poetry config pypi-token.pypi $PYPI_TOKEN
- make dist
#build_windows:
# stage: build
# image: mcr.microsoft.com/windows/servercore:ltsc2016-amd64
# when: manual
# script:
# - ldd --version ldd
# - ls -l
# - python3 --version # For debugging
# - python3.10 --version
# - python3.9 --version
# - python3.8
test_manylinux1_x86_64:
<<: *poetry_before_script
image: quay.io/pypa/manylinux2014_x86_64:latest
#when: manual
stage: test
script:
- make test-all
build_manylinux1_x86_64:
<<: *poetry_before_script
image: quay.io/pypa/manylinux2014_x86_64:latest
#when: manual
stage: build
script:
- make dist
needs:
- job: test_manylinux1_x86_64
artifacts:
paths:
- dist/*.whl
- dist/*.tar.gz
publish_manylinux1_x86_64:
<<: *poetry_before_script
image: quay.io/pypa/manylinux2014_x86_64:latest
# when: manual
stage: publish
only:
- main
- tags
script:
- make release
needs:
- job: test_manylinux1_x86_64
- job: build_manylinux1_x86_64
artifacts: true