-
Notifications
You must be signed in to change notification settings - Fork 382
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Build static Linux binaries with musl (#962)
* Build static Linux binaries with musl Statically building glibc can be problematic, e.g. it requires the same (dynamic) glibc version in the system you're running the binary: function hsnet_getaddrinfo: warning: Using 'getaddrinfo' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking This changes the build workflow to build the Linux binaries on a musl environment. * Add container used for static builds * Adjust package guards to match after merge * ci: Fix defaults duplication after merge * ci: disable haskell setup when using a container * ci: bump GHC to 9.2.7 * ci: Add README documenting container * ci: unify cache artifacts
- Loading branch information
Showing
4 changed files
with
57 additions
and
24 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
FROM fpco/alpine-haskell-stack:9.2.7 | ||
|
||
RUN apk upgrade --no-cache &&\ | ||
apk add --no-cache \ | ||
cmake \ | ||
libtool \ | ||
openssl-dev \ | ||
tar \ | ||
zlib-dev \ | ||
zlib-static | ||
|
||
RUN addgroup \ | ||
--gid 115 \ | ||
runneruser \ | ||
&& \ | ||
adduser \ | ||
--disabled-password \ | ||
--gecos "" \ | ||
--ingroup runneruser \ | ||
--home /github/home \ | ||
--uid 1001 \ | ||
runneruser | ||
|
||
RUN mkdir -p /etc/stack &&\ | ||
{ cat /root/.stack/config.yaml ;\ | ||
echo "system-ghc: true" ;\ | ||
echo "install-ghc: false" ;\ | ||
echo "skip-ghc-check: true" ;\ | ||
} >> /etc/stack/config.yaml |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# Static GHC & musl container | ||
|
||
This container is used as part of `.github/workflows/ci.yml` to produce | ||
statically-linked amd64 linux builds of Echidna. It is based on the following | ||
container produced by FP Complete and maintained in the | ||
[`fpco/alpine-haskell-stack`](https://github.com/fpco/alpine-haskell-stack/tree/ghc927) | ||
repository, and contains a few extra dependencies and configuration to make it | ||
suitable for the GitHub Actions environment. |
This file contains 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
This file contains 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