CI: {.travis.yml,build.sh}: rename (GHCVERSION->compiler)

M  .travis.yml
M  build.sh
This commit is contained in:
Anton-Latukha 2020-06-23 21:06:02 +03:00
parent 7f5798286e
commit 209d0956f5
No known key found for this signature in database
GPG key ID: 3D84C07E91802E41
2 changed files with 13 additions and 13 deletions

View file

@ -71,24 +71,24 @@ jobs:
include: include:
- name: GHC 8.4.4, Linux - name: GHC 8.4.4, Linux
env: env:
- GHCVERSION='ghc844' - compiler='ghc844'
- linkWithGold='true' - linkWithGold='true'
os: linux os: linux
dist: bionic dist: bionic
- name: GHC 8.6.5, Linux - name: GHC 8.6.5, Linux
env: env:
- GHCVERSION='ghc865' - compiler='ghc865'
- linkWithGold='true' - linkWithGold='true'
os: linux os: linux
dist: bionic dist: bionic
- name: GHC 8.8.3, macOS, Strict - name: GHC 8.8.3, macOS, Strict
env: env:
- GHCVERSION='ghc883' - compiler='ghc883'
- buildStrictly='true' - buildStrictly='true'
os: osx os: osx
- name: GHC 8.10.1, Linux, SDist, Optimize, Benchmark, Haddock, Shell Completions - name: GHC 8.10.1, Linux, SDist, Optimize, Benchmark, Haddock, Shell Completions
env: env:
- GHCVERSION='ghc8101' - compiler='ghc8101'
- buildFromSdist='true' - buildFromSdist='true'
- linkWithGold='true' - linkWithGold='true'
- doHaddock='true' - doHaddock='true'
@ -101,11 +101,11 @@ jobs:
dist: bionic dist: bionic
- name: GHCJS, Linux - name: GHCJS, Linux
env: env:
- GHCVERSION='ghcjs' - compiler='ghcjs'
os: linux os: linux
dist: bionic dist: bionic
allow_failures: allow_failures:
- env: GHCVERSION='ghcjs' - env: compiler='ghcjs'
before_script: before_script:
- sudo mount -o remount,exec,size=4G,mode=755 /run/user || true - sudo mount -o remount,exec,size=4G,mode=755 /run/user || true
@ -144,7 +144,7 @@ script:
# #
# #
# NOTE: Normal GHC build # NOTE: Normal GHC build
- if [ ! "$GHCVERSION" = 'ghcjs' ]; then ./build.sh; fi - if [ ! "$compiler" = 'ghcjs' ]; then ./build.sh; fi
# #
# #
# NOTE: GHCJS build # NOTE: GHCJS build
@ -152,10 +152,10 @@ script:
# so `SILENT` mode for it was created # so `SILENT` mode for it was created
# and travis_wait 50 to wait on no outputs (otherwise Travis terminates build in 10 minutes as stale) # and travis_wait 50 to wait on no outputs (otherwise Travis terminates build in 10 minutes as stale)
# and `bash` wrapper so Travis parses `travis_wait` => `if; then; fi` line # and `bash` wrapper so Travis parses `travis_wait` => `if; then; fi` line
- travis_wait 50 bash -c 'if [ "$GHCVERSION" = "ghcjs" ]; then ./build.sh; fi' - travis_wait 50 bash -c 'if [ "$compiler" = "ghcjs" ]; then ./build.sh; fi'
# NOTE: For GHCJS dump the last $ghcjsLogTailLength lines into CI out to see # NOTE: For GHCJS dump the last $ghcjsLogTailLength lines into CI out to see
# Since build runs inside `travis_wait` - it was impossible to output log from it # Since build runs inside `travis_wait` - it was impossible to output log from it
- if [ "$GHCVERSION" = "ghcjs" ]; then tail -n "$ghcjsLogTailLength" "$ghcjsTmpLogFile" && rm "$ghcjsTmpLogFile"; fi - if [ "$compiler" = "ghcjs" ]; then tail -n "$ghcjsLogTailLength" "$ghcjsTmpLogFile" && rm "$ghcjsTmpLogFile"; fi
# #
# #

View file

@ -10,7 +10,7 @@ set -Eexuo pipefail
# NOTE: If var not imported - set to the default value # NOTE: If var not imported - set to the default value
GHCVERSION=${GHCVERSION:-'ghc8101'} compiler=${compiler:-'ghc8101'}
# NOTE: Nix by default uses nixpkgs-unstable channel # NOTE: Nix by default uses nixpkgs-unstable channel
# Setup for Nixpkgs revision: # Setup for Nixpkgs revision:
# `rev` vals in order of freshness -> cache & stability: # `rev` vals in order of freshness -> cache & stability:
@ -137,7 +137,7 @@ BUILD_PROJECT(){
IFS=$'\n\t' IFS=$'\n\t'
if [ "$GHCVERSION" = "ghcjs" ] if [ "$compiler" = "ghcjs" ]
then then
# NOTE: GHCJS build # NOTE: GHCJS build
@ -176,7 +176,7 @@ if [ "$GHCVERSION" = "ghcjs" ]
--arg generateOptparseApplicativeCompletions "$generateOptparseApplicativeCompletions" \ --arg generateOptparseApplicativeCompletions "$generateOptparseApplicativeCompletions" \
--arg executableNamesToShellComplete "$executableNamesToShellComplete" \ --arg executableNamesToShellComplete "$executableNamesToShellComplete" \
--arg withHoogle "$withHoogle" \ --arg withHoogle "$withHoogle" \
ghcjs "$compiler"
else else
@ -184,7 +184,7 @@ if [ "$GHCVERSION" = "ghcjs" ]
# NOTE: GHC sometimes produces logs so big - that Travis terminates builds, so multiple --quiet # NOTE: GHC sometimes produces logs so big - that Travis terminates builds, so multiple --quiet
nix-build \ nix-build \
--quiet --quiet \ --quiet --quiet \
--argstr compiler "$GHCVERSION" \ --argstr compiler "$compiler" \
--arg allowInconsistentDependencies "$allowInconsistentDependencies" \ --arg allowInconsistentDependencies "$allowInconsistentDependencies" \
--arg doJailbreak "$doJailbreak" \ --arg doJailbreak "$doJailbreak" \
--arg doCheck "$doCheck" \ --arg doCheck "$doCheck" \