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
69 changes: 38 additions & 31 deletions .github/workflows/dist.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,10 @@ jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
- uses: psf/black@stable

- uses: actions/setup-python@v5
- uses: actions/setup-python@v6
with:
python-version: "3.13"

Expand All @@ -77,12 +77,12 @@ jobs:
build-pure:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
with:
fetch-depth: 0

- name: Install python
uses: actions/setup-python@v5
uses: actions/setup-python@v6
with:
python-version: '3.13'

Expand All @@ -96,7 +96,7 @@ jobs:
run: |
./rdev.sh ci build-pure-wheels

- uses: actions/upload-artifact@v4
- uses: actions/upload-artifact@v7
with:
name: "pypi-pure"
path: dist
Expand All @@ -120,13 +120,13 @@ jobs:
container: ${{ matrix.container }}

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
with:
fetch-depth: 0

- name: Install python
if: matrix.os != 'ubuntu-24.04-arm'
uses: actions/setup-python@v5
uses: actions/setup-python@v6
with:
python-version: '3.13'

Expand All @@ -140,7 +140,7 @@ jobs:
run: |
./rdev.sh ci build-other-wheels

- uses: actions/upload-artifact@v4
- uses: actions/upload-artifact@v7
with:
name: "pypi-other-${{ runner.os }}-${{ runner.arch }}"
path: dist
Expand All @@ -166,40 +166,50 @@ jobs:
- '3.12'
- '3.13'
- '3.14'
publish:
- true
include:
- os: ubuntu-24.04-arm
python_version: '3.11'
publish: true
container: python:3.11-bookworm
- os: ubuntu-24.04-arm
python_version: '3.12'
publish: true
container: python:3.12-bookworm
- os: ubuntu-24.04-arm
python_version: '3.13'
publish: true
container: python:3.13-bookworm
- os: ubuntu-24.04-arm
python_version: '3.14'
publish: true
container: python:3.14-bookworm
- os: ubuntu-24.04
python_version: '3.14'
publish: false
Comment thread
virtuald marked this conversation as resolved.
build_arg: '--buildtype=debug'

@auscompgeek auscompgeek Jun 7, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thinking aloud, should we maybe make a non-empty build_arg mean publish: false? then we can get rid of that new variable in the matrix


container: ${{ matrix.container }}

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
with:
fetch-depth: 0

- name: Install python
if: matrix.os != 'ubuntu-24.04-arm'
uses: actions/setup-python@v5
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python_version }}

- uses: actions/download-artifact@v4
- uses: actions/download-artifact@v8
with:
pattern: "pypi-other-${{ runner.os }}-*"
path: dist-other
merge-multiple: true

- uses: actions/download-artifact@v4
- uses: actions/download-artifact@v8
with:
pattern: "pypi-pure"
path: dist-other
Expand Down Expand Up @@ -234,11 +244,7 @@ jobs:
fi

- name: Setup sccache
uses: mozilla-actions/sccache-action@v0.0.9
# The sccache 0.13.0 release is missing intel mac builds
# see <https://github.com/mozilla/sccache/issues/2554>
with:
version: "v0.12.0"
uses: mozilla-actions/sccache-action@v0.0.10

- name: Install deps
run: |
Expand All @@ -250,7 +256,7 @@ jobs:

- name: Build + test wheels
run: |
python -m devtools ci build-meson-wheels
python -m devtools ci build-meson-wheels ${{ matrix.build_arg }}
env:
SCCACHE_WEBDAV_USERNAME: ${{ secrets.WPI_ARTIFACTORY_USERNAME }}
SCCACHE_WEBDAV_PASSWORD: ${{ secrets.WPI_ARTIFACTORY_TOKEN }}
Expand All @@ -273,10 +279,11 @@ jobs:
run: |
python -m devtools ci update-yaml

- uses: actions/upload-artifact@v4
- uses: actions/upload-artifact@v7
with:
name: "pypi-meson-${{ runner.os }}-${{ runner.arch }}-${{ matrix.python_version }}"
path: dist
if: matrix.publish

#
# Build robot/raspbian wheels
Expand All @@ -296,7 +303,7 @@ jobs:
image: "${{ matrix.os.container }}"

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
with:
fetch-depth: 0

