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
68 changes: 20 additions & 48 deletions cpp/.github/workflows/build.yaml.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -30,53 +30,25 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: [{% if python_version_primary == "3.10" %}"3.10", {% endif %}{% if python_version_primary in ["3.10", "3.11"] %}"3.11", {% endif %}{% if python_version_primary in ["3.10", "3.11", "3.12"] %}"3.12", {% endif %}"3.13"]
cibuildwheel: [{% if python_version_primary == "3.10" %}"cp310", {% endif %}{% if python_version_primary in ["3.10", "3.11"] %}"cp311", {% endif %}{% if python_version_primary in ["3.10", "3.11", "3.12"] %}"cp312", {% endif %}"cp313"]
{% if python_version_primary != "3.13" -%}
exclude:
python:
{% if python_version_primary == "3.10" -%}
- python-version: "3.10"
cibuildwheel: "cp311"
- python-version: "3.10"
cibuildwheel: "cp312"
- python-version: "3.10"
cibuildwheel: "cp313"
{% endif -%}
{% if python_version_primary == "3.10" -%}
- python-version: "3.11"
cibuildwheel: "cp310"
{% endif -%}
{% if python_version_primary in ["3.10", "3.11"] -%}
- python-version: "3.11"
cibuildwheel: "cp312"
- python-version: "3.11"
cibuildwheel: "cp313"
{% endif -%}
{% if python_version_primary == "3.10" -%}
- python-version: "3.12"
- version: "3.10"
cibuildwheel: "cp310"
primary: true
{% endif -%}
{% if python_version_primary in ["3.10", "3.11"] -%}
- python-version: "3.12"
- version: "3.11"
cibuildwheel: "cp311"
primary: {{ (python_version_primary == "3.11") | lower }}
{% endif -%}
{% if python_version_primary in ["3.10", "3.11", "3.12"] -%}
- python-version: "3.12"
cibuildwheel: "cp313"
{% endif -%}
{% if python_version_primary == "3.10" -%}
- python-version: "3.13"
cibuildwheel: "cp310"
{% endif -%}
{% if python_version_primary in ["3.10", "3.11"] -%}
- python-version: "3.13"
cibuildwheel: "cp311"
{% endif -%}
{% if python_version_primary in ["3.10", "3.11", "3.12"] -%}
- python-version: "3.13"
- version: "3.12"
cibuildwheel: "cp312"
primary: {{ (python_version_primary == "3.12") | lower }}
{% endif -%}
{% endif -%}
- version: "3.13"
cibuildwheel: "cp313"
primary: {{ (python_version_primary == "3.13") | lower }}

steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
Expand All @@ -85,7 +57,7 @@ jobs:

- uses: actions-ext/python/setup@5f78fa2cadf4dad2a7cded3c72655bcdd3dda735
with:
version: {% raw %}${{ matrix.python-version }}{% endraw %}
version: {% raw %}${{ matrix.python.version }}{% endraw %}

- name: Install dependencies
run: make develop
Expand All @@ -100,27 +72,27 @@ jobs:

- name: Lint
run: make lint
if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.11'
if: matrix.os == 'ubuntu-latest' && matrix.python.primary

- name: Checks
run: make checks
if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.11'
if: matrix.os == 'ubuntu-latest' && matrix.python.primary

- name: Test
run: make coverage

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

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

- name: Upload coverage
uses: codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f # v7.0.0
Expand All @@ -137,7 +109,7 @@ jobs:
make dist-py-wheel
make dist-check
env:
CIBW_BUILD: {% raw %}"${{ matrix.cibuildwheel }}-manylinux*"{% endraw %}
CIBW_BUILD: {% raw %}"${{ matrix.python.cibuildwheel }}-manylinux*"{% endraw %}
CIBW_BUILD_VERBOSITY: 3
if: matrix.os == 'ubuntu-latest'

Expand All @@ -146,7 +118,7 @@ jobs:
rm -rf dist
make dist-py-wheel
env:
CIBW_BUILD: {% raw %}"${{ matrix.cibuildwheel }}-macos*"{% endraw %}
CIBW_BUILD: {% raw %}"${{ matrix.python.cibuildwheel }}-macos*"{% endraw %}
CIBW_BUILD_VERBOSITY: 3
if: matrix.os == 'macos-latest'

Expand All @@ -157,7 +129,7 @@ jobs:
make dist-py-wheel
shell: cmd
env:
CIBW_BUILD: {% raw %}"${{ matrix.cibuildwheel }}-win_amd64"{% endraw %}
CIBW_BUILD: {% raw %}"${{ matrix.python.cibuildwheel }}-win_amd64"{% endraw %}
CIBW_BEFORE_ALL: for /f "usebackq tokens=*" %i in (`vswhere -latest -products * -requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64 -property installationPath`) do call "%i\VC\Auxiliary\Build\vcvars64.bat"
if: matrix.os == 'windows-latest'

Expand All @@ -173,5 +145,5 @@ jobs:

- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: {% raw %}dist-${{matrix.os}}-${{matrix.python-version}}{% endraw %}
name: {% raw %}dist-${{matrix.os}}-${{matrix.python.version}}{% endraw %}
path: dist
4 changes: 2 additions & 2 deletions cppjswasm/.github/workflows/build.yaml.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -76,13 +76,13 @@ jobs:
with:
name: {% raw %}test-results-${{ matrix.os }}-${{ matrix.python-version }}{% endraw %}
path: junit.xml
if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.11'
if: matrix.os == 'ubuntu-latest'

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

- name: Upload coverage
uses: codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f # v7.0.0
Expand Down
Loading