Skip to content

Commit a2a9a73

Browse files
committed
Test static exe
1 parent 90e104e commit a2a9a73

File tree

1 file changed

+5
-9
lines changed

1 file changed

+5
-9
lines changed

.azure/azure-linux-template.yml

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -43,18 +43,14 @@ jobs:
4343
stack)
4444
stack $ARGS test --haddock --no-haddock-deps --ghc-options="$GHC_OPTIONS" --copy-bins --local-bin-path bin
4545
46-
set +e
46+
# Get output about whether the exe is dynamically linked
47+
# Ignore the exit code though, we don't want to fail just because it is static
48+
ldd ./bin/stack || true
4749
48-
NEW_EXE=$(stack $ARGS exec which stack)
49-
echo $NEW_EXE
50-
$NEW_EXE --version
51-
ldd $NEW_EXE
52-
53-
# Make sure Alpine actually builds a static exe that works on Ubuntu
50+
# Make sure we can run the executable on this OS
51+
# Important to make sure the Alpine exe is properly static
5452
./bin/stack --version
55-
ldd ./bin/stack || true # ldd returns exit code 1 on statics, which we don't want to fail for
5653
57-
set -e
5854
;;
5955
pedantic)
6056
stack --system-ghc build --pedantic

0 commit comments

Comments
 (0)