-
Notifications
You must be signed in to change notification settings - Fork 6
75 lines (70 loc) · 2.63 KB
/
test-windows.yml
File metadata and controls
75 lines (70 loc) · 2.63 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
name: Test Windows
on:
schedule:
- cron: "14 3 1 */1 *" # At 03:14 on the 1st of every month
push:
branches:
- main
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref_name }}
cancel-in-progress: true
jobs:
pybmds:
runs-on: windows-2022
env:
VCPKG_HOST_TRIPLET: x64-windows-static-md
steps:
- uses: actions/checkout@v4
- name: Cache dependencies
id: cache-vcpkg-deps
uses: actions/cache@v4
with:
path: vcpkg_installed
key: vcpkg-${{ runner.os }}-${{ hashFiles('vcpkg.json') }}
- name: Acquire vcpkg
if: steps.cache-vcpkg-deps.outputs.cache-hit != 'true'
uses: actions/checkout@v4
with:
repository: "Microsoft/vcpkg"
path: vcpkg
ref: c9c17dcea3016bc241df0422e82b8aea212dcb93
- name: Install libraries with vcpkg.json
if: steps.cache-vcpkg-deps.outputs.cache-hit != 'true'
shell: bash
run: |
./vcpkg/bootstrap-vcpkg.sh
./vcpkg/vcpkg install --host-triplet="$VCPKG_HOST_TRIPLET" --overlay-ports=./vendor/ports
- name: set up Python
uses: actions/setup-python@v5
with:
python-version: "3.13"
- name: Install uv
uses: astral-sh/setup-uv@v5
with:
cache-dependency-glob: "**/pyproject.toml"
- name: Set environment variables
run: |
$env:CMAKE_PREFIX_PATH="${{ github.workspace }}\pybind11\pybind11\share\cmake"
$env:CMAKE_BUILD_PARALLEL_LEVEL=[Environment]::ProcessorCount
echo "CMAKE_PREFIX_PATH=$env:CMAKE_PREFIX_PATH" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
echo "CMAKE_BUILD_PARALLEL_LEVEL=$env:CMAKE_BUILD_PARALLEL_LEVEL" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
- name: Build package (test)
run: |
uv pip install pybind11==3.0.0 --target=./pybind11
uv pip install --system -v -e "."
python -c "import pybmds; print(pybmds.bmdscore.version())"
uv pip install --system pefile
python -c "from pathlib import Path; import pefile; fn = str(list(Path('src/pybmds').glob('bmdscore*'))[0].resolve()); pe = pefile.PE(fn); print([i.dll for i in pe.DIRECTORY_ENTRY_IMPORT])"
- name: Build package (wheel)
run: |
uv pip install --system -v wheel setuptools
python setup.py bdist_wheel
- uses: actions/upload-artifact@v4
with:
name: bmdscore
path: ./src/pybmds/*.pyd
- uses: actions/upload-artifact@v4
with:
name: Python package
path: ./dist/*.whl