Debian Codegraph @

.appveyor.yml

raw symbols SCIP
1 hosts:
2 bonsai.test: 127.0.0.1
3
4 image: Visual Studio 2019
5
6 environment:
7 global:
8 # SDK v7.0 MSVC Express 2008's SetEnv.cmd script will fail if the
9 # /E:ON and /V:ON options are not enabled in the batch script interpreter
10 # See: http://stackoverflow.com/a/13751649/163740
11 CMD_IN_ENV: "cmd /E:ON /V:ON /C .\\.appveyor\\run_with_env.cmd"
12
13 matrix:
14 - PYTHON: "C:\\Python39"
15 PYTHON_VERSION: "3.9.x"
16 PYTHON_ARCH: "32"
17
18 - PYTHON: "C:\\Python39-x64"
19 PYTHON_VERSION: "3.9.x"
20 PYTHON_ARCH: "64"
21
22 - PYTHON: "C:\\Python310"
23 PYTHON_VERSION: "3.10.x"
24 PYTHON_ARCH: "32"
25
26 - PYTHON: "C:\\Python310-x64"
27 PYTHON_VERSION: "3.10.x"
28 PYTHON_ARCH: "64"
29
30 - PYTHON: "C:\\Python311"
31 PYTHON_VERSION: "3.11.x"
32 PYTHON_ARCH: "32"
33
34 - PYTHON: "C:\\Python311-x64"
35 PYTHON_VERSION: "3.11.x"
36 PYTHON_ARCH: "64"
37
38 - PYTHON: "C:\\Python312"
39 PYTHON_VERSION: "3.12.x"
40 PYTHON_ARCH: "32"
41
42 - PYTHON: "C:\\Python312-x64"
43 PYTHON_VERSION: "3.12.x"
44 PYTHON_ARCH: "64"
45
46 install:
47 # If there is a newer build queued for the same PR, cancel this one.
48 # The AppVeyor 'rollout builds' option is supposed to serve the same
49 # purpose but it is problematic because it tends to cancel builds pushed
50 # directly to master instead of just PR builds (or the converse).
51 # credits: JuliaLang developers.
52 - ps: if ($env:APPVEYOR_PULL_REQUEST_NUMBER -and $env:APPVEYOR_BUILD_NUMBER -ne ((Invoke-RestMethod `
53 https://ci.appveyor.com/api/projects/$env:APPVEYOR_ACCOUNT_NAME/$env:APPVEYOR_PROJECT_SLUG/history?recordsNumber=50).builds | `
54 Where-Object pullRequestId -eq $env:APPVEYOR_PULL_REQUEST_NUMBER)[0].buildNumber) { `
55 throw "There are newer queued builds for this pull request, failing early." }
56 # Install Active Directory and reboot the machine.
57 - ps: .\\.appveyor\\InstallAD.ps1
58 - ps: Start-Sleep -s 5
59 - ps: Write-Output 'Finished installing Active Directory.'
60 - ps: .\\.appveyor\\ConfigAD.ps1
61 - "ldifde -i -v -f .\\tests\\testenv\\ldifs\\users.ldif"
62
63 # Prepend newly installed Python to the PATH of this build (this cannot be
64 # done from inside the powershell script as it would require to restart
65 # the parent CMD process).
66 - "SET PATH=%PYTHON%;%PYTHON%\\Scripts;%PATH%"
67
68 # Check that we have the expected version and architecture for Python
69 - "python --version"
70 - "python -c \"import struct; print(struct.calcsize('P') * 8)\""
71
72 # Upgrade to the latest version of pip to avoid it displaying warnings
73 # about it being out of date.
74 - "%PYTHON%\\python.exe -m pip install --disable-pip-version-check --user --upgrade pip"
75 - "%PYTHON%\\python.exe -m pip install poetry wheel build"
76 - "%PYTHON%\\python.exe -m poetry config virtualenvs.create false"
77 - "%PYTHON%\\python.exe -m poetry install --no-root -E gevent -E tornado -E trio"
78 - "%PYTHON%\\python.exe -m pip list"
79
80 build_script:
81 # Build the compiled extension
82 - "%CMD_IN_ENV% python -m pip install -vvv --user ."
83
84 before_test:
85 - ps: "Start-Process python -ArgumentList .\\.ci\\delay.py -Verb runas"
86 # Change hostname to the computer's FQDN.
87 - ps: "(Get-Content .\\tests\\test.ini).replace('hostname = bonsai.test', 'hostname = appveyor-vm.bonsai.test') | Set-Content '.\\tests\\test.ini'"
88
89 test_script:
90 # Set install path for coverage.py.
91 - for /f "tokens=*" %%i in ('python -c "import bonsai; print(bonsai.__file__[:-12])"') do set INSTALL_PATH="%%i"
92 # Run the tests.
93 - "%CMD_IN_ENV% python -m pytest -v --junitxml=.\\test-results.xml --cov-config .coveragerc --cov-report="
94
95 after_test:
96 # Change path of the Python source files in .coverage.
97 - ps: $install_path = python -c "import bonsai; print(bonsai.__file__[:-12].replace('\\', '\\\\\\\\'))"; `
98 $project_path = $env:APPVEYOR_BUILD_FOLDER.Replace('\', '\\') + "\\src\\bonsai"; `
99 (Get-Content .\\.coverage) -replace $install_path, $project_path | Set-Content '.\\.coverage'
100 - codecov
101 # Upload test results.
102 - ps: $wc = New-Object 'System.Net.WebClient'; `
103 $wc.UploadFile("https://ci.appveyor.com/api/testresults/junit/$($env:APPVEYOR_JOB_ID)", (Resolve-Path .\\test-results.xml))
104 # If tests are successful, create binary packages for the project.
105 - "%CMD_IN_ENV% python -m build -w"
106 - ps: "ls dist"
107
108 artifacts:
109 # Archive the generated packages in the ci.appveyor.com build report.
110 - path: dist\*
111
112 # For debugging
113 #on_failure:
114 # - ps: $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))
115 #