From 8d904bd0894abfa6d7b98b042a0293d3cdb8072c Mon Sep 17 00:00:00 2001 From: Nicholas Bollweg Date: Sat, 7 Jun 2025 08:59:10 -0500 Subject: [PATCH 1/4] try python in ci --- .github/workflows/python.yml | 36 +++++++++++++++++++++++++++++++++--- .gitignore | 6 +++++- 2 files changed, 38 insertions(+), 4 deletions(-) diff --git a/.github/workflows/python.yml b/.github/workflows/python.yml index 9fbd135a..5b5eef05 100644 --- a/.github/workflows/python.yml +++ b/.github/workflows/python.yml @@ -1,6 +1,8 @@ name: Python on: + push: + pull_request: release: types: - published @@ -12,6 +14,7 @@ jobs: linux: runs-on: ubuntu-latest strategy: + fail-fast: false matrix: python-version: [ 3.12 ] target: [ x86_64, aarch64 ] @@ -54,10 +57,17 @@ jobs: with: name: wheels-linux-${{ matrix.target }} path: python/dist - + + - name: Install Built Wheel + run: python3 -m pip install -vv pyrudof --find-links=python/dist --no-index + + - name: Test Built Wheel + run: cd python/tests && python3 -m unittest -vvv discover + windows: runs-on: Windows-2022 strategy: + fail-fast: false matrix: python-version: [ 3.12 ] target: [ x64, x86 ] @@ -76,16 +86,23 @@ jobs: target: ${{ matrix.target }} args: --release --out dist --interpreter ${{ matrix.python-version }} sccache: 'true' - + - name: Upload wheels uses: actions/upload-artifact@v4 with: name: wheels-windows-${{ matrix.target }} path: python/dist + - name: Install Built Wheel + run: python3 -m pip install -vv pyrudof --find-links=python/dist --no-index + + - name: Test Built Wheel + run: cd python/tests && python3 -m unittest -vvv discover + macos: runs-on: macos-latest strategy: + fail-fast: false matrix: python-version: [ 3.12 ] target: [ x86_64, aarch64 ] @@ -111,6 +128,12 @@ jobs: name: wheels-macos-${{ matrix.target }} path: python/dist + - name: Install Built Wheel + run: python3 -m pip install -vv pyrudof --find-links=python/dist --no-index + + - name: Test Built Wheel + run: cd python/tests && python3 -m unittest -vvv discover + sdist: runs-on: ubuntu-latest steps: @@ -129,13 +152,20 @@ jobs: name: wheels path: python/dist + - name: Install Built sdist + run: python3 -m pip install -vv pyrudof --find-links=python/dist --no-index + + - name: Test Built sdist + run: cd python/tests && python3 -m unittest -vvv discover + release: name: Release + if: github.event.action == 'published' runs-on: ubuntu-latest needs: [linux, windows, macos, sdist] steps: - uses: actions/download-artifact@v4 - with: + with: pattern: wheels-* merge-multiple: true - name: List artifacts diff --git a/.gitignore b/.gitignore index 1d7ee872..d8a4f5a6 100644 --- a/.gitignore +++ b/.gitignore @@ -21,4 +21,8 @@ Cargo.lock .idea/ # Ignore virtual environments from the Python bindings -.venv \ No newline at end of file +.venv + +# python +__pycache__/ +dist/ From 6d59b858e07e874e7706d3c6be7a80f16edf9588 Mon Sep 17 00:00:00 2001 From: Nicholas Bollweg Date: Sat, 7 Jun 2025 09:53:18 -0500 Subject: [PATCH 2/4] more unittest --- .github/workflows/python.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/python.yml b/.github/workflows/python.yml index 5b5eef05..152397aa 100644 --- a/.github/workflows/python.yml +++ b/.github/workflows/python.yml @@ -62,7 +62,7 @@ jobs: run: python3 -m pip install -vv pyrudof --find-links=python/dist --no-index - name: Test Built Wheel - run: cd python/tests && python3 -m unittest -vvv discover + run: cd python/tests && python3 -m unittest discover -vvv windows: runs-on: Windows-2022 @@ -97,7 +97,7 @@ jobs: run: python3 -m pip install -vv pyrudof --find-links=python/dist --no-index - name: Test Built Wheel - run: cd python/tests && python3 -m unittest -vvv discover + run: cd python/tests && python3 -m unittest discover -vvv macos: runs-on: macos-latest @@ -132,7 +132,7 @@ jobs: run: python3 -m pip install -vv pyrudof --find-links=python/dist --no-index - name: Test Built Wheel - run: cd python/tests && python3 -m unittest -vvv discover + run: cd python/tests && python3 -m unittest discover -vvv sdist: runs-on: ubuntu-latest @@ -156,7 +156,7 @@ jobs: run: python3 -m pip install -vv pyrudof --find-links=python/dist --no-index - name: Test Built sdist - run: cd python/tests && python3 -m unittest -vvv discover + run: cd python/tests && python3 -m unittest discover -vvv release: name: Release From 3cf34c2fb1107480ca46069f862468471db03398 Mon Sep 17 00:00:00 2001 From: Nicholas Bollweg Date: Sat, 7 Jun 2025 09:56:55 -0500 Subject: [PATCH 3/4] matrix macos vm --- .github/workflows/python.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/python.yml b/.github/workflows/python.yml index 152397aa..9867ac4b 100644 --- a/.github/workflows/python.yml +++ b/.github/workflows/python.yml @@ -100,12 +100,17 @@ jobs: run: cd python/tests && python3 -m unittest discover -vvv macos: - runs-on: macos-latest + runs-on: ${{ matrix.vm }} strategy: fail-fast: false matrix: python-version: [ 3.12 ] - target: [ x86_64, aarch64 ] + target: [x86_64, aarch64] + include: + - target: x86_64 + vm: macos-13 + - target: aarch64 + vm: macos-latest steps: - uses: actions/checkout@v4 From 4dedf931f738d742f5553cbb0e5c61179895544e Mon Sep 17 00:00:00 2001 From: Nicholas Bollweg Date: Sat, 7 Jun 2025 10:03:50 -0500 Subject: [PATCH 4/4] matrix linux vm --- .github/workflows/python.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/python.yml b/.github/workflows/python.yml index 9867ac4b..986f1cd8 100644 --- a/.github/workflows/python.yml +++ b/.github/workflows/python.yml @@ -12,12 +12,17 @@ permissions: jobs: linux: - runs-on: ubuntu-latest + runs-on: ${{ matrix.vm }} strategy: fail-fast: false matrix: python-version: [ 3.12 ] target: [ x86_64, aarch64 ] + include: + - target: x86_64 + vm: ubuntu-latest + - target: aarch64 + vm: ubuntu-24.04-arm steps: - uses: actions/checkout@v4