Skip to content

Commit ae3d608

Browse files
authored
chore: Setup of Azure CI (#9)
1 parent af1b187 commit ae3d608

File tree

6 files changed

+163
-2
lines changed

6 files changed

+163
-2
lines changed

ci/cibuildwheel.yaml

Lines changed: 121 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,121 @@
1+
trigger: none
2+
3+
stages:
4+
- stage: cibuildwheel
5+
condition: eq(variables['System.PullRequest.IsFork'], 'false')
6+
jobs:
7+
- job: start_linux_arm64_agent_aws
8+
pool:
9+
vmImage: "ubuntu-latest"
10+
steps:
11+
- checkout: none
12+
- bash: |
13+
echo "buildno: $(Build.BuildId)"
14+
echo ${AZURE_DEVOPS_CLI_PAT} | az devops login
15+
env:
16+
AZURE_DEVOPS_CLI_PAT: $(System.AccessToken)
17+
displayName: "Login Azure DevOps Extension"
18+
- bash:
19+
az devops configure --defaults
20+
organization=$(System.TeamFoundationCollectionUri)
21+
project=$(System.TeamProject) --use-git-aliases true
22+
displayName: "Set default Azure DevOps organization and project"
23+
- task: LambdaInvokeFunction@1
24+
displayName: "Start Agent 1"
25+
name: "Start_Agent1"
26+
inputs:
27+
awsCredentials: "ondemand-dev"
28+
regionName: "eu-west-1"
29+
functionName: "ondemand-pipeline"
30+
payload: |
31+
{
32+
"pool": "arm64",
33+
"buildid": "$(Build.BuildId)"
34+
}
35+
outputVariable: "functionResult"
36+
- bash: |
37+
echo "Instance: $(functionResult)"
38+
name: "Display_Instance"
39+
displayName: "Display Instance"
40+
- bash: |
41+
echo "Starting agent... for pool arm64"
42+
POOLID=$(az pipelines pool list | jq '.[]| select(.name == "arm64") | .id' -r)
43+
while [ "$(az pipelines agent list --pool-id $POOLID | jq '.[]| select(.name == "arm64-$(Build.BuildId)") | .enabled' -r)" != "true" ]
44+
do
45+
echo "Still waiting for agent arm64-$(Build.BuildId) ... "
46+
sleep 3
47+
done
48+
echo "Agent found ..."
49+
name: "Check_agent"
50+
displayName: "Check agent"
51+
timeoutInMinutes: 20
52+
- job: linux_arm64
53+
pool:
54+
name: "arm64"
55+
vmImage:
56+
demands:
57+
- Agent.Name -equals arm64-$(Build.BuildId)
58+
dependsOn:
59+
- start_linux_arm64_agent_aws
60+
timeoutInMinutes: 60
61+
condition: eq(variables['System.PullRequest.IsFork'], 'false')
62+
steps:
63+
- checkout: self
64+
fetchDepth: 1
65+
lfs: false
66+
submodules: true
67+
# - task: UsePythonVersion@0
68+
- bash: |
69+
set -o errexit
70+
python3 -m pip install --upgrade pip
71+
pip3 install cibuildwheel==2.8.1
72+
displayName: Install dependencies
73+
- bash: cibuildwheel --output-dir wheelhouse .
74+
displayName: Build wheels
75+
- task: PublishBuildArtifacts@1
76+
inputs: {pathtoPublish: 'wheelhouse'}
77+
78+
- job: linux_x64
79+
pool: {vmImage: 'ubuntu-latest'}
80+
timeoutInMinutes: 60
81+
steps:
82+
- task: UsePythonVersion@0
83+
- bash: |
84+
set -o errexit
85+
python3 -m pip install --upgrade pip
86+
pip3 install cibuildwheel==2.8.1
87+
displayName: Install dependencies
88+
- bash: cibuildwheel --output-dir wheelhouse .
89+
displayName: Build wheels
90+
- task: PublishBuildArtifacts@1
91+
inputs: {pathtoPublish: 'wheelhouse'}
92+
93+
- job: macos_x64
94+
pool: {vmImage: 'macOS-11'}
95+
timeoutInMinutes: 60
96+
steps:
97+
- task: UsePythonVersion@0
98+
- bash: |
99+
set -o errexit
100+
python3 -m pip install --upgrade pip
101+
python3 -m pip install cibuildwheel==2.8.1
102+
displayName: Install dependencies
103+
- bash: cibuildwheel --output-dir wheelhouse .
104+
displayName: Build wheels
105+
- task: PublishBuildArtifacts@1
106+
inputs: {pathtoPublish: wheelhouse}
107+
108+
- job: windows_x64
109+
pool: {vmImage: 'windows-2019'}
110+
timeoutInMinutes: 60
111+
steps:
112+
- task: UsePythonVersion@0
113+
- bash: |
114+
set -o errexit
115+
python -m pip install --upgrade pip
116+
pip install cibuildwheel==2.8.1
117+
displayName: Install dependencies
118+
- bash: cibuildwheel --output-dir wheelhouse .
119+
displayName: Build wheels
120+
- task: PublishBuildArtifacts@1
121+
inputs: {pathtoPublish: 'wheelhouse'}

ci/run_tests_pipeline.yaml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
trigger: none
2+
3+
stages:
4+
- stage: BuildAndTest
5+
displayName: "Building and testing"
6+
jobs:
7+
- job: RunOn
8+
displayName: "on"
9+
strategy:
10+
matrix:
11+
linux:
12+
imageName: "ubuntu-latest"
13+
poolName: "Azure Pipelines"
14+
mac:
15+
imageName: "macos-latest"
16+
poolName: "Azure Pipelines"
17+
windows-msvc-2019:
18+
imageName: "windows-2019"
19+
poolName: "Azure Pipelines"
20+
pool:
21+
name: $(poolName)
22+
vmImage: $(imageName)
23+
timeoutInMinutes: 45
24+
steps:
25+
- checkout: self
26+
fetchDepth: 1
27+
lfs: false
28+
submodules: true
29+
- task: UsePythonVersion@0
30+
- script: python3 --version
31+
- script: python3 -m pip install cython
32+
displayName: Installing Python dependencies
33+
- script: python3 proj.py build
34+
displayName: "Build"
35+
- script: python3 proj.py test 1
36+
displayName: "Test"
37+
env:
38+
JAVA_HOME: $(JAVA_HOME_11_X64)

proj.bat

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
@echo off
2+
python3 proj.py %*

test/system_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
import questdb.ingress as qi
1616

1717

18-
QUESTDB_VERSION = '6.4.2'
18+
QUESTDB_VERSION = '6.5'
1919
QUESTDB_PLAIN_INSTALL_PATH = None
2020
QUESTDB_AUTH_INSTALL_PATH = None
2121

test/test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,7 @@ def test_auto_flush_on_closed_socket(self):
298298
server.accept()
299299
server.close()
300300
exp_err = 'Could not flush buffer'
301-
with self.assertRaisesRegexp(qi.IngressError, exp_err):
301+
with self.assertRaisesRegex(qi.IngressError, exp_err):
302302
for _ in range(1000):
303303
time.sleep(0.01)
304304
sender.row('tbl1', symbols={'a': 'b'})

0 commit comments

Comments
 (0)