Skip to content

Conversation

@adityapatwardhan
Copy link
Member

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

  • Added a new LinuxMuslBuild stage 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]
  • Created .pipelines/templates/build-alpine.yml to define jobs for preparing the Docker build context, building the Alpine image, and extracting the libpsl-native.so binary from the built Docker image.
  • Updated the build dependencies for the NuGet packaging stage to include the new LinuxMuslBuild stage, ensuring MUSL binaries are available for packaging.

Artifact and Packaging Updates

  • Refactored .pipelines/templates/build-nuget.yml to consume artifacts from the new Alpine/MUSL extraction job, updating variable names and artifact paths to reflect the new pipeline structure. [1] [2]
  • Added verbose logging and artifact inspection steps to improve traceability and debugging of compressed platform artifacts during packaging.

Build and Dockerfile Improvements

  • Added a new Dockerfile to support building native binaries on Alpine and exporting the resulting libpsl-native.so for use in packaging.
  • Improved logging in build.psm1 to provide clearer build completion messages and file listings for the generated native library.

PR Context

Build alpine native components on Alpine container

Copy link

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 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 LinuxMuslBuild stage 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.

@adityapatwardhan
Copy link
Member Author

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@adityapatwardhan adityapatwardhan enabled auto-merge (squash) October 23, 2025 17:40
@@ -0,0 +1,12 @@
FROM mcr.microsoft.com/dotnet/sdk:10.0-alpine AS build
Copy link
Member

Choose a reason for hiding this comment

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

have you setup dependabot?

@adityapatwardhan adityapatwardhan merged commit e42a08f into master Oct 23, 2025
11 checks passed
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