wirestead 0.9.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. wirestead-0.9.0/.clang-format +9 -0
  2. wirestead-0.9.0/.cmake-format.py +13 -0
  3. wirestead-0.9.0/.github/dependabot.yml +10 -0
  4. wirestead-0.9.0/.github/pull_request_template.md +34 -0
  5. wirestead-0.9.0/.github/workflows/ci.yml +220 -0
  6. wirestead-0.9.0/.github/workflows/code-formatting.yml +36 -0
  7. wirestead-0.9.0/.github/workflows/release.yml +328 -0
  8. wirestead-0.9.0/.gitignore +223 -0
  9. wirestead-0.9.0/CHANGELOG.md +70 -0
  10. wirestead-0.9.0/CMakeLists.txt +46 -0
  11. wirestead-0.9.0/CONTRIBUTING.md +44 -0
  12. wirestead-0.9.0/LICENSE +201 -0
  13. wirestead-0.9.0/NOTICE +3 -0
  14. wirestead-0.9.0/PKG-INFO +136 -0
  15. wirestead-0.9.0/README.md +114 -0
  16. wirestead-0.9.0/bindings/python/diagnose_windows_import.py +179 -0
  17. wirestead-0.9.0/bindings/python/module.cpp.in +916 -0
  18. wirestead-0.9.0/cmake/FindOrBuildWiresteadCore.cmake +116 -0
  19. wirestead-0.9.0/docs/api.md +13 -0
  20. wirestead-0.9.0/docs/compatibility.md +59 -0
  21. wirestead-0.9.0/docs/installation.md +59 -0
  22. wirestead-0.9.0/docs/packaging.md +16 -0
  23. wirestead-0.9.0/docs/packet-probe-viewer-ipc.md +60 -0
  24. wirestead-0.9.0/docs/release.md +98 -0
  25. wirestead-0.9.0/pyproject.toml +52 -0
  26. wirestead-0.9.0/scripts/verify.sh +178 -0
  27. wirestead-0.9.0/src/wirestead/__init__.py +61 -0
  28. wirestead-0.9.0/src/wirestead/_version.py +1 -0
  29. wirestead-0.9.0/src/wirestead/asyncio.py +263 -0
  30. wirestead-0.9.0/src/wirestead/py.typed +1 -0
  31. wirestead-0.9.0/tests/conftest.py +21 -0
  32. wirestead-0.9.0/tests/test_api_surface.py +73 -0
  33. wirestead-0.9.0/tests/test_asyncio_uds.py +43 -0
  34. wirestead-0.9.0/tests/test_import.py +5 -0
  35. wirestead-0.9.0/tests/test_tcp_loopback.py +69 -0
  36. wirestead-0.9.0/tests/test_uds_loopback.py +93 -0
  37. wirestead-0.9.0/vcpkg.json +7 -0
