-
Notifications
You must be signed in to change notification settings - Fork 16
94 lines (79 loc) · 3.12 KB
/
ci.yml
File metadata and controls
94 lines (79 loc) · 3.12 KB
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
name: CI
on:
push:
branches: ["**"]
pull_request:
release:
types: [created]
jobs:
build:
runs-on: windows-2025-vs2026
strategy:
matrix:
platform: [Win32, x64]
configuration: [Debug, Release]
steps:
- uses: actions/checkout@v6
- name: Install Debugging Tools for Windows
run: |
# TODO: It would be nice if we could use `winget install Microsoft.WinDbg` but it doesn't install to $(WindowsSdkDir)\Debuggers
# As a workaround, directly download and install the Windows SDK's debugging tools feature.
$ProgressPreference = 'SilentlyContinue'
Invoke-WebRequest -Uri 'https://go.microsoft.com/fwlink/?linkid=2361308' -OutFile 'winsdksetup.exe'
$proc = Start-Process -Wait -PassThru -FilePath '.\winsdksetup.exe' -ArgumentList '/features OptionId.WindowsDesktopDebuggers /quiet /norestart'
Remove-Item winsdksetup.exe -ErrorAction SilentlyContinue
if ($proc.ExitCode -ne 0) { exit $proc.ExitCode }
- name: Install Python versions with symbols
run: |
choco install -y --no-progress python2
choco install -y --no-progress --params "Include_symbols=1" python310
choco install -y --no-progress --params "Include_symbols=1" python311
choco install -y --no-progress --params "Include_symbols=1" python312
choco install -y --no-progress --params "Include_symbols=1" python313
choco install -y --no-progress --params "Include_symbols=1" python314
- name: Add MSBuild to PATH
uses: microsoft/setup-msbuild@v3
- name: Build
run: |
msbuild PyExt.sln `
/p:Configuration=${{ matrix.configuration }} `
/p:Platform=${{ matrix.platform }} `
/m `
/v:minimal
- name: Test
working-directory: test/scripts
run: |
py -3 run_all_tests.py `
"${{ github.workspace }}/${{ matrix.platform }}/${{ matrix.configuration }}/PyExtTest.exe"
- name: Upload artifact
if: github.event_name == 'release'
uses: actions/upload-artifact@v7
with:
name: PyExt-${{ matrix.platform }}-${{ matrix.configuration }}
path: |
${{ matrix.platform }}\${{ matrix.configuration }}\pyext.dll
${{ matrix.platform }}\${{ matrix.configuration }}\pyext.pdb
release:
needs: build
runs-on: ubuntu-latest
if: github.event_name == 'release'
permissions:
contents: write
steps:
- name: Download all artifacts
uses: actions/download-artifact@v7
with:
path: artifacts
- name: Create release zip
run: |
for platform in Win32 x64; do
for config in Debug Release; do
mkdir -p "PyExt/$platform/$config"
cp artifacts/PyExt-$platform-$config/* "PyExt/$platform/$config/"
done
done
zip -r PyExt.zip PyExt/
- name: Attach artifacts to release
env:
GH_TOKEN: ${{ github.token }}
run: gh release upload ${{ github.event.release.tag_name }} PyExt.zip