Repository navigation
Fix the Docker build of the OS locally and in GitHub Actions - #812
Merged
Merged
Conversation
- Dockerfile: pin the base image to ubuntu:22.04 (latest no longer has python3.10, python3-distutils or clang-15) and to linux/amd64 (the bundled toolchain/linux/ld.lld is x86-64 only, needed on Apple Silicon). - Dockerfile: provide a world writable HOME. The build runs with --user "$(id -u):$(id -g)" and that UID has no passwd entry in the image, leaving HOME as "/" so git config --global failed. - build.sh: use MEADOW_ADDITIONAL_MAKE_OPTIONS for distclean rather than a hard coded -j8. Under Docker -j8 fails with jobserver errors, which left stale generated Kconfig files with host paths and broke configure. - build-os.yml: fetch full history (needed for the build number) and the mbedtls and mono/external/corefx submodules, rewriting the SSH submodule URLs to authenticated HTTPS. corefx is private and uses the GIT_REPO_CHECKOUT_PAT secret. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The repository is public, so GIT_REPO_CHECKOUT_PAT is only needed for the private mono/external/corefx submodule. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- build-os.yml: add a bcl job that runs build-mono-bcl.sh in the Docker
image, alongside the OS build. It needs the mbedtls headers and the
mono/external submodules (llvm-project is skipped).
- Dockerfile: add rsync, curl/wget (monolite download), ca-certificates
and cmake (required by Mono's configure when BTLS is enabled).
- build-mono-bcl.sh: do not quote the empty RSYNC_FLAGS. rsync 3.2.x
rejects the resulting '' argument ("Empty source arg specified");
unquoted it expands to nothing on Linux, WSL and macOS alike.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
api-doc-tools needs its nested Lucene.Net.Light submodule to build monodoc. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The artifact names and contents match those published by the Azure pipelines (azure-pipelines.yml and azure-pipelines-bcl.yml). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Gets
build-os.ymlworking again, and makes the same Docker build work locally (including on Apple Silicon).ubuntu:22.04.ubuntu:latestno longer providespython3.10,python3-distutilsorclang-15.linux/amd64, because the bundledtoolchain/linux/ld.lldis x86-64 only.HOMEthat any user can write to. The build runs with--user "$(id -u):$(id -g)", and that UID (501 on macOS, 1001 on GitHub runners) has no passwd entry in the image. That leftHOME=/, sogit config --globalfailed.distcleannow uses$MEADOW_ADDITIONAL_MAKE_OPTIONS(which is-j1under Docker) instead of a hardcoded-j8. Under Docker,-j8producedwrite jobserver: Bad file descriptorerrors. Those left stale generatedapps/*/Kconfigfiles containing host paths, which then brokekconfig-conf --olddefconfig.filter: blob:none), because the build number is derived from git history.mbedtlsandmono/external/corefx, rewriting the SSH submodule URLs to authenticated HTTPS.corefxis private and uses the existingGIT_REPO_CHECKOUT_PATsecret. PRs from forks don't get that secret, so they will fail at this step.Local usage
Test plan
Meadow.OS.bin,Meadow.OS.Runtime.binandMeadow.OS.Update.bin.mbedtlsandmono/external/corefxsubmodules, mirroring the workflow checkout: succeeded.Build OS and RTrun passes. This also confirms thatGIT_REPO_CHECKOUT_PATcan readWildernessLabs/corefx.🤖 Generated with Claude Code