@@ -0,0 +1,9 @@
1
+ UseTab: Never
2
+ IndentWidth: 2
3
+ ColumnLimit: 120
4
+ Language: Cpp
5
+ Standard: c++17
6
+ BasedOnStyle: Google
7
+ DerivePointerAlignment: false
8
+ PointerAlignment: Left
9
+ IncludeBlocks: Regroup
@@ -0,0 +1,13 @@
1
+ with section("format"):
2
+ line_width = 80
3
+ max_subgroups_hwrap = 2
4
+ max_pargs_hwrap = 6
5
+ max_rows_cmdline = 2
6
+ dangle_parens = True
7
+ enable_sort = True
8
+ autosort = True
9
+
10
+ # Options for file encoding
11
+ with section("encode"):
12
+ input_encoding = "utf-8"
13
+ output_encoding = "utf-8"
@@ -0,0 +1,10 @@
1
+ version: 2
2
+ updates:
3
+ - package-ecosystem: "github-actions"
4
+ directory: "/"
5
+ schedule:
6
+ interval: "weekly"
7
+ - package-ecosystem: "pip"
8
+ directory: "/"
9
+ schedule:
10
+ interval: "weekly"
@@ -0,0 +1,34 @@
1
+ ## Description
2
+ <!-- Provide a brief summary of the changes and the motivation behind them. -->
3
+
4
+ ## Key Changes
5
+ <!-- List the specific modifications made in this PR. -->
6
+ -
7
+ -
8
+
9
+ ## Related Issues
10
+ <!-- Link any related issues using keywords like "Fixes #123" or "Closes #456". -->
11
+ - N/A
12
+
13
+ ## Type of Change
14
+ <!-- Please mark the relevant option(s) with an "x". -->
15
+ - [ ] **Bug Fix**: A non-breaking change that resolves an issue.
16
+ - [ ] **Python API**: Changes to Python package behavior or public bindings.
17
+ - [ ] **Build/CI**: Changes to packaging, CMake, vcpkg, formatting, or workflow files.
18
+ - [ ] **Documentation**: Changes to documentation only.
19
+ - [ ] **Refactor**: Code changes that neither fix a bug nor add functionality.
20
+ - [ ] **Testing**: Adding or updating validation coverage.
21
+
22
+ ## Validation
23
+ <!-- Check the items that apply, and note any skipped checks in Additional Context. -->
24
+ - [ ] I have run `git diff --check`.
25
+ - [ ] I have run `scripts/verify.sh`, or the equivalent checks below.
26
+ - [ ] I have installed against a local core source tree.
27
+ - [ ] I have installed against vcpkg `wirestead`, if applicable.
28
+ - [ ] I have installed against an installed Wirestead CMake package, if applicable.
29
+ - [ ] I have run `python -m pytest -q -m "not serial and not integration"`.
30
+ - [ ] I have run or confirmed formatting checks for C++ and CMake files.
31
+ - [ ] I have updated documentation to reflect the change, if applicable.
32
+
33
+ ## Additional Context
34
+ <!-- Add any other relevant information, logs, or follow-up notes here. -->
@@ -0,0 +1,220 @@
1
+ name: CI
2
+
3
+ concurrency:
4
+ group: ${{ github.workflow }}-${{ github.ref }}
5
+ cancel-in-progress: true
6
+
7
+ on:
8
+ push:
9
+ branches: [main, develop]
10
+ pull_request:
11
+ branches: [main, develop]
12
+
13
+ env:
14
+ WIRESTEAD_CORE_REF: v0.9.0
15
+
16
+ jobs:
17
+ build-test:
18
+ strategy:
19
+ fail-fast: false
20
+ matrix:
21
+ os: [ubuntu-24.04, macos-15, windows-2022]
22
+ python-version: ["3.8", "3.10", "3.12"]
23
+
24
+ runs-on: ${{ matrix.os }}
25
+
26
+ env:
27
+ CMAKE_BUILD_PARALLEL_LEVEL: "2"
28
+
29
+ steps:
30
+ - name: Checkout Wirestead Python
31
+ uses: actions/checkout@v7
32
+
33
+ - name: Checkout Wirestead core
34
+ uses: actions/checkout@v7
35
+ with:
36
+ repository: wirestead/wirestead
37
+ ref: ${{ env.WIRESTEAD_CORE_REF }}
38
+ path: wirestead-core
39
+
40
+ - name: Set up Python
41
+ uses: actions/setup-python@v7
42
+ with:
43
+ python-version: ${{ matrix.python-version }}
44
+
45
+ - name: Install Python build deps
46
+ run: |
47
+ python -m pip install -U pip
48
+ python -m pip install "pytest>=8,<9" pytest-asyncio build scikit-build-core "pybind11>=2.11,<3"
49
+
50
+ - name: Install system deps on Linux
51
+ if: runner.os == 'Linux'
52
+ run: |
53
+ sudo apt-get update
54
+ sudo apt-get install -y build-essential cmake ninja-build libboost-system-dev libboost-thread-dev libspdlog-dev
55
+
56
+ - name: Install system deps on macOS
57
+ if: runner.os == 'macOS'
58
+ run: |
59
+ brew install cmake ninja
60
+
61
+ - name: Checkout vcpkg
62
+ if: runner.os == 'macOS' || runner.os == 'Windows'
63
+ uses: actions/checkout@v7
64
+ with:
65
+ repository: microsoft/vcpkg
66
+ path: vcpkg
67
+
68
+ - name: Cache vcpkg packages
69
+ if: runner.os == 'macOS' || runner.os == 'Windows'
70
+ uses: actions/cache@v6
71
+ with:
72
+ path: |
73
+ vcpkg/buildtrees
74
+ vcpkg/downloads
75
+ vcpkg/installed
76
+ vcpkg/packages
77
+ key: ${{ runner.os }}-vcpkg-${{ hashFiles('.github/workflows/ci.yml', 'vcpkg/builtin-baseline', 'vcpkg/ports/boost-asio/**', 'vcpkg/ports/boost-system/**') }}
78
+ restore-keys: |
79
+ ${{ runner.os }}-vcpkg-
80
+
81
+ - name: Install vcpkg deps on macOS
82
+ if: runner.os == 'macOS'
83
+ run: |
84
+ ./vcpkg/bootstrap-vcpkg.sh
85
+ ./vcpkg/vcpkg install --classic boost-asio boost-system --triplet arm64-osx
86
+
87
+ - name: Install vcpkg deps on Windows
88
+ if: runner.os == 'Windows'
89
+ shell: pwsh
90
+ run: |
91
+ ./vcpkg/bootstrap-vcpkg.bat
92
+ ./vcpkg/vcpkg install --classic boost-asio boost-system --triplet x64-windows-static-md
93
+
94
+ - name: Build and install package on Linux
95
+ if: runner.os == 'Linux'
96
+ run: |
97
+ python -m pip install . \
98
+ --config-settings=cmake.define.WIRESTEAD_CORE_SOURCE_DIR=${{ github.workspace }}/wirestead-core
99
+
100
+ - name: Build and install package on macOS
101
+ if: runner.os == 'macOS'
102
+ run: |
103
+ python -m pip install . \
104
+ --config-settings=cmake.define.WIRESTEAD_CORE_SOURCE_DIR=${{ github.workspace }}/wirestead-core \
105
+ --config-settings=cmake.define.VCPKG_MANIFEST_MODE=OFF \
106
+ --config-settings=cmake.define.CMAKE_TOOLCHAIN_FILE=${{ github.workspace }}/vcpkg/scripts/buildsystems/vcpkg.cmake \
107
+ --config-settings=cmake.define.VCPKG_TARGET_TRIPLET=arm64-osx
108
+
109
+ - name: Build and install package on Windows
110
+ if: runner.os == 'Windows'
111
+ shell: pwsh
112
+ run: |
113
+ python -m pip install . `
114
+ "--config-settings=cmake.define.WIRESTEAD_CORE_SOURCE_DIR=${{ github.workspace }}/wirestead-core" `
115
+ "--config-settings=cmake.define.VCPKG_MANIFEST_MODE=OFF" `
116
+ "--config-settings=cmake.define.CMAKE_TOOLCHAIN_FILE=${{ github.workspace }}/vcpkg/scripts/buildsystems/vcpkg.cmake" `
117
+ "--config-settings=cmake.define.VCPKG_TARGET_TRIPLET=x64-windows-static-md"
118
+
119
+ - name: Import smoke
120
+ if: runner.os != 'Windows'
121
+ run: |
122
+ python -c "import wirestead; print(wirestead.__version__)"
123
+
124
+ - name: Import smoke on Windows
125
+ if: runner.os == 'Windows'
126
+ shell: pwsh
127
+ run: |
128
+ $site = python -c "import site; print(site.getsitepackages()[0])"
129
+ $vcpkgBin = "${{ github.workspace }}/vcpkg/installed/x64-windows-static-md/bin"
130
+ $env:PATH = "$site;$site\wirestead;$vcpkgBin;$env:PATH"
131
+ $env:WIRESTEAD_INSTALL_PATH = $site
132
+ $env:WIRESTEAD_PACKAGE_PATH = $site
133
+
134
+ python -X faulthandler -c "import wirestead; print(wirestead.__version__)"
135
+ if ($LASTEXITCODE -ne 0) {
136
+ python bindings/python/diagnose_windows_import.py
137
+ exit 1
138
+ }
139
+
140
+ - name: Run tests
141
+ env:
142
+ WIRESTEAD_PYTHON_RUN_LOOPBACK_TESTS: ${{ runner.os != 'Windows' && '1' || '' }}
143
+ PYTEST_DISABLE_PLUGIN_AUTOLOAD: "1"
144
+ run: |
145
+ python -m pytest -q -p pytest_asyncio.plugin -m "not serial"
146
+
147
+ vcpkg-core:
148
+ name: vcpkg core
149
+ if: false # Re-enable after the official vcpkg wirestead port is merged.
150
+ runs-on: ubuntu-24.04
151
+ timeout-minutes: 30
152
+
153
+ env:
154
+ VCPKG_ROOT: ${{ github.workspace }}/vcpkg
155
+
156
+ steps:
157
+ - name: Checkout Wirestead Python
158
+ uses: actions/checkout@v7
159
+
160
+ - name: Checkout vcpkg
161
+ uses: actions/checkout@v7
162
+ with:
163
+ repository: microsoft/vcpkg
164
+ path: vcpkg
165
+
166
+ - name: Set up Python
167
+ uses: actions/setup-python@v7
168
+ with:
169
+ python-version: "3.12"
170
+
171
+ - name: Bootstrap vcpkg
172
+ run: ./vcpkg/bootstrap-vcpkg.sh
173
+
174
+ - name: Verify vcpkg package install
175
+ run: scripts/verify.sh --skip-source
176
+
177
+ installed-core:
178
+ name: Installed core
179
+ runs-on: ubuntu-24.04
180
+ timeout-minutes: 30
181
+
182
+ env:
183
+ WIRESTEAD_INSTALL_PREFIX: /tmp/wirestead-prefix
184
+
185
+ steps:
186
+ - name: Checkout Wirestead Python
187
+ uses: actions/checkout@v7
188
+
189
+ - name: Checkout Wirestead core
190
+ uses: actions/checkout@v7
191
+ with:
192
+ repository: wirestead/wirestead
193
+ ref: ${{ env.WIRESTEAD_CORE_REF }}
194
+ path: wirestead-core
195
+
196
+ - name: Set up Python
197
+ uses: actions/setup-python@v7
198
+ with:
199
+ python-version: "3.12"
200
+
201
+ - name: Install system deps
202
+ run: |
203
+ sudo apt-get update
204
+ sudo apt-get install -y build-essential cmake ninja-build libboost-system-dev libboost-thread-dev libspdlog-dev
205
+
206
+ - name: Configure Wirestead core
207
+ run: >
208
+ cmake -S wirestead-core -B build-wirestead-install
209
+ -DCMAKE_INSTALL_PREFIX=$WIRESTEAD_INSTALL_PREFIX
210
+ -DWIRESTEAD_BUILD_TESTS=OFF
211
+ -DWIRESTEAD_BUILD_DOCS=OFF
212
+
213
+ - name: Build Wirestead core
214
+ run: cmake --build build-wirestead-install --parallel
215
+
216
+ - name: Install Wirestead core
217
+ run: cmake --install build-wirestead-install
218
+
219
+ - name: Verify installed package install
220
+ run: scripts/verify.sh --skip-source --skip-vcpkg --installed-prefix $WIRESTEAD_INSTALL_PREFIX
@@ -0,0 +1,36 @@
1
+ name: Code Formatting
2
+
3
+ concurrency:
4
+ group: ${{ github.workflow }}-${{ github.ref }}
5
+ cancel-in-progress: true
6
+
7
+ on:
8
+ push:
9
+ branches: [main]
10
+ pull_request:
11
+ branches: [main]
12
+ workflow_call:
13
+
14
+ jobs:
15
+ formatting:
16
+ name: Code Formatting
17
+ runs-on: ubuntu-22.04
18
+ timeout-minutes: 10
19
+
20
+ steps:
21
+ - name: Checkout code
22
+ uses: actions/checkout@v7
23
+
24
+ - name: Set up Python
25
+ uses: actions/setup-python@v7
26
+ with:
27
+ python-version: "3.x"
28
+
29
+ - name: Install formatters
30
+ run: pip install clang-format==18.1.3 cmakelang==0.6.13
31
+
32
+ - name: Run formatting style check
33
+ run: |
34
+ find . -regex '.*\.\(cpp\|hpp\|cu\|c\|h\|cc\|hh\)' -not -path "./build/*" -not -path "./build-*/*" -not -path "./_deps/*" -exec clang-format -style=file -i {} \;
35
+ find . -type f \( -name "CMakeLists.txt" -o -name "*.cmake" -o -name "*.cmake.in" \) -not -path "*/build/*" -not -path "*/build-*/*" -not -path "*/.git/*" -not -path "*/.vscode/*" -not -path "*/docs/html/*" -exec cmake-format -i {} \;
36
+ git diff --exit-code
@@ -0,0 +1,328 @@
1
+ name: Release
2
+
3
+ on:
4
+ push:
5
+ tags:
6
+ - "v*"
7
+ workflow_dispatch:
8
+ inputs:
9
+ tag_name:
10
+ description: "Tag name to build and publish"
11
+ required: true
12
+ default: "v0.9.0"
13
+ upload:
14
+ description: "Upload release assets to GitHub"
15
+ type: boolean
16
+ required: false
17
+ default: true
18
+ publish_pypi:
19
+ description: "Publish sdist/wheels to PyPI"
20
+ type: boolean
21
+ required: false
22
+ default: false
23
+ pypi_target:
24
+ description: "PyPI index to publish to"
25
+ type: choice
26
+ options:
27
+ - testpypi
28
+ - pypi
29
+ required: false
30
+ default: testpypi
31
+
32
+ permissions:
33
+ contents: write
34
+
35
+ jobs:
36
+ source-distribution:
37
+ name: Source distribution
38
+ runs-on: ubuntu-24.04
39
+
40
+ steps:
41
+ - name: Checkout Wirestead Python
42
+ uses: actions/checkout@v7
43
+ with:
44
+ ref: ${{ github.event_name == 'workflow_dispatch' && inputs.tag_name || github.ref_name }}
45
+
46
+ - name: Set up Python
47
+ uses: actions/setup-python@v7
48
+ with:
49
+ python-version: "3.12"
50
+
51
+ - name: Build source distribution
52
+ run: |
53
+ python -m pip install -U pip
54
+ python -m pip install build scikit-build-core "pybind11>=2.11,<3"
55
+ python -m build --sdist --no-isolation
56
+
57
+ - name: Upload source distribution artifact
58
+ uses: actions/upload-artifact@v7
59
+ with:
60
+ name: release-sdist
61
+ path: dist/*.tar.gz
62
+
63
+ wheels:
64
+ name: Wheel (${{ matrix.os_label }}, py${{ matrix.python-version }})
65
+ runs-on: ${{ matrix.os }}
66
+ strategy:
67
+ fail-fast: false
68
+ matrix:
69
+ include:
70
+ - os: macos-15
71
+ os_label: macos-15-arm64
72
+ python-version: "3.8"
73
+ - os: macos-15
74
+ os_label: macos-15-arm64
75
+ python-version: "3.10"
76
+ - os: macos-15
77
+ os_label: macos-15-arm64
78
+ python-version: "3.12"
79
+ - os: windows-2022
80
+ os_label: windows-amd64
81
+ python-version: "3.8"
82
+ - os: windows-2022
83
+ os_label: windows-amd64
84
+ python-version: "3.10"
85
+ - os: windows-2022
86
+ os_label: windows-amd64
87
+ python-version: "3.12"
88
+
89
+ env:
90
+ CMAKE_BUILD_PARALLEL_LEVEL: "2"
91
+
92
+ steps:
93
+ - name: Checkout Wirestead Python
94
+ uses: actions/checkout@v7
95
+ with:
96
+ ref: ${{ github.event_name == 'workflow_dispatch' && inputs.tag_name || github.ref_name }}
97
+
98
+ - name: Checkout Wirestead core
99
+ uses: actions/checkout@v7
100
+ with:
101
+ repository: wirestead/wirestead
102
+ ref: ${{ github.event_name == 'workflow_dispatch' && inputs.tag_name || github.ref_name }}
103
+ path: wirestead-core
104
+
105
+ - name: Set up Python
106
+ uses: actions/setup-python@v7
107
+ with:
108
+ python-version: ${{ matrix.python-version }}
109
+
110
+ - name: Install Python build deps
111
+ run: |
112
+ python -m pip install -U pip
113
+ python -m pip install "pytest>=8,<9" pytest-asyncio scikit-build-core "pybind11>=2.11,<3"
114
+
115
+ - name: Install system deps on macOS
116
+ if: runner.os == 'macOS'
117
+ run: |
118
+ brew install cmake ninja
119
+
120
+ - name: Checkout vcpkg
121
+ if: runner.os == 'macOS' || runner.os == 'Windows'
122
+ uses: actions/checkout@v7
123
+ with:
124
+ repository: microsoft/vcpkg
125
+ path: vcpkg
126
+
127
+ - name: Cache vcpkg packages
128
+ if: runner.os == 'macOS' || runner.os == 'Windows'
129
+ uses: actions/cache@v6
130
+ with:
131
+ path: |
132
+ vcpkg/buildtrees
133
+ vcpkg/downloads
134
+ vcpkg/installed
135
+ vcpkg/packages
136
+ key: ${{ runner.os }}-vcpkg-release-${{ hashFiles('.github/workflows/release.yml', 'vcpkg/builtin-baseline', 'vcpkg/ports/boost-asio/**', 'vcpkg/ports/boost-system/**') }}
137
+ restore-keys: |
138
+ ${{ runner.os }}-vcpkg-release-
139
+ ${{ runner.os }}-vcpkg-
140
+
141
+ - name: Install vcpkg deps on macOS
142
+ if: runner.os == 'macOS'
143
+ run: |
144
+ ./vcpkg/bootstrap-vcpkg.sh
145
+ ./vcpkg/vcpkg install --classic boost-asio boost-system --triplet arm64-osx
146
+
147
+ - name: Install vcpkg deps on Windows
148
+ if: runner.os == 'Windows'
149
+ shell: pwsh
150
+ run: |
151
+ ./vcpkg/bootstrap-vcpkg.bat
152
+ ./vcpkg/vcpkg install --classic boost-asio boost-system --triplet x64-windows-static-md
153
+
154
+ - name: Build wheel on macOS
155
+ if: runner.os == 'macOS'
156
+ run: |
157
+ python -m pip wheel . --no-build-isolation -w dist \
158
+ --config-settings=cmake.define.WIRESTEAD_CORE_SOURCE_DIR=${{ github.workspace }}/wirestead-core \
159
+ --config-settings=cmake.define.VCPKG_MANIFEST_MODE=OFF \
160
+ --config-settings=cmake.define.CMAKE_TOOLCHAIN_FILE=${{ github.workspace }}/vcpkg/scripts/buildsystems/vcpkg.cmake \
161
+ --config-settings=cmake.define.VCPKG_TARGET_TRIPLET=arm64-osx
162
+
163
+ - name: Build wheel on Windows
164
+ if: runner.os == 'Windows'
165
+ shell: pwsh
166
+ run: |
167
+ python -m pip wheel . --no-build-isolation -w dist `
168
+ "--config-settings=cmake.define.WIRESTEAD_CORE_SOURCE_DIR=${{ github.workspace }}/wirestead-core" `
169
+ "--config-settings=cmake.define.VCPKG_MANIFEST_MODE=OFF" `
170
+ "--config-settings=cmake.define.CMAKE_TOOLCHAIN_FILE=${{ github.workspace }}/vcpkg/scripts/buildsystems/vcpkg.cmake" `
171
+ "--config-settings=cmake.define.VCPKG_TARGET_TRIPLET=x64-windows-static-md"
172
+
173
+ - name: Install wheel and run smoke tests
174
+ if: runner.os != 'Windows'
175
+ run: |
176
+ python -m pip install dist/*.whl
177
+ python -c "import wirestead; print(wirestead.__version__)"
178
+ PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 python -m pytest -q -p pytest_asyncio.plugin -m "not serial and not integration"
179
+
180
+ - name: Install wheel and run smoke tests on Windows
181
+ if: runner.os == 'Windows'
182
+ shell: pwsh
183
+ run: |
184
+ $wheel = Get-ChildItem dist -Filter *.whl | Select-Object -First 1
185
+ python -m pip install $wheel.FullName
186
+ $site = python -c "import site; print(site.getsitepackages()[0])"
187
+ $vcpkgBin = "${{ github.workspace }}/vcpkg/installed/x64-windows-static-md/bin"
188
+ $env:PATH = "$site;$site\wirestead;$vcpkgBin;$env:PATH"
189
+ $env:WIRESTEAD_INSTALL_PATH = $site
190
+ $env:WIRESTEAD_PACKAGE_PATH = $site
191
+ python -X faulthandler -c "import wirestead; print(wirestead.__version__)"
192
+ if ($LASTEXITCODE -ne 0) {
193
+ python bindings/python/diagnose_windows_import.py
194
+ exit 1
195
+ }
196
+ $env:PYTEST_DISABLE_PLUGIN_AUTOLOAD = "1"
197
+ python -m pytest -q -p pytest_asyncio.plugin -m "not serial and not integration"
198
+
199
+ - name: Upload wheel artifact
200
+ uses: actions/upload-artifact@v7
201
+ with:
202
+ name: release-wheel-${{ matrix.os_label }}-py${{ matrix.python-version }}
203
+ path: dist/*.whl
204
+
205
+ wheels-linux:
206
+ name: Wheel (manylinux_2_28, x86_64)
207
+ runs-on: ubuntu-24.04
208
+
209
+ env:
210
+ CIBW_BUILD: "cp38-manylinux_x86_64 cp310-manylinux_x86_64 cp312-manylinux_x86_64"
211
+ CIBW_MANYLINUX_X86_64_IMAGE: manylinux_2_28
212
+ CIBW_ENVIRONMENT_LINUX: >-
213
+ SKBUILD_CMAKE_DEFINE="WIRESTEAD_CORE_SOURCE_DIR=/host${{ github.workspace }}/wirestead-core;VCPKG_MANIFEST_MODE=OFF;CMAKE_TOOLCHAIN_FILE=/vcpkg/scripts/buildsystems/vcpkg.cmake;VCPKG_TARGET_TRIPLET=x64-linux"
214
+ CIBW_BEFORE_ALL_LINUX: >-
215
+ dnf install -y ninja-build zip unzip perl-IPC-Cmd &&
216
+ git clone --depth 1 https://github.com/microsoft/vcpkg.git /vcpkg &&
217
+ /vcpkg/bootstrap-vcpkg.sh &&
218
+ /vcpkg/vcpkg install --classic boost-asio boost-system --triplet x64-linux
219
+ CIBW_TEST_REQUIRES: "pytest>=8,<9 pytest-asyncio"
220
+ CIBW_TEST_COMMAND: >-
221
+ python -c "import wirestead; print(wirestead.__version__)" &&
222
+ cd {project} && PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 python -m pytest -q -p pytest_asyncio.plugin -m "not serial and not integration"
223
+
224
+ steps:
225
+ - name: Checkout Wirestead Python
226
+ uses: actions/checkout@v7
227
+ with:
228
+ ref: ${{ github.event_name == 'workflow_dispatch' && inputs.tag_name || github.ref_name }}
229
+
230
+ - name: Checkout Wirestead core
231
+ uses: actions/checkout@v7
232
+ with:
233
+ repository: wirestead/wirestead
234
+ ref: ${{ github.event_name == 'workflow_dispatch' && inputs.tag_name || github.ref_name }}
235
+ path: wirestead-core
236
+
237
+ - name: Build manylinux wheels
238
+ uses: pypa/cibuildwheel@v3.4
239
+
240
+ - name: Upload wheel artifact
241
+ uses: actions/upload-artifact@v7
242
+ with:
243
+ name: release-wheel-manylinux_2_28-x86_64
244
+ path: wheelhouse/*.whl
245
+
246
+ publish:
247
+ name: Publish GitHub release assets
248
+ runs-on: ubuntu-24.04
249
+ needs: [source-distribution, wheels, wheels-linux]
250
+ if: github.event_name == 'push' || inputs.upload == true || inputs.upload == 'true'
251
+
252
+ steps:
253
+ - name: Checkout Wirestead Python
254
+ uses: actions/checkout@v7
255
+ with:
256
+ ref: ${{ github.event_name == 'workflow_dispatch' && inputs.tag_name || github.ref_name }}
257
+
258
+ - name: Download release artifacts
259
+ uses: actions/download-artifact@v8
260
+ with:
261
+ pattern: release-*
262
+ path: release-assets
263
+ merge-multiple: true
264
+
265
+ - name: List release assets
266
+ run: |
267
+ find release-assets -maxdepth 1 -type f -print | sort
268
+
269
+ - name: Prepare release notes
270
+ env:
271
+ RELEASE_TAG: ${{ github.event_name == 'workflow_dispatch' && inputs.tag_name || github.ref_name }}
272
+ run: |
273
+ cat > release-notes.md <<EOF
274
+ ## Wirestead Python ${RELEASE_TAG}
275
+
276
+ Release aligned with the matching Wirestead C++ core release line.
277
+
278
+ See `CHANGELOG.md` for details.
279
+ EOF
280
+
281
+ - name: Upload Release Assets
282
+ uses: softprops/action-gh-release@v3
283
+ with:
284
+ files: release-assets/*
285
+ name: ${{ github.event_name == 'workflow_dispatch' && inputs.tag_name || github.ref_name }}
286
+ tag_name: ${{ github.event_name == 'workflow_dispatch' && inputs.tag_name || github.ref_name }}
287
+ body_path: release-notes.md
288
+ draft: false
289
+ prerelease: false
290
+ fail_on_unmatched_files: true
291
+ env:
292
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
293
+
294
+ publish-pypi:
295
+ name: Publish to PyPI
296
+ runs-on: ubuntu-24.04
297
+ needs: [source-distribution, wheels, wheels-linux]
298
+ if: github.event_name == 'workflow_dispatch' && (inputs.publish_pypi == true || inputs.publish_pypi == 'true')
299
+ environment:
300
+ name: ${{ inputs.pypi_target == 'pypi' && 'pypi' || 'testpypi' }}
301
+ permissions:
302
+ id-token: write
303
+
304
+ steps:
305
+ - name: Download release artifacts
306
+ uses: actions/download-artifact@v8
307
+ with:
308
+ pattern: release-*
309
+ path: dist
310
+ merge-multiple: true
311
+
312
+ - name: List distributions
313
+ run: |
314
+ find dist -maxdepth 1 -type f \( -name "*.whl" -o -name "*.tar.gz" \) -print | sort
315
+
316
+ - name: Publish to TestPyPI
317
+ if: inputs.pypi_target != 'pypi'
318
+ uses: pypa/gh-action-pypi-publish@release/v1
319
+ with:
320
+ repository-url: https://test.pypi.org/legacy/
321
+ packages-dir: dist
322
+ skip-existing: true
323
+
324
+ - name: Publish to PyPI
325
+ if: inputs.pypi_target == 'pypi'
326
+ uses: pypa/gh-action-pypi-publish@release/v1
327
+ with:
328
+ packages-dir: dist