Repository navigation
81 lines (76 loc) · 2.73 KB
/
Copy pathpython_windows.yml
File metadata and controls
81 lines (76 loc) · 2.73 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
name: PyQBDI Windows Package
on:
workflow_call:
workflow_dispatch:
jobs:
build:
runs-on: windows-latest
strategy:
matrix:
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12', '3.13', '3.14']
QBDI_ARCH: ['X86_64', 'X86']
include:
- QBDI_ARCH: 'X86_64'
WINDOWS_ARCH: 'x64'
- QBDI_ARCH: 'X86'
WINDOWS_ARCH: 'x86'
fail-fast: false
env:
QBDI_PLATFORM: 'windows'
SCCACHE_CACHE_SIZE: "1G"
SCCACHE_DIR: "C:\\Users\\runner\\AppData\\Local\\Mozilla\\sccache"
steps:
- name: Install system dependencies
run: |
choco install sccache
- name: checkout
uses: actions/checkout@v4
- name: Cache sccache
uses: actions/cache@v4
id: cache-sccache
with:
path: |
${{ env.SCCACHE_DIR }}
key: sccache-win-${{ matrix.QBDI_ARCH }}-${{ hashFiles('.github/workflows/ccache.conf') }}-${{ matrix.python-version }}-${{ github.run_number }}
restore-keys: |
sccache-win-${{ matrix.QBDI_ARCH }}-${{ hashFiles('.github/workflows/ccache.conf') }}-${{ matrix.python-version }}-
sccache-win-${{ matrix.QBDI_ARCH }}-${{ hashFiles('.github/workflows/ccache.conf') }}-
- name: Create sccache directory
if: steps.cache-sccache.outputs.cache-hit != 'true'
shell: powershell
run: |
If(!(test-path -PathType container ${env:SCCACHE_DIR}))
{
New-Item -ItemType Directory -Path ${env:SCCACHE_DIR}
}
- uses: ilammy/msvc-dev-cmd@v1
with:
arch: ${{ matrix.WINDOWS_ARCH }}
- name: Start sccache server
run: sccache --start-server
- name: Cache third-party
uses: actions/cache@v4
with:
path: |
third-party
key: QBDI-third-party-${{ hashFiles('**/CMakeLists.txt') }}-${{ hashFiles('**/*.cmake') }}
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
allow-prereleases: ${{ matrix.python-version == '3.15' }}
architecture: ${{ matrix.WINDOWS_ARCH }}
- name: build PyQBDI ${{ matrix.python-version }}
run: |
python --version
python -m pip --version
python -m pip install --upgrade pip
python -m pip install setuptools wheel build
python -m build -w
- name: Export package
uses: actions/upload-artifact@v4
with:
name: PyQBDI_windows_${{ matrix.QBDI_ARCH }}_python_${{ matrix.python-version }}
path: dist\PyQBDI-*.whl
- name: Stop sccache server
run: sccache --stop-server