-
Notifications
You must be signed in to change notification settings - Fork 2
/
azure-pipelines.yml
186 lines (156 loc) · 5.62 KB
/
azure-pipelines.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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
pr:
branches:
include:
- "*"
jobs:
- job:
displayName: "Ubuntu develop"
timeoutInMinutes: 0
pool: DevOps-Ubuntu
steps:
- task: CmdLine@2
inputs:
script: "git clone --depth=1 -b factory https://github.com/Nuitka/Nuitka.git Nuitka-factory"
workingDirectory: ".."
- task: CmdLine@2
inputs:
script: |
git clone --depth=1 -b $NUITKA_BRANCH_NAME https://github.com/Nuitka/Nuitka.git Nuitka-develop
workingDirectory: ".."
env:
"NUITKA_BRANCH_NAME": "$(NUITKA_BRANCH_NAME)"
- task: Cache@2
inputs:
key: '"ubuntu-pipenv" | "$(Build.BuildNumber)"'
path: "../pipenv_cache"
restoreKeys: |
"ubuntu-pipenv"
- task: CmdLine@2
inputs:
script: |
python3.11 -m pip install -r requirements.txt
- task: CmdLine@2
inputs:
script: |
set -x
echo "On branch Nuitka-Watch branch $SOURCE_BRANCH for $NUITKA_BRANCH_NAME"
# Azure doesn't really tell what git branch it is, make this known
# in git for lookup
git branch $SOURCE_BRANCH
git status
export PIPENV_CACHE_DIR=$(pwd)/../pipenv_cache
python3.11 ../Nuitka-develop/bin/nuitka --version
if [[ "$NUITKA_BRANCH_NAME" = hotfix/* ]]
then
PR_ARG='--pr=hotfix,Azure-generated'
elif [[ "$NUITKA_BRANCH_NAME" = release/* ]]
then
PR_ARG='--pr=release,Azure-generated'
elif [[ $NUITKA_BRANCH_NAME = develop ]]
then
PR_ARG='--pr=develop,Azure-generated'
elif [[ $NUITKA_BRANCH_NAME = factory ]]
then
PR_ARG='--pr=factory,Azure-generated'
else
PR_ARG=""
fi
Xvfb :100 &
export DISPLAY=:100
python3.11 ../Nuitka-factory/bin/nuitka-watch --python-version=3.11 --no-pipenv-update --nuitka-binary=../Nuitka-develop/bin/nuitka $PR_ARG --jobs=-2
env:
"GITHUB_TOKEN": "$(NOBODY_BOT_IDENTITY)"
"SOURCE_BRANCH": "$(Build.SourceBranchName)"
"NUITKA_BRANCH_NAME": "$(NUITKA_BRANCH_NAME)"
- job:
displayName: "MacOS"
timeoutInMinutes: 0
pool:
vmImage: macos-latest
steps:
- task: InstallAppleCertificate@2
inputs:
certSecureFile: "macos_test_cert.p12"
certPwd: "test"
keychain: "temp"
- task: CmdLine@2
inputs:
script: NONINTERACTIVE=1 sudo /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/uninstall.sh)"
- task: CmdLine@2
inputs:
script: "curl -o python.pkg https://www.python.org/ftp/python/3.10.11/python-3.10.11-macos11.pkg"
workingDirectory: ".."
- task: CmdLine@2
inputs:
script: "sudo installer -pkg python.pkg -target /"
workingDirectory: ".."
- task: CmdLine@2
inputs:
script: 'sudo bash "/Applications/Python 3.10/Install Certificates.command"'
- task: CmdLine@2
inputs:
script: "git clone --depth=1 -b factory https://github.com/Nuitka/Nuitka.git Nuitka-factory"
workingDirectory: ".."
- task: CmdLine@2
inputs:
script: |
git clone --depth=1 -b $NUITKA_BRANCH_NAME https://github.com/Nuitka/Nuitka.git Nuitka-develop
workingDirectory: ".."
env:
"NUITKA_BRANCH_NAME": "$(NUITKA_BRANCH_NAME)"
- task: Cache@2
inputs:
key: '"macos-pipenv" | "$(Build.BuildNumber)"'
path: "../pipenv_cache"
restoreKeys: |
"macos-pipenv"
- task: UsePythonVersion@0
inputs:
versionSpec: "3.11"
- task: CmdLine@2
inputs:
script: "python3.11 -m pip install -r requirements.txt"
- task: CmdLine@2
inputs:
script: "PATH=/Library/Frameworks/Python.framework/Versions/3.10/bin:$PATH python3.10 -m pip install -r requirements.txt"
- task: CmdLine@2
inputs:
script: |
export PIPENV_CACHE_DIR=$(pwd)/../pipenv_cache
export PATH=/Library/Frameworks/Python.framework/Versions/3.10/bin:$PATH
python3.10 ../Nuitka-develop/bin/nuitka --version
bash nuitka-release.sh --jobs=-2
- job:
displayName: "Windows"
timeoutInMinutes: 0
pool: DevOps-Windows
steps:
- task: CmdLine@2
inputs:
script: |
git clone --depth=1 -b factory https://github.com/Nuitka/Nuitka.git Nuitka-factory
workingDirectory: ".."
- task: CmdLine@2
inputs:
script: |
git clone --depth=1 -b %NUITKA_BRANCH_NAME% https://github.com/Nuitka/Nuitka.git Nuitka-develop
workingDirectory: ".."
env:
"NUITKA_BRANCH_NAME": "$(NUITKA_BRANCH_NAME)"
- task: Cache@2
inputs:
key: '"windows-pipenv" | "$(Build.BuildNumber)"'
path: "../pipenv_cache"
restoreKeys: |
"windows-pipenv"
- task: CmdLine@2
inputs:
script: "python -m pip install -r requirements.txt"
- task: CmdLine@2
inputs:
script: |
@echo on
set PIPENV_CACHE_DIR=%CD%\..\pipenv_cache
if not exist "%PIPENV_CACHE_DIR%" mkdir %PIPENV_CACHE_DIR%
python ../Nuitka-develop/bin/nuitka --version
python ../Nuitka-factory/bin/nuitka-watch --python-version=3.11 --no-pipenv-update --nuitka-binary=..\Nuitka-develop\bin\nuitka --jobs=-2