-
Notifications
You must be signed in to change notification settings - Fork 550
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
Add Alpine Native Libraries #1339
Conversation
@@ -61,7 +61,7 @@ void GnNinja(DirectoryPath outDir, string target, string skiaArgs) | |||
|
|||
// build native skia | |||
RunProcess(NINJA_EXE, new ProcessSettings { | |||
Arguments = $"{target} -C out/{outDir}", | |||
Arguments = $"-C out/{outDir} {target}", |
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.
Seems some version of ninja don't like this order.
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.
Only a few places to add a new platform.
FROM amd64/alpine:3.9 | ||
|
||
RUN apk add --no-cache bash curl ca-certificates python git build-base ninja fontconfig-dev | ||
RUN apk add --no-cache samurai --repository http://dl-cdn.alpinelinux.org/alpine/edge/main | ||
RUN apk add --no-cache mono clang gn --repository http://dl-cdn.alpinelinux.org/alpine/edge/testing | ||
RUN cert-sync /etc/ssl/certs/ca-certificates.crt | ||
|
||
WORKDIR /work |
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.
This is the Docker file to run on.
- template: azure-templates-bootstrapper.yml # Build Native Linux [Alpine] (Linux) | ||
parameters: | ||
name: native_linux_alpine_linux | ||
displayName: Build Native Linux [Alpine] (Linux) | ||
vmImage: $(VM_IMAGE_LINUX) | ||
docker: scripts/Docker/alpine/amd64 | ||
target: externals-linux | ||
additionalArgs: --buildarch=x64 --gn=gn --ninja=ninja --variant=alpine |
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.
Add an entry to the CI build
- native_linux_alpinenodependencies_linux | ||
- native_linux_alpine_linux |
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.
Include it in the managed build/packaging.
@@ -45,6 +45,7 @@ Please visit https://go.microsoft.com/fwlink/?linkid=868517 to view the release | |||
|
|||
<!-- libSkiaSharp.dll and other native files --> | |||
<file platform="linux" src="runtimes/linux-x64/native/libSkiaSharp.so" /> | |||
<file platform="linux" src="runtimes/linux-musl-x64/native/libSkiaSharp.so" /> |
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.
Add the asset to the NuGet package
<None Include="..\..\output\native\alpine\x64\libSkiaSharp.so" Link="nuget\runtimes\linux-musl-x64\native\libSkiaSharp.so" | ||
Condition=" Exists('..\..\output\native\alpine\x64\libSkiaSharp.so') or '$(IsLinux)' == 'true' " /> |
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.
Add the asset to the project.
According to mono/SkiaSharp#1339, the alpine binary should be included in the standard NativeAssets.Linux package. Needs testing.
Description of Change
Adding a build for Alpine linux.
Builds on Alpine 3.9, tested all the way back to Alpine 3.7.
Bugs Fixed
API Changes
None.
Behavioral Changes
The *.NativeAssets.Linux NuGet packages will now have an Alpine linux binary.
PR Checklist