Skip to content

Commit

Permalink
fixup! Add support for Linux and Windows Arm64
Browse files Browse the repository at this point in the history
  • Loading branch information
tibdex committed Aug 30, 2024
1 parent d2306dd commit dbddcba
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 10 deletions.
8 changes: 8 additions & 0 deletions .github/actions/build-python-wheel/action.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,15 @@
name: Build Python wheel
description: Build the Python wheel
outputs:
filename:
description: The name of the built Python wheel.
value: ${{ steps.get-filename.outputs.filename }}
runs:
using: "composite"
steps:
- run: uv run python -m build --installer uv --wheel
shell: bash

- id: get-filename
run: uv run python -c 'from pathlib import Path; print(f"""filename={next(Path("dist").glob("jdk4py-*.whl")).parts[1]}""")' >> "$GITHUB_OUTPUT"
shell: bash
8 changes: 5 additions & 3 deletions .github/workflows/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ jobs:
with:
python-version: "3.12"

- uses: ./.github/actions/build-python-wheel
- id: build-python-wheel
uses: ./.github/actions/build-python-wheel

- id: build-conda-packages
uses: ./.github/actions/build-conda-packages
Expand All @@ -46,6 +47,7 @@ jobs:

- name: Upload Python wheel
env:
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
run: uv run twine upload dist/jdk4py-*.whl --username __token__ --password "$PYPI_TOKEN"
JDK4PY_PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
JDK4PY_WHEEL_FILENAME: ${{ steps.build-python-wheel.outputs.filename }}
run: uv run twine upload dist/"$JDK4PY_WHEEL_FILENAME" --username __token__ --password "$JDK4PY_PYPI_TOKEN"
shell: bash
9 changes: 5 additions & 4 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ jobs:

- uses: ./.github/actions/build-java-runtime

- uses: ./.github/actions/build-python-wheel
- id: build-python-wheel
uses: ./.github/actions/build-python-wheel

# No need to test each platform and Python version.
- if: ${{ matrix.runner == 'ubuntu-24.04' && matrix.python == '3.12' }}
Expand All @@ -50,8 +51,8 @@ jobs:
uses: actions/upload-artifact@v4
with:
if-no-files-found: error
name: jdk4py-${{ runner.os }}-${{ runner.arch }}.whl
path: dist/jdk4py-*.whl
name: ${{ steps.build-python-wheel.outputs.filename }}
path: dist/${{ steps.build-python-wheel.outputs.filename }}

conda-package:
runs-on: ${{ matrix.runner }}
Expand Down Expand Up @@ -79,5 +80,5 @@ jobs:
- uses: actions/upload-artifact@v4
with:
if-no-files-found: error
name: jdk4py-${{ runner.os }}-${{ runner.arch }}-conda-packages
name: jdk4py-${{ steps.build-conda-packages.outputs.platform }}-conda-packages
path: dist/${{ steps.build-conda-packages.outputs.platform }}/jdk4py-*.tar.bz2
6 changes: 3 additions & 3 deletions conda.recipe/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
{% set version = load_file_data("src/jdk4py/version.json") %}

package:
name: {{ pyproject['project']['name'] }}
name: {{ pyproject.project.name }}
version: {{ version}}

source:
Expand Down Expand Up @@ -33,10 +33,10 @@ test:
- pytest

about:
dev_url: {{ pyproject['project']['urls']['Repository'] }}
dev_url: {{ pyproject.project.urls.Repository }}
license: GNU General Public License v2.0
license_file: LICENSE
summary: {{ pyproject['project']['description'] }}
summary: {{ pyproject.project.description }}

extra:
recipe-maintainers:
Expand Down
3 changes: 3 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ warn_redundant_casts = true
warn_unused_configs = true
warn_unused_ignores = true

[tool.pytest.ini_options]
filterwarnings = ["error"]

[tool.ruff.lint]
ignore = [
"D100",
Expand Down

0 comments on commit dbddcba

Please sign in to comment.