Skip to content

Commit d283089

Browse files
author
arman-bd
committed
wip
1 parent ef338fc commit d283089

File tree

3 files changed

+102
-99
lines changed

3 files changed

+102
-99
lines changed

.github/workflows/release.yml

Lines changed: 98 additions & 98 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ on:
44
push:
55
branches:
66
- develop
7-
tags: ['v*']
7+
# tags: ['v*']
88

99
jobs:
1010
# Configuration - Edit this section to enable/disable tests
@@ -44,100 +44,100 @@ jobs:
4444
if: always() && (needs.test.result == 'success' || needs.test.result == 'skipped')
4545
uses: ./.github/workflows/_build_windows.yml
4646

47-
build-linux:
48-
name: Build Linux Wheels
49-
needs: [config, test]
50-
if: always() && (needs.test.result == 'success' || needs.test.result == 'skipped')
51-
uses: ./.github/workflows/_build_linux.yml
52-
53-
build-macos:
54-
name: Build macOS Wheels
55-
needs: [config, test]
56-
if: always() && (needs.test.result == 'success' || needs.test.result == 'skipped')
57-
uses: ./.github/workflows/_build_macos.yml
58-
59-
publish:
60-
name: Publish Release
61-
needs: [build-windows, build-linux, build-macos]
62-
if: always() && startsWith(github.ref, 'refs/tags/v')
63-
runs-on: ubuntu-latest
64-
environment:
65-
name: PYPI_RELEASE
66-
url: https://pypi.org/project/httpmorph/
67-
permissions:
68-
contents: write
69-
id-token: write
70-
71-
steps:
72-
- uses: actions/checkout@v4
73-
74-
- name: Download wheels
75-
uses: actions/download-artifact@v4
76-
with:
77-
path: dist/
78-
pattern: wheels-*
79-
merge-multiple: false
80-
continue-on-error: true
81-
82-
- name: Flatten wheels and report build status
83-
run: |
84-
mkdir -p wheels
85-
86-
# Check which platforms built successfully
87-
echo "===================="
88-
echo "Build Status Report"
89-
echo "===================="
90-
91-
for platform in windows linux macos; do
92-
if [ -d "dist/wheels-$platform" ]; then
93-
wheel_count=$(find "dist/wheels-$platform" -name "*.whl" 2>/dev/null | wc -l)
94-
if [ "$wheel_count" -gt 0 ]; then
95-
echo "✅ $platform: $wheel_count wheels built"
96-
else
97-
echo "❌ $platform: No wheels found"
98-
fi
99-
else
100-
echo "❌ $platform: Build failed or artifacts missing"
101-
fi
102-
done
103-
104-
echo "===================="
105-
106-
# Flatten all available wheels
107-
find dist/ -name "*.whl" -exec cp {} wheels/ \; 2>/dev/null || true
108-
109-
# List wheels
110-
if [ -n "$(ls -A wheels/)" ]; then
111-
echo ""
112-
echo "Available wheels:"
113-
ls -lh wheels/
114-
echo ""
115-
echo "Total: $(ls wheels/*.whl 2>/dev/null | wc -l) wheels"
116-
else
117-
echo ""
118-
echo "⚠️ No wheels available for release"
119-
exit 1
120-
fi
121-
122-
- name: Create GitHub Release
123-
uses: softprops/action-gh-release@v1
124-
with:
125-
files: wheels/*.whl
126-
generate_release_notes: true
127-
env:
128-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
129-
130-
- name: Publish to PyPI
131-
env:
132-
TWINE_USERNAME: __token__
133-
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
134-
run: |
135-
pip install twine
136-
if [ -n "$TWINE_PASSWORD" ]; then
137-
echo "Publishing to PyPI..."
138-
twine upload wheels/*.whl --skip-existing --verbose
139-
else
140-
echo "⚠️ PYPI_API_TOKEN not set - skipping PyPI upload"
141-
echo "To publish to PyPI, add PYPI_API_TOKEN to the PYPI_RELEASE environment secrets"
142-
fi
143-
shell: bash
47+
# build-linux:
48+
# name: Build Linux Wheels
49+
# needs: [config, test]
50+
# if: always() && (needs.test.result == 'success' || needs.test.result == 'skipped')
51+
# uses: ./.github/workflows/_build_linux.yml
52+
53+
# build-macos:
54+
# name: Build macOS Wheels
55+
# needs: [config, test]
56+
# if: always() && (needs.test.result == 'success' || needs.test.result == 'skipped')
57+
# uses: ./.github/workflows/_build_macos.yml
58+
59+
# publish:
60+
# name: Publish Release
61+
# needs: [build-windows, build-linux, build-macos]
62+
# if: always() && startsWith(github.ref, 'refs/tags/v')
63+
# runs-on: ubuntu-latest
64+
# environment:
65+
# name: PYPI_RELEASE
66+
# url: https://pypi.org/project/httpmorph/
67+
# permissions:
68+
# contents: write
69+
# id-token: write
70+
71+
# steps:
72+
# - uses: actions/checkout@v4
73+
74+
# - name: Download wheels
75+
# uses: actions/download-artifact@v4
76+
# with:
77+
# path: dist/
78+
# pattern: wheels-*
79+
# merge-multiple: false
80+
# continue-on-error: true
81+
82+
# - name: Flatten wheels and report build status
83+
# run: |
84+
# mkdir -p wheels
85+
86+
# # Check which platforms built successfully
87+
# echo "===================="
88+
# echo "Build Status Report"
89+
# echo "===================="
90+
91+
# for platform in windows linux macos; do
92+
# if [ -d "dist/wheels-$platform" ]; then
93+
# wheel_count=$(find "dist/wheels-$platform" -name "*.whl" 2>/dev/null | wc -l)
94+
# if [ "$wheel_count" -gt 0 ]; then
95+
# echo "✅ $platform: $wheel_count wheels built"
96+
# else
97+
# echo "❌ $platform: No wheels found"
98+
# fi
99+
# else
100+
# echo "❌ $platform: Build failed or artifacts missing"
101+
# fi
102+
# done
103+
104+
# echo "===================="
105+
106+
# # Flatten all available wheels
107+
# find dist/ -name "*.whl" -exec cp {} wheels/ \; 2>/dev/null || true
108+
109+
# # List wheels
110+
# if [ -n "$(ls -A wheels/)" ]; then
111+
# echo ""
112+
# echo "Available wheels:"
113+
# ls -lh wheels/
114+
# echo ""
115+
# echo "Total: $(ls wheels/*.whl 2>/dev/null | wc -l) wheels"
116+
# else
117+
# echo ""
118+
# echo "⚠️ No wheels available for release"
119+
# exit 1
120+
# fi
121+
122+
# - name: Create GitHub Release
123+
# uses: softprops/action-gh-release@v1
124+
# with:
125+
# files: wheels/*.whl
126+
# generate_release_notes: true
127+
# env:
128+
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
129+
130+
# - name: Publish to PyPI
131+
# env:
132+
# TWINE_USERNAME: __token__
133+
# TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
134+
# run: |
135+
# pip install twine
136+
# if [ -n "$TWINE_PASSWORD" ]; then
137+
# echo "Publishing to PyPI..."
138+
# twine upload wheels/*.whl --skip-existing --verbose
139+
# else
140+
# echo "⚠️ PYPI_API_TOKEN not set - skipping PyPI upload"
141+
# echo "To publish to PyPI, add PYPI_API_TOKEN to the PYPI_RELEASE environment secrets"
142+
# fi
143+
# shell: bash

scripts/setup_vendors.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,11 +188,12 @@ if [ "$OS" = "Windows" ]; then
188188
cd build
189189

190190
# Use CMake for Windows build
191+
# Disable shared library and enable only static library
191192
cmake .. \
192193
-DCMAKE_BUILD_TYPE=Release \
193194
-DCMAKE_POSITION_INDEPENDENT_CODE=ON \
194-
-DBUILD_SHARED_LIBS=OFF \
195195
-DENABLE_LIB_ONLY=ON \
196+
-DENABLE_SHARED_LIB=OFF \
196197
-DENABLE_STATIC_LIB=ON
197198

198199
cmake --build . --config Release

setup.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -380,10 +380,12 @@ def get_library_paths():
380380
if IS_WINDOWS:
381381
# Use /TP to compile as C++ (required for BoringSSL compatibility on Windows)
382382
# Define WIN32, _WINDOWS, and OPENSSL_WINDOWS for proper BoringSSL compilation
383+
# Define NGHTTP2_STATICLIB to link against static nghttp2 library
383384
EXT_COMPILE_ARGS = [
384385
"/TP",
385386
"/O2",
386387
"/DHAVE_NGHTTP2",
388+
"/DNGHTTP2_STATICLIB",
387389
"/EHsc",
388390
"/DWIN32",
389391
"/D_WINDOWS",

0 commit comments

Comments
 (0)