From 0a2d8c7f120f96603bcf51240a0794daad468a54 Mon Sep 17 00:00:00 2001 From: alemi Date: Mon, 9 Sep 2024 22:57:26 +0200 Subject: [PATCH] ci(py): enable macos build, cwd for publish --- .github/workflows/python.yml | 62 +++++++++++++++++++----------------- 1 file changed, 33 insertions(+), 29 deletions(-) diff --git a/.github/workflows/python.yml b/.github/workflows/python.yml index 30c2035..68a5d4a 100644 --- a/.github/workflows/python.yml +++ b/.github/workflows/python.yml @@ -112,34 +112,34 @@ jobs: name: codemp-py-windows-${{ matrix.platform.target }} path: dist/py - #macos: - # runs-on: ${{ matrix.platform.runner }} - # strategy: - # matrix: - # platform: - # #- runner: macos-12 - # # target: x86_64 - # - runner: macos-14 - # target: aarch64 - # steps: - # - uses: actions/checkout@v4 - # - uses: arduino/setup-protoc@v3 - # - uses: actions/setup-python@v5 - # with: - # python-version: 3.x - # - name: Build wheels - # uses: PyO3/maturin-action@v1 - # with: - # working-directory: dist/py - # target: ${{ matrix.platform.target }} - # container: 'off' - # args: --release --out . - # sccache: 'true' - # - name: Upload wheels - # uses: actions/upload-artifact@v4 - # with: - # name: codemp-py-macos-${{ matrix.platform.target }} - # path: dist/py + macos: + runs-on: ${{ matrix.platform.runner }} + strategy: + matrix: + platform: + #- runner: macos-12 + # target: x86_64 + - runner: macos-14 + target: aarch64 + steps: + - uses: actions/checkout@v4 + - uses: arduino/setup-protoc@v3 + - uses: actions/setup-python@v5 + with: + python-version: 3.x + - name: Build wheels + uses: PyO3/maturin-action@v1 + with: + working-directory: dist/py + target: ${{ matrix.platform.target }} + container: 'off' + args: --release --out . + sccache: 'true' + - name: Upload wheels + uses: actions/upload-artifact@v4 + with: + name: codemp-py-macos-${{ matrix.platform.target }} + path: dist/py sdist: runs-on: ubuntu-latest @@ -159,14 +159,18 @@ jobs: release: runs-on: ubuntu-latest - needs: [linux, windows, sdist] + needs: [linux, windows, macos, sdist] steps: - uses: actions/download-artifact@v4 with: pattern: codemp-py-* + path: dist/py/wheels + - run: tree + working-directory: dist/py - uses: PyO3/maturin-action@v1 env: MATURIN_PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }} with: + working-directory: dist/py command: upload args: --non-interactive --skip-existing codemp-py-*/*