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
36 changes: 4 additions & 32 deletions .github/workflows/desktop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -151,26 +151,15 @@ jobs:
python-multiplatform-compose/fixtures/notebook-e2e/build/reports/tests/desktopTest
python-multiplatform-compose/fixtures/notebook-e2e/build/test-results/desktopTest

# The notebook E2E in a GraalVM native image on macOS (#249, #251). It takes `ui`, `ui-text` and
# `foundation` from compose-multiplatform-core-extended, which a runner reads from the fork's GitHub
# Packages registry; until the repository variable COMPOSE_EXTENDED_VERSION names a published
# development version (`1.11.1-ext.N-dev.<sha>`) the job is skipped.
# The notebook E2E in a GraalVM native image on macOS (#249, #251). It takes the fork's Compose
# (`org.thisisthepy.compose.*:1.11.1-ext.2`, `composeExtended.*` in `gradle.properties`) from
# Maven Central, builds the 20-scenario executable with Liberica NIK 25, and runs it with
# JAVA_HOME and PYTHONHOME removed.
notebook-e2e-native-image:
name: Notebook E2E in a native image (macOS)
if: ${{ vars.COMPOSE_EXTENDED_VERSION != '' }}
runs-on: macos-latest
permissions:
contents: read
packages: read
env:
WHEEL_DIR: ${{ github.workspace }}/.tmp/pythonx-compose-dist
COMPOSE_EXTENDED_VERSION: ${{ vars.COMPOSE_EXTENDED_VERSION }}
COMPOSE_EXTENDED_GROUP_PREFIX: ${{ vars.COMPOSE_EXTENDED_GROUP_PREFIX || 'org.thisisthepy.compose' }}
COMPOSE_EXTENDED_REPOSITORY: ${{ vars.COMPOSE_EXTENDED_REPOSITORY || 'https://maven.pkg.github.com/thisisthepy/compose-multiplatform-core-extended' }}
# GitHub Packages asks for a token even for a public package. A read:packages PAT in the secret
# GH_PACKAGES_TOKEN is used when it exists; otherwise this repository's own token.
GITHUB_TOKEN: ${{ secrets.GH_PACKAGES_TOKEN || secrets.GITHUB_TOKEN }}
TOKEN_SOURCE: ${{ secrets.GH_PACKAGES_TOKEN != '' && 'GH_PACKAGES_TOKEN' || 'GITHUB_TOKEN' }}
steps:
- name: Checkout
uses: actions/checkout@v4
Expand All @@ -183,19 +172,6 @@ jobs:
path: .tmp/pythonx-compose
fetch-depth: 1

# Before any build: can this token read the fork's packages? One known POM, so a refusal is
# reported as what it is rather than as a dependency resolution error minutes later.
- name: Check access to the fork's packages
run: |
group_path="${COMPOSE_EXTENDED_GROUP_PREFIX//.//}/ui"
pom="$COMPOSE_EXTENDED_REPOSITORY/$group_path/ui-desktop/$COMPOSE_EXTENDED_VERSION/ui-desktop-$COMPOSE_EXTENDED_VERSION.pom"
status=$(curl -s -o /dev/null -w '%{http_code}' -u "${GITHUB_ACTOR}:${GITHUB_TOKEN}" "$pom")
echo "reading $pom with $TOKEN_SOURCE: HTTP $status"
if [ "$status" != "200" ]; then
echo "::error::The fork's packages could not be read with $TOKEN_SOURCE (HTTP $status at $pom). Add a personal access token (classic) with read:packages as the repository secret GH_PACKAGES_TOKEN, or check COMPOSE_EXTENDED_VERSION / COMPOSE_EXTENDED_REPOSITORY."
exit 1
fi

- name: Setup uv
uses: astral-sh/setup-uv@v6

Expand Down Expand Up @@ -225,8 +201,4 @@ jobs:
./gradlew :python-multiplatform-compose:fixtures:notebook-e2e:notebookE2eNativeAgent
:python-multiplatform-compose:fixtures:notebook-e2e:notebookE2eNativeRun
-PpythonxComposeWheel="$WHEEL_DIR"
-PcomposeExtended.version="$COMPOSE_EXTENDED_VERSION"
-PcomposeExtended.groupPrefix="$COMPOSE_EXTENDED_GROUP_PREFIX"
-PcomposeExtended.mavenLocal=false
-PcomposeExtended.repository="$COMPOSE_EXTENDED_REPOSITORY"
--console=plain
2 changes: 1 addition & 1 deletion docs/SPEC.md
Original file line number Diff line number Diff line change
Expand Up @@ -628,7 +628,7 @@ All in `PM/commonTest`, so they run wherever the interpreter loads.
main-thread work to skiko's Swing queue, which starts AWT, and AWT in an image needs the JDK's
`libawt`, which links `libjvm`; the fork sends it to `Dispatchers.Main` when
`compose.main.dispatcher=coroutines`, and the fixture supplies a single-thread one with no AWT.
`desktopTest` keeps upstream Compose. Not on CI yet: the fork's artefacts are in mavenLocal only.
CI runs it on every push to `develop` (`desktop.yml`, job `notebook-e2e-native-image`, #251).
- **B-11** (#192) The artifact walker skips every declaration whose package has an `internal` segment
(`*.internal` and `*.internal.*`, as in `androidx.compose.ui.internal`), on jars and on klibs. That is the
Kotlin `.api` dump convention: a library that puts a declaration in such a package has declared it
Expand Down
Loading