diff --git a/.github/workflows/dist.yml b/.github/workflows/dist.yml index e45c2683..16a45ab1 100644 --- a/.github/workflows/dist.yml +++ b/.github/workflows/dist.yml @@ -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" @@ -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' @@ -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 @@ -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' @@ -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 @@ -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 + build_arg: '--buildtype=debug' 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 @@ -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 - with: - version: "v0.12.0" + uses: mozilla-actions/sccache-action@v0.0.10 - name: Install deps run: | @@ -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 }} @@ -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 @@ -296,7 +303,7 @@ jobs: image: "${{ matrix.os.container }}" steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 with: fetch-depth: 0 @@ -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 @@ -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 @@ -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 @@ -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/ @@ -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/ @@ -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/ @@ -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/ diff --git a/devtools/ci.py b/devtools/ci.py index f688c1ac..ebabebb8 100644 --- a/devtools/ci.py +++ b/devtools/ci.py @@ -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. @@ -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 @@ -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(): @@ -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: diff --git a/devtools/subproject.py b/devtools/subproject.py index ec64865c..a9014370 100644 --- a/devtools/subproject.py +++ b/devtools/subproject.py @@ -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, )