Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Include stack installation in CI timeout mechanism
This will help to abort CI builds early in order to preserve the cache if necessary.
- Loading branch information
Showing
4 changed files
with
28 additions
and
27 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
This file was deleted.
Oops, something went wrong.
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,10 @@ | ||
#!/bin/bash | ||
|
||
set -x | ||
|
||
curl -L https://www.stackage.org/stack/linux-x86_64 | tar xz --wildcards --strip-components=1 -C ~/.local/bin '*/stack' | ||
stack setup | ||
stack --version | ||
stack install alex happy | ||
stack --no-terminal --jobs=1 build --only-dependencies | ||
stack --no-terminal --jobs=1 test --flag pursuit:-dev --pedantic |
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,17 @@ | ||
#!/bin/bash | ||
|
||
timeout 40m $@ | ||
ret=$? | ||
case "$ret" in | ||
0) | ||
# continue | ||
;; | ||
124) | ||
echo "Timed out while executing command: $@." | ||
echo "Try building again by pushing a new commit." | ||
exit 1 | ||
;; | ||
*) | ||
exit "$ret" | ||
;; | ||
esac |