Skip to content

Release action#4632

Draft
andrewsanchez wants to merge 9 commits intobriefcasefrom
release-action
Draft

Release action#4632
andrewsanchez wants to merge 9 commits intobriefcasefrom
release-action

Conversation

@andrewsanchez
Copy link
Copy Markdown
Contributor

No description provided.

Copy link
Copy Markdown
Collaborator

@abdnh abdnh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some quick comments


build-mac:
needs: prepare
runs-on: macos-14
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if we can still maintain macOS 12 support with this (I'm just assuming we have a similar situation to Linux). GitHub doesn't have runners for older systems however, so probably nothing we can work around with official runners if that's the case.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apparently this is a thing: MACOSX_DEPLOYMENT_TARGET

So we can have a build matrix targeting multiple.

Maybe worth looking into: https://tart.run/

Unverified caveat from Claude:

macos-14 is ARM-only (Apple Silicon). If we need to ship x86_64 Intel binaries for macOS 12 users, we’d need macos-14-large (Intel) or cross-compile with --target x86_64-apple-darwin + rustup target add (if Rust). GitHub has deprecated all Intel runners older than macOS 13, and macOS 13 itself is being retired in Dec 2025 — so macos-15-intel is now the recommended Intel runner.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like we have MACOSX_DEPLOYMENT_TARGET set to 11.

Re Claude's comment, we cross-compile the wheel in tools/build-x64-mac then merge it with the ARM wheel in tools/build_universal_wheel.py - The build process assumes we're on an ARM machine.


build-linux:
needs: prepare
runs-on: ubuntu-22.04
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We'll also need to have a separate ARM runner (ubuntu-22.04-arm). The uv launcher has a single Linux package for both x86_64 and aarch64 binaries, but I don't think this is possible to do with Briefcase (We can't merge *.so libs of the Python packages like it's done for Mac): https://github.com/ankitects/anki/blob/main/qt/launcher/lin/build.sh

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Linux support is unfortunately complicated: #4622 (comment)

Still looking into the best solution here.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I decided to use PyInstaller on Linux. This way we only need to provide two packages (x86_64 and aarch64) to support a lot of distros (hopefully): #4638

After #4631, the output would be a zip with install scripts similar to what we have today (instead of a distro-specific system package).

type: choice
options:
- beta
- official
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nitpick: stable instead of official?

fi

# Validate PEP 440 format (digits separated by dots)
if ! echo "$version" | grep -qE '^[0-9]+(\.[0-9]+)*$'; then
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This simple regex doesn't handle beta versions. We should use packaging to validate the version.

tag_name: ${{ steps.compute.outputs.tag_name }}
release_name: ${{ steps.compute.outputs.release_name }}
is_prerelease: ${{ steps.compute.outputs.is_prerelease }}
steps:
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@abdnh
Copy link
Copy Markdown
Collaborator

abdnh commented Mar 31, 2026

I gave this a test on my fork and pushed some fixes.

Workflow run: https://github.com/abdnh/anki/actions/runs/23779203758
Release: https://github.com/abdnh/anki/releases/tag/26.03

macOS's .dmg is noticeably large. We can do separate ARM/Intel releases (so no universal builds) as a small improvement, as was the case for Anki releases before the launcher: https://github.com/ankitects/anki/releases/tag/25.02.7

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants