Skip to content

Commit

Permalink
Test static exe
Browse files Browse the repository at this point in the history
  • Loading branch information
snoyberg committed Apr 21, 2020
1 parent 90e104e commit a2a9a73
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions .azure/azure-linux-template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,18 +43,14 @@ jobs:
stack)
stack $ARGS test --haddock --no-haddock-deps --ghc-options="$GHC_OPTIONS" --copy-bins --local-bin-path bin
set +e
# Get output about whether the exe is dynamically linked
# Ignore the exit code though, we don't want to fail just because it is static
ldd ./bin/stack || true
NEW_EXE=$(stack $ARGS exec which stack)
echo $NEW_EXE
$NEW_EXE --version
ldd $NEW_EXE
# Make sure Alpine actually builds a static exe that works on Ubuntu
# Make sure we can run the executable on this OS
# Important to make sure the Alpine exe is properly static
./bin/stack --version
ldd ./bin/stack || true # ldd returns exit code 1 on statics, which we don't want to fail for
set -e
;;
pedantic)
stack --system-ghc build --pedantic
Expand Down

0 comments on commit a2a9a73

Please sign in to comment.