Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 31 additions & 27 deletions cpp/.github/workflows/build.yaml.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -84,33 +84,6 @@ jobs:
run: make checks
if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.11'

- name: Install build dependencies
run: pip install cibuildwheel

- name: Build (Linux)
run: make build-cibw
env:
CIBW_BUILD: {% raw %}"${{ matrix.cibuildwheel }}-manylinux*"{% endraw %}
CIBW_BUILD_VERBOSITY: 3
if: matrix.os == 'ubuntu-latest'

- name: Build (Macos)
run: make build-cibw
env:
CIBW_BUILD: {% raw %}"${{ matrix.cibuildwheel }}-macos*"{% endraw %}
CIBW_BUILD_VERBOSITY: 3
if: matrix.os == 'macos-latest'

- name: Build (Windows)
run: |
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
make build-cibw
shell: cmd
env:
CIBW_BUILD: {% raw %}"${{ matrix.cibuildwheel }}-win_amd64"{% endraw %}
CIBW_BEFORE_ALL: call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
if: matrix.os == 'windows-latest'

- name: Test
run: make coverage

Expand All @@ -132,6 +105,37 @@ jobs:
with:
token: {% raw %}${{ secrets.CODECOV_TOKEN }}{% endraw %}

- name: Install build dependencies
run: pip install cibuildwheel

- name: Make dist (Linux)
run: |
make dist-py-sdist
make dist-py-wheel
make dist-check
env:
CIBW_BUILD: {% raw %}"${{ matrix.cibuildwheel }}-manylinux*"{% endraw %}
CIBW_BUILD_VERBOSITY: 3
if: matrix.os == 'ubuntu-latest'

- name: Make dist (Macos)
run: |
make dist-py-wheel
env:
CIBW_BUILD: {% raw %}"${{ matrix.cibuildwheel }}-macos*"{% endraw %}
CIBW_BUILD_VERBOSITY: 3
if: matrix.os == 'macos-latest'

- name: Make dist (Windows)
run: |
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
make dist-py-wheel
shell: cmd
env:
CIBW_BUILD: {% raw %}"${{ matrix.cibuildwheel }}-win_amd64"{% endraw %}
CIBW_BEFORE_ALL: call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
if: matrix.os == 'windows-latest'

- uses: actions/upload-artifact@v7
with:
name: {% raw %}dist-${{matrix.os}}-${{matrix.python-version}}{% endraw %}
Expand Down
14 changes: 7 additions & 7 deletions cpp/Makefile.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,6 @@ build-py:
build-cpp:
python -m hatchling build --hooks-only

build-cibw:
python -m cibuildwheel --output-dir dist

build: build-cpp build-py ## build the project

.PHONY: install
Expand Down Expand Up @@ -114,15 +111,18 @@ major: ## bump a major version
########
# DIST #
########
.PHONY: dist dist-py dist-check publish
.PHONY: dist-py-wheel dist-py-sdist dist-check dist publish

dist-py-wheel: ## build python wheel
python -m cibuildwheel --output-dir dist

dist-py: ## build python dists
python -m build -w -s
dist-py-sdist: ## build python sdist
python -m build --sdist -o dist

dist-check: ## run python dist checker with twine
python -m twine check dist/*

dist: clean build dist-js dist-py dist-check ## build all dists
dist: clean build dist-py-wheel dist-py-sdist dist-check ## build all dists

publish: dist ## publish python assets

Expand Down
39 changes: 22 additions & 17 deletions cppjswasm/.github/workflows/build.yaml.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -66,54 +66,59 @@ jobs:
run: make checks
if: matrix.os == 'ubuntu-latest'

- name: Build
run: make build

- name: Test
run: make coverage

- name: Upload test results (Python)
uses: actions/upload-artifact@v7
with:
name: {% raw %}test-results-${{ matrix.os }}-${{ matrix.python-version }}{% endraw %}
path: '**/junit.xml'
if: matrix.os == 'ubuntu-latest'
path: junit.xml
if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.11'

- name: Publish Unit Test Results
uses: EnricoMi/publish-unit-test-result-action@v2
with:
files: '**/junit.xml'
if: matrix.os == 'ubuntu-latest'
if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.11'

- name: Upload coverage
uses: codecov/codecov-action@v6
with:
token: {% raw %}${{ secrets.CODECOV_TOKEN }}{% endraw %}

- name: Set up QEMU
uses: docker/setup-qemu-action@v4
with:
platforms: all
if: runner.os == 'Linux' && runner.arch == 'X64'
- name: Install build dependencies
run: pip install cibuildwheel

- name: Make dist
- name: Make dist (Linux)
run: |
make dist-py-sdist
make dist-py-wheel
make dist-check
env:
CIBW_BUILD: {% raw %}"${{ matrix.cibuildwheel }}-manylinux*"{% endraw %}
CIBW_BUILD_VERBOSITY: 3
if: matrix.os == 'ubuntu-latest'

- name: Make dist
- name: Make dist (Macos)
run: |
make dist-py-wheel
make dist-check
env:
CIBW_ENVIRONMENT_MACOS: MACOSX_DEPLOYMENT_TARGET=11.0
if: matrix.os != 'ubuntu-latest'
CIBW_BUILD: {% raw %}"${{ matrix.cibuildwheel }}-macos*"{% endraw %}
CIBW_BUILD_VERBOSITY: 3
if: matrix.os == 'macos-latest'

- name: Make dist (Windows)
run: |
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
make dist-py-wheel
shell: cmd
env:
CIBW_BUILD: {% raw %}"${{ matrix.cibuildwheel }}-win_amd64"{% endraw %}
CIBW_BEFORE_ALL: call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
if: matrix.os == 'windows-latest'

- uses: actions/upload-artifact@v7
with:
name: {% raw %}dist-${{matrix.os}}{% endraw %}
name: {% raw %}dist-${{matrix.os}}-${{matrix.python-version}}{% endraw %}
path: dist
4 changes: 2 additions & 2 deletions rust/.github/workflows/build.yaml.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -81,15 +81,15 @@ jobs:
platforms: all
if: runner.os == 'Linux' && runner.arch == 'X64'

- name: Make dist
- name: Make dist (Linux)
run: |
make dist-rs
make dist-py-sdist
make dist-py-wheel
make dist-check
if: matrix.os == 'ubuntu-latest'

- name: Make dist
- name: Make dist (Macos / Windows)
run: |
make dist-py-wheel
make dist-check
Expand Down
4 changes: 2 additions & 2 deletions rustjswasm/.github/workflows/build.yaml.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ jobs:
platforms: all
if: runner.os == 'Linux' && runner.arch == 'X64'

- name: Make dist
- name: Make dist (Linux)
run: |
make dist-rs
make dist-py-sdist
Expand All @@ -98,7 +98,7 @@ jobs:
CIBW_BUILD: {% raw %}"${{ matrix.cibuildwheel }}-manylinux*"{% endraw %}
if: matrix.os == 'ubuntu-latest'

- name: Make dist
- name: Make dist (Macos / Windows)
run: |
make dist-py-wheel
make dist-check
Expand Down
Loading