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
22 changes: 0 additions & 22 deletions .github/actions/build-conda-packages/action.yaml

This file was deleted.

20 changes: 0 additions & 20 deletions .github/actions/build-java-runtime/action.yaml

This file was deleted.

20 changes: 0 additions & 20 deletions .github/actions/build-python-wheel/action.yaml

This file was deleted.

15 changes: 0 additions & 15 deletions .github/actions/install-java-runtime/action.yaml

This file was deleted.

50 changes: 50 additions & 0 deletions .github/workflows/actions.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# This file is machine-generated by `gh actions-lock`.
# Do not edit by hand; run `gh actions-lock` to update.
# Docs: https://gh.io/actions-lockfile
version: 'v0.0.3'
workflows:
'.github/workflows/ci.yaml':
- 'actions/checkout@v7.0.1'
- 'actions/download-artifact@v8.0.2'
- 'actions/setup-java@v6.2.0'
- 'actions/upload-artifact@v7.0.2'
- 'astral-sh/attest-action@v0.0.7'
- 'astral-sh/setup-uv@v10.3.3'
dependencies:
'actions/checkout@v7.0.1':
ref: 'v7.0.1'
commit: 'sha1-3d3c42e5aac5ba805825da76410c181273ba90b1'
owner_id: 44036562
repo_id: 197814629
'actions/download-artifact@v8.0.2':
ref: 'v8.0.2'
commit: 'sha1-9000827ccba6bdab643e8b6fd33ac0654aef8333'
owner_id: 44036562
repo_id: 192626254
'actions/setup-java@v6.2.0':
ref: 'v6.2.0'
commit: 'sha1-77dd5b2ce225ea11469928ac317850245a74ae78'
owner_id: 44036562
repo_id: 196057608
'actions/upload-artifact@v7.0.2':
ref: 'v7.0.2'
commit: 'sha1-cf430e030ddbb5b0abf93d22962f4752f3646cd9'
owner_id: 44036562
repo_id: 192625955
'astral-sh/attest-action@v0.0.7':
ref: 'v0.0.7'
commit: 'sha1-39b6ce43875c196a579e31635b11aa2a2036384a'
owner_id: 115962839
repo_id: 1101470881
uses:
- 'astral-sh/setup-uv@c18668ad3cf93ea998bef934396af7bb5c839dc7'
'astral-sh/setup-uv@c18668ad3cf93ea998bef934396af7bb5c839dc7':
ref: 'v10.2.0'
commit: 'sha1-c18668ad3cf93ea998bef934396af7bb5c839dc7'
owner_id: 115962839
repo_id: 846733598
'astral-sh/setup-uv@v10.3.3':
ref: 'v10.3.3'
commit: 'sha1-68559e99cc807c1eb7e9238fd43a15bba460eec2'
owner_id: 115962839
repo_id: 846733598
116 changes: 116 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
on:
pull_request:
push:
branches:
- main

defaults:
run:
shell: bash

permissions:
contents: read

jobs:
prek:
if: github.event_name == 'pull_request'
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v7.0.1
with:
persist-credentials: false
- uses: astral-sh/setup-uv@v10.3.3
with:
version-file: pyproject.toml
- run: uv run prek run --all-files --show-diff-on-failure

build:
name: Build on ${{ matrix.runner }}
strategy:
fail-fast: false
matrix:
# Each platform tag is the oldest platform the Temurin binaries run on.
# - On Linux, they need at most glibc 2.17.
# - On macOS, they need at most macOS 11.0.
#
# Checked on Temurin 25.0.5.
include:
- runner: macos-15-intel
platform-tag: macosx_11_0_x86_64
- runner: macos-26
platform-tag: macosx_11_0_arm64
- runner: ubuntu-24.04
platform-tag: manylinux_2_17_x86_64
- runner: ubuntu-24.04-arm
platform-tag: manylinux_2_17_aarch64
- runner: windows-2025
platform-tag: win_amd64
runs-on: ${{ matrix.runner }}
steps:
- uses: actions/checkout@v7.0.1
with:
persist-credentials: false
- uses: astral-sh/setup-uv@v10.3.3
with:
version-file: pyproject.toml

- id: get-java-version
run: |
uv run python - >> "$GITHUB_OUTPUT" <<'EOF'
from jdk4py import JAVA_VERSION

version = ".".join(str(number) for number in JAVA_VERSION)
print(f"version={version}")
EOF
- uses: actions/setup-java@v6.2.0
with:
distribution: temurin
java-version: ${{ steps.get-java-version.outputs.version }}
- run: uv run python build_java_runtime.py

- if: github.event_name == 'pull_request'
run: uv run pytest

# Replace these two steps with `uv build --wheel` and a platform tag option once https://github.com/astral-sh/uv/issues/14827 is closed.
- run: uv build --wheel
- run: uv run python -m wheel tags --platform-tag "$PLATFORM_TAG" --remove dist/*-py3-none-any.whl
env:
PLATFORM_TAG: ${{ matrix.platform-tag }}

# Run the README command with the built wheel.
# uv refuses to install a wheel tagged for another platform, so this also fails if the matrix pairs a runner with the wrong tag.
- run: uvx --from dist/jdk4py-*.whl jdk4py java -version

- uses: actions/upload-artifact@v7.0.2
with:
if-no-files-found: error
name: jdk4py-${{ runner.os }}-${{ runner.arch }}
path: dist/jdk4py-*.whl

publish:
if: github.event_name == 'push'
needs: build
# The file name and this environment are registered as this project's trusted publisher on PyPI.
environment: pypi
runs-on: ubuntu-24.04
permissions:
contents: read
# Attestations and trusted publishing.
id-token: write
steps:
- uses: actions/checkout@v7.0.1
with:
persist-credentials: false

- uses: actions/download-artifact@v8.0.2
with:
merge-multiple: true
path: dist/
pattern: jdk4py-*

- uses: astral-sh/setup-uv@v10.3.3
with:
version-file: pyproject.toml

- uses: astral-sh/attest-action@v0.0.7
- run: uv publish
18 changes: 0 additions & 18 deletions .github/workflows/cross-platform-build.yaml

This file was deleted.

50 changes: 0 additions & 50 deletions .github/workflows/platform-specific-build.yaml

This file was deleted.

47 changes: 0 additions & 47 deletions .github/workflows/publish.yaml

This file was deleted.

20 changes: 0 additions & 20 deletions .github/workflows/test.yaml

This file was deleted.

1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
.venv/
__pycache__/
build/
dist/
java-runtime/
Loading
Loading