on master help sign in
build with travis-ci
c625998Hugh JF Chen
.travis.yml+11−40
@@ -1,64 +1,35 @@
1# For more information, see https://github.com/ChrisPenner/haskell-stack-travis-ci
1# For more information, see https://github.com/ChrisPenner/haskell-stack-travis-ci
2language: c
2language: c
3−sudo: false
3+sudo: true
4
4
5git:
5git:
6 submodules: false # whether to recursively clone submodules
6 submodules: false # whether to recursively clone submodules
7
7
8−cache:
9− directories:
10− - $HOME/.ghc
11− - $HOME/.cabal
12− - $HOME/.stack
13− - .stack-work
14− timeout: 1000
15−
16matrix:
8matrix:
17 fast_finish: true
9 fast_finish: true
18 include:
10 include:
19− - env: CACHE_NAME=8.2.2 STACK_YAML=stack.ghc8.2.yaml
11+ - env: BUILD_NAME=OSX
20− compiler: ": #stack 8.2.2"
21−
22− - env: CACHE_NAME=osx-8.2.2 STACK_YAML=stack.ghc8.2.yaml
23 os: osx
12 os: osx
24− osx_image: xcode7.3
25− compiler: ": #stack 8.2.2"
26−
27− - env: CACHE_NAME=8.4.4 STACK_YAML=stack.ghc8.4.yaml
28− compiler: ": #stack 8.4.4"
29
13
30− - env: CACHE_NAME=8.6.5 STACK_YAML=stack.ghc8.6.yaml
14+ - env: BUILD_NAME=LINUX-AMD64
31− compiler: ": #stack 8.6.5"
15+ os: linux
16+ dist: bionic
17+ arch: amd64
32
18
33− - env: CACHE_NAME=osx-8.6.5 STACK_YAML=stack.ghc8.6.yaml
19+ - env: BUILD_NAME=LINUX-ARM64
34− os: osx
20+ os: linux
35− osx_image: xcode11
21+ dist: bionic
36− compiler: ": #stack 8.6.5"
22+ arch: arm64
37
23
38before_script:
24before_script:
39 - unset CC
25 - unset CC
40− - export PATH=$HOME/.local/bin:/opt/ghc/$GHC_VERSION/bin:$PATH
41− - ./.travis/install-ghr.sh
42− - ./.travis/install-stack.sh
43
26
44# Here starts the actual work to be performed for the package under test;
27# Here starts the actual work to be performed for the package under test;
45# any command which exits with a non-zero exit code causes the build to fail.
28# any command which exits with a non-zero exit code causes the build to fail.
46script:
29script:
47 - |
30 - |
48 # Run tests
31 # Run tests
49− set -e
32+ ./ci/DevOps/local/test/cb.sh
50− ./.travis/install-dependencies.sh
51− stack --no-terminal --jobs=2 --system-ghc test
52− - |
53− #Run HLint
54− if [[ "$(uname)" = "Linux" ]]; then
55− curl -sL https://raw.github.com/ndmitchell/hlint/master/misc/travis.sh | sh -s lint src test examples --cpp-define VERSION_project_m36=HLINT
56− fi
57− - |
58− #Run Haddock
59− if [[ "$(uname)" = "Linux" ]]; then
60− stack --no-install-ghc --system-ghc --no-haddock-deps haddock
61− fi
62
33
63after_success:
34after_success:
64 - |
35 - |
ci/DevOps/local/test/build/build.sh+2−2
@@ -21,8 +21,8 @@ if [ -f ${SCRIPT_ABS_PATH}/nix/project-m36.nix ]; then
21 [ -x ~/.emacs.d/bin/doom ] && echo "((nil . ((dante-target . \"project-m36\"))))" > ${SCRIPT_ABS_PATH}/../../../../.dir-locals.el && nix-shell --run "~/.emacs.d/bin/doom env > /dev/null 2>&1" ${SCRIPT_ABS_PATH}/nix/shell.nix
21 [ -x ~/.emacs.d/bin/doom ] && echo "((nil . ((dante-target . \"project-m36\"))))" > ${SCRIPT_ABS_PATH}/../../../../.dir-locals.el && nix-shell --run "~/.emacs.d/bin/doom env > /dev/null 2>&1" ${SCRIPT_ABS_PATH}/nix/shell.nix
22 nix-shell ${SCRIPT_ABS_PATH}/nix/shell.nix
22 nix-shell ${SCRIPT_ABS_PATH}/nix/shell.nix
23 else
23 else
24− #nix-shell --run "cd ${SCRIPT_ABS_PATH}/../../../../.. ; cabal new-update ; cabal new-clean ; cabal new-test" ${SCRIPT_ABS_PATH}/nix/shell.nix
24+ nix-shell --run "cd ${SCRIPT_ABS_PATH}/../../../../.. ; cabal new-update ; cabal new-clean ; cabal new-test" ${SCRIPT_ABS_PATH}/nix/shell.nix
25− #nix-shell --run "cd ${SCRIPT_ABS_PATH}/../../../../.. ; cabal new-clean" ${SCRIPT_ABS_PATH}/nix/shell.nix
25+ nix-shell --run "cd ${SCRIPT_ABS_PATH}/../../../../.. ; cabal new-clean" ${SCRIPT_ABS_PATH}/nix/shell.nix
26 nix-build -A project-m36-docker ${SCRIPT_ABS_PATH}/nix/default.nix
26 nix-build -A project-m36-docker ${SCRIPT_ABS_PATH}/nix/default.nix
27 fi
27 fi
28else
28else
ci/DevOps/local/test/build/nix/default.nix−11
@@ -242,17 +242,6 @@ divert 258 DIVERT # Divert pseudo-protocol
242 name = "project-m36";
242 name = "project-m36";
243 tag = project-m36.version;
243 tag = project-m36.version;
244 created = "now";
244 created = "now";
245− # This is a quick and dirty hack to fix the hard-coding architecture
246− extraCommands = ''
247− myar=$(uname -m)
248− case $myar in
249− aarch64)
250− cat $out/json | sed 's/"amd64"/"arm64"/g' > $out/json1
251− cp $out/json1 $out/json
252− ;;
253− *) ;;
254− esac
255− '';
256
245
257 contents = [ static-project-m36
246 contents = [ static-project-m36
258 project-m36-env ];
247 project-m36-env ];
ci/DevOps/local/test/deploy/prepare.sh+2−2
@@ -21,7 +21,7 @@ myGroup2=$(awk -F":" '{print $1}' /etc/group | grep -w project-m36)
21set -e
21set -e
22if [ "X${myGroup2}" = "X" ]; then
22if [ "X${myGroup2}" = "X" ]; then
23 info "no project-m36 group defined yet, create it..."
23 info "no project-m36 group defined yet, create it..."
24− sudo groupadd -f --gid 90001 project-m36
24+ sudo groupadd -f --gid 90009 project-m36
25fi
25fi
26
26
27set +e
27set +e
@@ -29,7 +29,7 @@ myUser2=$(awk -F":" '{print $1}' /etc/passwd | grep -w project-m36)
29set -e
29set -e
30if [ "X${myUser2}" = "X" ]; then
30if [ "X${myUser2}" = "X" ]; then
31 info "no project-m36 user defined yet, create it..."
31 info "no project-m36 user defined yet, create it..."
32− sudo useradd -G docker -m -p Passw0rd --uid 90001 --gid 90001 project-m36
32+ sudo useradd -G docker -m -p Passw0rd --uid 90009 --gid 90009 project-m36
33fi
33fi
34
34
35if [ ! -d /var/project-m36 ]; then
35if [ ! -d /var/project-m36 ]; then