Define custom build setup for musl target.

This commit is contained in:
KtorZ 2024-10-02 10:05:39 +02:00
parent 356d845a9a
commit 31819fe197
No known key found for this signature in database
GPG Key ID: 33173CB6F77F4277
2 changed files with 13 additions and 0 deletions

3
.github/musl-build-setup.yml vendored Normal file
View File

@ -0,0 +1,3 @@
- run: |
sudo apt-get install -y pkg-config libssl-dev musl musl-dev musl-tools
rustup target add x86_64-unknown-linux-musl

View File

@ -49,6 +49,16 @@ features = ["bundle_openssl"]
[workspace.metadata.dist.github-custom-runners]
x86_64-unknown-linux-musl = "ubuntu-22.04"
# Inject build steps into the build-local-artifacts job to prepare the container.
# This is needed to install libssl-dev and musl tools for producing statically linked
# binary on Linux and avoid weird segfaults.
#
# Note: should be a path relative to the .github/workflows/ directory, and
# which should point to a .yml file containing the github workflow steps just
# as one would normally write them in a workflow.
[workspace.metadata.dist.github-build-setup]
x86_64-unknown-linux-musl = "../musl-build-setup.yml"
[workspace.dependencies]
walkdir = "2.3.2"
insta = { version = "1.30.0", features = ["yaml", "json", "redactions"] }