Skip to content

Updates the build/release workflows#72

Merged
danschmidt5189 merged 1 commit intomainfrom
update-build-workflow
Oct 7, 2025
Merged

Updates the build/release workflows#72
danschmidt5189 merged 1 commit intomainfrom
update-build-workflow

Conversation

@danschmidt5189
Copy link
Copy Markdown
Member

@danschmidt5189 danschmidt5189 commented Oct 6, 2025

Adds multi-platform build support. Borrows the approach pioneered in BerkeleyLibrary/avplayer to support fast multi-platform builds (without qemu):

  1. Images are matrix-built on x64/arm64 runners. These are pushed by digest to avoid clogging the registry with tags.
  2. "merge" stage combines them into a multi-platform image tagged with a unique build-specific ID. Subsequent steps use this image tag exactly as before.

Adds the standard release workflow. Applying a git-tag results in pulling the already built image for the underlying ref and retagging it accordingly. Semver-esque tags are broken out using the rules defined in docker/metadata-action, e.g. v1.2.3 results in the tags v1.2.3, 1.2.3, 1.2, and 1 being applied and pushed.

Adds test that the app image can start. It's a very basic test, but there is now a job that tests the image built to the app target can actually start. (This should be improved upon.)

Improves caching by using the registry backend. Switches from the GHA cache to a registry-based cache. The registry image is architecture-specific (buildcache-ARCH). This cuts the image build time by >50% on cache hits.

Copy link
Copy Markdown
Member

@anarchivist anarchivist left a comment

Choose a reason for hiding this comment

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

generally looks good, although i know there are some changes that are still incoming.

@danschmidt5189 danschmidt5189 force-pushed the update-build-workflow branch 4 times, most recently from 327e2c8 to 8602791 Compare October 7, 2025 06:34
@danschmidt5189
Copy link
Copy Markdown
Member Author

@anarchivist This should be good to go (or very close, in case my last rebase introduced some minor bug).

There's quite a bit of complexity here around handling:

  1. The flavors of testing/linting we're doing
  2. The need to test using the development target but only push the app target.

As for testing, I think we could improve the end-to-end testing here. Right now I just added a startup test, but obviously that's not enough (it notably doesn't run the necessary SQL migration). We'll want a basic smoke-test there, just to verify that the app image can be started at all. Functional tests would be ideal but as this is a POC that is not a high priority.

The difference between dev/app targets adds quite a bit of complexity to the build, but the more substantial issue is that the image being tested is not exactly the one that is pushed to the registry. Something to tackle in another PR?

@danschmidt5189 danschmidt5189 marked this pull request as ready for review October 7, 2025 06:43
Copilot AI review requested due to automatic review settings October 7, 2025 06:43
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR updates the Docker build and release workflows to support multi-platform builds (ARM64 and x86_64) and improves the CI/CD pipeline structure. The changes introduce a new release workflow and significantly refactor the existing build workflow for better efficiency and platform support.

Key changes:

  • Adds multi-platform Docker build support for ARM64 and x86_64 architectures
  • Creates a new release workflow for tagging and publishing release images
  • Restructures the build workflow to use matrix builds and separate test jobs

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
docker-compose.yml Fixes environment variable defaults in PostgreSQL configuration
docker-compose.ci.yml Simplifies CI configuration by using env.example file
.github/workflows/release.yml New workflow for retagging and pushing release images
.github/workflows/build.yml Major refactor to support multi-platform builds and parallel testing
Comments suppressed due to low confidence (1)

.github/workflows/build.yml:1

  • This line sets a variable TEST_START but the syntax is incorrect for GitHub Actions environment variables. It should be echo \"TEST_START=$(date +%s)\" >> $GITHUB_ENV.
name: Build / Test / Push

Copy link
Copy Markdown
Member

@anarchivist anarchivist left a comment

Choose a reason for hiding this comment

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

i like the way that this is heading. we will probably wan to get #73 in first; while this means refactoring this pr more, i think this eliminates some of the complexity we've had to add.

@danschmidt5189 danschmidt5189 force-pushed the update-build-workflow branch 2 times, most recently from 6cb2b5d to 9797e91 Compare October 7, 2025 17:41
- Build multi-platform image (x64, arm64).
- Speeds builds via architecture-specific registry cache.
- Adds release workflow for re-tagging existing images by git-tag.
Copy link
Copy Markdown
Member

@anarchivist anarchivist left a comment

Choose a reason for hiding this comment

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

lgtm!

@danschmidt5189 danschmidt5189 merged commit 98c93bc into main Oct 7, 2025
9 checks passed
@danschmidt5189 danschmidt5189 deleted the update-build-workflow branch October 7, 2025 18:52
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.

3 participants