-
Notifications
You must be signed in to change notification settings - Fork 38
Move building of Alpine to Alpine container host #105
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this 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 moves the Alpine/MUSL binary build process from the generic Linux build pipeline to a dedicated Docker-based pipeline using an Alpine container host. This ensures MUSL binaries are built in their native environment rather than cross-compiled.
Key changes:
- Introduces a new
LinuxMuslBuildstage with Alpine-specific build pipeline that uses Docker to build and extract native binaries - Refactors artifact paths in NuGet packaging to consume outputs from the new Alpine pipeline
- Adds improved logging and artifact inspection throughout the build process
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
.pipelines/release.yml |
Adds new LinuxMuslBuild stage and updates NuGet packaging dependencies to include Alpine build outputs |
.pipelines/templates/build-alpine.yml |
New template defining Docker-based Alpine build jobs including preparation, building, and binary extraction |
.pipelines/templates/build-nuget.yml |
Updates artifact paths from old Linux MUSL build to new Alpine extraction job |
Dockerfile |
New multi-stage Dockerfile for building MUSL binaries on Alpine and exporting the native library |
build.psm1 |
Adds verbose logging after native binary compilation completes |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
| @@ -0,0 +1,12 @@ | |||
| FROM mcr.microsoft.com/dotnet/sdk:10.0-alpine AS build | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
have you setup dependabot?
PR Summary
This pull request introduces a new build pipeline for producing MUSL-based Linux binaries using Alpine, refactors the pipeline templates to support this build, and updates artifact handling to ensure correct packaging. The changes improve cross-platform support, streamline the build process for Alpine/MUSL, and ensure that the resulting native library is correctly extracted and included in the NuGet package.
Pipeline and Build System Enhancements
LinuxMuslBuildstage to.pipelines/release.yml, which uses a dedicated Alpine-based container image and a new build template for MUSL builds. This replaces the previous approach that used the standard Linux build template for MUSL targets. [1] [2].pipelines/templates/build-alpine.ymlto define jobs for preparing the Docker build context, building the Alpine image, and extracting thelibpsl-native.sobinary from the built Docker image.LinuxMuslBuildstage, ensuring MUSL binaries are available for packaging.Artifact and Packaging Updates
.pipelines/templates/build-nuget.ymlto consume artifacts from the new Alpine/MUSL extraction job, updating variable names and artifact paths to reflect the new pipeline structure. [1] [2]Build and Dockerfile Improvements
Dockerfileto support building native binaries on Alpine and exporting the resultinglibpsl-native.sofor use in packaging.build.psm1to provide clearer build completion messages and file listings for the generated native library.PR Context
Build alpine native components on Alpine container