Expand All @@ -313,7 +320,7 @@ jobs:
run: |
/build/venv/bin/cross-python -m devtools ci build-other-wheels --no-test

- uses: actions/upload-artifact@v4
- uses: actions/upload-artifact@v7
with:
name: cross-other-${{ matrix.os.name }}
path: dist
Expand All @@ -333,11 +340,11 @@ jobs:
image: "${{ matrix.os.container }}"

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
with:
fetch-depth: 0

- uses: actions/download-artifact@v4
- uses: actions/download-artifact@v8
with:
name: "cross-other-${{ matrix.os.base }}"
path: dist-other
Expand All @@ -363,7 +370,7 @@ jobs:
/build/venv/bin/cross-python -m devtools ci build-meson-wheels --no-test --cross=cross.txt


- uses: actions/upload-artifact@v4
- uses: actions/upload-artifact@v7
with:
name: cross-meson-${{ matrix.os.name }}
path: dist
Expand All @@ -378,7 +385,7 @@ jobs:
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')

steps:
- uses: actions/download-artifact@v4
- uses: actions/download-artifact@v8
with:
pattern: cross-meson-*
path: dist/
Expand All @@ -397,7 +404,7 @@ jobs:
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')

steps:
- uses: actions/download-artifact@v4
- uses: actions/download-artifact@v8
with:
pattern: cross-other-*
path: dist/
Expand All @@ -419,17 +426,17 @@ jobs:
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
with:
fetch-depth: 0

- uses: actions/download-artifact@v4
- uses: actions/download-artifact@v8
with:
pattern: pypi-meson-*
path: dist/
merge-multiple: true

- uses: actions/download-artifact@v4
- uses: actions/download-artifact@v8
with:
pattern: pypi-pure
path: dist/
Expand All @@ -448,11 +455,11 @@ jobs:
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
with:
fetch-depth: 0

- uses: actions/download-artifact@v4
- uses: actions/download-artifact@v8
with:
pattern: pypi-other-*
path: dist/
Expand Down
13 changes: 10 additions & 3 deletions devtools/ci.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,11 @@ def build_other_wheels(ctx: Context, no_test: bool):
"--cross",
help="meson cross.txt file (installed at ~/.local/share/meson/cross/FILENAME)",
)
@click.option("--buildtype", help="meson build type (debug, release, etc)")
@click.pass_obj
def build_meson_wheels(ctx: Context, no_test: bool, cross: T.Optional[str]):
def build_meson_wheels(
ctx: Context, no_test: bool, cross: T.Optional[str], buildtype: T.Optional[str]
):
"""
Builds wheels that use meson, runs tests.

Expand All @@ -114,6 +117,9 @@ def build_meson_wheels(ctx: Context, no_test: bool, cross: T.Optional[str]):
if cross:
config_settings.append(f"setup-args=--cross-file={cross}")

if buildtype:
config_settings.append(f"setup-args=-Dbuildtype={buildtype}")

for project in ctx.subprojects.values():
if not project.is_meson_project():
continue
Expand Down Expand Up @@ -183,8 +189,9 @@ def scan_headers(ctx: Context):


@ci.command()
@click.option("--write", default=False, is_flag=True)
@click.pass_obj
def update_yaml(ctx: Context):
def update_yaml(ctx: Context, write: bool):
"""Run update-yaml on all projects"""
failed_subprojects = 0
for project in ctx.subprojects.values():
Expand All @@ -193,7 +200,7 @@ def update_yaml(ctx: Context):
print("- Skipping", project.name, file=sys.stderr)
continue

if not project.update_yaml():
if not project.update_yaml(write):
failed_subprojects += 1

if failed_subprojects != 0:
Expand Down
6 changes: 4 additions & 2 deletions devtools/subproject.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,14 +82,16 @@ def scan_headers(self):
)
return result.returncode == 0

def update_yaml(self):
def update_yaml(self, write: bool):
"""Resyncs the yaml files with their header files"""
args = ["--write"] if write else []

result = run_cmd(
self.ctx.python,
"-m",
"semiwrap",
"update-yaml",
"--write",
*args,
cwd=self.path,
check=False,
)
Expand Down
Loading