Skip to content

Commit a862604

Browse files
authored
Merge pull request #4834 from Repiteo/github-actions-runner
Modernize GitHub Actions test runner
2 parents f71c14f + 090444b commit a862604

15 files changed

Lines changed: 147 additions & 374 deletions

.appveyor.yml

Lines changed: 6 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,9 @@
55
# This is slow, try to keep the number of builds as low as makes sense.
66

77
image:
8-
# linux builds done in Travis CI for now
8+
# Test images unsupported by GitHub Actions.
99
- Visual Studio 2017
1010
- Visual Studio 2019
11-
- Visual Studio 2022
1211

1312
cache:
1413
- downloads -> appveyor.yml
@@ -19,8 +18,8 @@ cache:
1918
install:
2019
# direct choco install supposed to work, but not? still doing in install.bat
2120
#- cinst: dmd ldc swig vswhere ixsltproc winflexbison3
22-
- cmd: .\.appveyor\install.bat
23-
- cmd: if %COVERAGE% equ 1 .\.appveyor\install-cov.bat
21+
- ps: .\.appveyor\install.ps1
22+
- ps: if ($env:COVERAGE -eq 1) { .\.appveyor\install-cov.ps1 }
2423

2524
# Build matrix will be number of images multiplied by #entries in matrix:,
2625
# less any excludes.
@@ -34,38 +33,9 @@ environment:
3433
COVERAGE: 0
3534
SCONS_CACHE_MSVC_CONFIG: "true"
3635
matrix:
37-
# Test oldest and newest supported Pythons, and a subset in between.
38-
# Skipping 3.8, 3.10, 3.12 at this time
39-
- WINPYTHON: "Python313"
40-
- WINPYTHON: "Python311"
41-
- WINPYTHON: "Python39"
42-
- WINPYTHON: "Python37"
43-
44-
# remove sets of build jobs based on criteria below
45-
# to fine tune the number and platforms tested
46-
matrix:
47-
exclude:
48-
# test python 3.7 on Visual Studio 2017 image
49-
- image: Visual Studio 2017
50-
WINPYTHON: "Python313"
51-
- image: Visual Studio 2017
52-
WINPYTHON: "Python311"
53-
- image: Visual Studio 2017
54-
WINPYTHON: "Python39"
55-
56-
# test python 3.9 on Visual Studio 2019 image
57-
- image: Visual Studio 2019
58-
WINPYTHON: "Python313"
59-
- image: Visual Studio 2019
60-
WINPYTHON: "Python311"
61-
- image: Visual Studio 2019
62-
WINPYTHON: "Python37"
63-
64-
# test python 3.11, 3.13 on Visual Studio 2022 image
65-
- image: Visual Studio 2022
66-
WINPYTHON: "Python39"
67-
- image: Visual Studio 2022
68-
WINPYTHON: "Python37"
36+
# Test oldest and newest supported Pythons.
37+
- WINPYTHON: "Python310"
38+
- WINPYTHON: "Python312"
6939

7040
# Remove some binaries we don't want to be found
7141
# Note this is no longer needed, git-windows bin/ is quite minimal now.

.appveyor/install-cov.bat

Lines changed: 0 additions & 2 deletions
This file was deleted.

.appveyor/install-cov.ps1

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
$pythonExe = "C:\$($env:WINPYTHON)\python.exe"
2+
$env:PYSITEDIR = & $pythonExe -c "import sys; print(sys.path[-1])"
3+
& $pythonExe -m pip install -U --progress-bar off coverage codecov

.appveyor/install.bat

Lines changed: 0 additions & 13 deletions
This file was deleted.

.appveyor/install.ps1

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
$pythonExe = "C:\$($env:WINPYTHON)\python.exe"
2+
3+
# If the initial call to python --version fails, call "choco install %WINPYTHON%"
4+
$pyVersionSucceeded = $false
5+
try {
6+
if (Test-Path $pythonExe) {
7+
& $pythonExe --version
8+
if ($LASTEXITCODE -eq 0) {
9+
$pyVersionSucceeded = $true
10+
}
11+
}
12+
} catch {
13+
$pyVersionSucceeded = $false
14+
}
15+
16+
if (-not $pyVersionSucceeded) {
17+
Write-Host "Python version check failed or Python not found at $pythonExe. Installing $env:WINPYTHON via Chocolatey..."
18+
choco install --allow-empty-checksums $env:WINPYTHON
19+
}
20+
21+
# Set PYSITEDIR
22+
$env:PYSITEDIR = & $pythonExe -c "import sys; print(sys.path[-1])"
23+
24+
# Use mingw 32 bit until #3291 is resolved
25+
# Add python and python user-base to path for pip installs
26+
$extraPaths = @(
27+
"C:\$($env:WINPYTHON)",
28+
"C:\$($env:WINPYTHON)\Scripts",
29+
"C:\ProgramData\chocolatey\bin",
30+
"C:\MinGW\bin",
31+
"C:\MinGW\msys\1.0\bin",
32+
"C:\cygwin\bin",
33+
"C:\msys64\usr\bin",
34+
"C:\msys64\mingw64\bin"
35+
)
36+
$env:PATH = ($extraPaths + @($env:PATH)) -join ';'
37+
38+
# pip installs
39+
& $pythonExe -m pip install -U --progress-bar off pip setuptools wheel
40+
41+
# requirements-dev.txt will skip installing lxml for windows and py 3.11+, where there's
42+
# no current binary wheel
43+
& $pythonExe -m pip install -U --progress-bar off -r requirements-dev.txt
44+
45+
choco install --allow-empty-checksums dmd ldc swig vswhere xsltproc winflexbison3
46+
47+
# Show environment variables
48+
Get-ChildItem Env: | Sort-Object Name

.github/workflows/experimental_tests.yml

Lines changed: 0 additions & 88 deletions
This file was deleted.

.github/workflows/framework_tests.yml

Lines changed: 0 additions & 42 deletions
This file was deleted.

.github/workflows/runtest-win-msvc.yml

Lines changed: 0 additions & 62 deletions
This file was deleted.

.github/workflows/runtest-win.yml

Lines changed: 0 additions & 60 deletions
This file was deleted.

0 commit comments

Comments
 (0)