-
Notifications
You must be signed in to change notification settings - Fork 11
82 lines (69 loc) · 2.07 KB
/
test_windows_sdist.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
name: test-sdist
on:
pull_request:
types: [opened, reopened, labeled, synchronize]
jobs:
build:
name: Build sdist
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # Ensure tags are fetched for versioning
- name: Setup Python 3.11
uses: actions/setup-python@v5
with:
python-version: 3.11
- name: Update Python pip, build
shell: bash -l {0}
run: |
python -m pip install --upgrade pip build
- name: Create source distribution
shell: bash -l {0}
run: |
python -m build --sdist .
- name: Upload source dist as build artifact
uses: actions/upload-artifact@v4
with:
name: python-source-distribution
path: dist
test:
needs: build
name: Install on Windows
runs-on: windows-latest
steps:
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: |
3.10
3.11
3.12
- name: Find MSVC and set environment variables
shell: bash -l {0}
env:
MSVC_PREFIX: 'C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC'
run: |
echo "Available MSVC installations:"
ls "$MSVC_PREFIX"
MSVC_BIN=$(ls "$MSVC_PREFIX" | tail -n 1)\\bin\\HostX64\\x64
CC="$MSVC_PREFIX\\$MSVC_BIN\\cl.exe"
echo "CC: $CC"
echo "CC=$CC" >> $GITHUB_ENV
CC_LD="$MSVC_PREFIX\\$MSVC_BIN\\link.exe"
echo "CC_LD: $CC_LD"
echo "CC_LD=$CC_LD" >> $GITHUB_ENV
- name: Download artifacts to Windows environment
uses: actions/download-artifact@v4
with:
path: dist/
merge-multiple: true
- name: List Files
run: ls -R
- name: Update pip
shell: bash -l {0}
run: |
python -m pip install --upgrade pip
- name: Install from sdist
shell: bash -l {0}
run: python -m pip install euphonic-*.tar.gz