mirror of
https://github.com/haskell-nix/hnix.git
synced 2024-09-11 06:55:38 +03:00
Fix CI builds on internal branches (#604)
* CI: Travis: rm cache | Builds 2X times faster without Travis cache M .travis.yml * CI: Travis: build.sh: mv `set` declaration | fx master CI statuses M .travis.yml M build.sh
This commit is contained in:
parent
8700706d57
commit
4f17d9664b
@ -85,7 +85,7 @@ env:
|
||||
# NOTE: Don't fail at configure time if there are multiple versions of the same package in the (recursive) dependencies of the package being built. Will delay failures, if any, to compile time.
|
||||
- allowInconsistentDependencies=false
|
||||
# NOTE: Log file to dump GHCJS build into
|
||||
- ghcjsTmpLogFile='/tmp/ghcjsTmpLogFile.jog'
|
||||
- ghcjsTmpLogFile='/tmp/ghcjsTmpLogFile.log'
|
||||
# NOTE: Length of the GHCJS log tail (<40000)
|
||||
- ghcjsLogTailLength=10000
|
||||
# NOTE: {os} x {jobs} - {exclude} = {build matrix}
|
||||
@ -150,12 +150,6 @@ script:
|
||||
#
|
||||
#
|
||||
|
||||
# NOTE: Travis cache allows near fast cache loading of Nix pkgs store,
|
||||
# Since the Cachix does not cache PRs - Travis cache is great because it caches PR branch builds
|
||||
# During devepment of this PR I had ~40GB cache on the PR branch.
|
||||
cache:
|
||||
directories:
|
||||
- /nix/store
|
||||
|
||||
# NOTE: Track the commits on this repo branches + cron rechecks build
|
||||
branches:
|
||||
|
60
build.sh
60
build.sh
@ -2,6 +2,36 @@
|
||||
|
||||
# NOTE: Script for the CI builds. CI comes here from `.travis.yml`
|
||||
|
||||
# NOTE: The most strict error checking requirements
|
||||
set -Eexuo pipefail
|
||||
|
||||
# NOTE: If var not imported - set to the default value
|
||||
GHCVERSION=${GHCVERSION:-'ghc883'}
|
||||
rev=${rev:-'nixpkgs-unstable'}
|
||||
NIX_PATH=${NIX_PATH:-"nixpkgs=https://github.com/nixos/nixpkgs/archive/$rev.tar.gz"}
|
||||
export NIX_PATH
|
||||
name=${name:-'defaultBinaryName'}
|
||||
pkgName=${pkgName:-'defaultPkgName'}
|
||||
failOnAllWarnings=${failOnAllWarnings:-'false'}
|
||||
checkUnusedPackages=${checkUnusedPackages:-'false'}
|
||||
doCoverage=${doCoverage:-'false'}
|
||||
doHaddock=${doHaddock:-'false'}
|
||||
doJailbreak=${doJailbreak:-'false'}
|
||||
doCheck=${doCheck:-'true'}
|
||||
doBenchmark=${doBenchmark:-'false'}
|
||||
enableExecutableProfiling=${enableExecutableProfiling:-'false'}
|
||||
enableLibraryProfiling=${enableLibraryProfiling:-'false'}
|
||||
buildFromSdist=${buildFromSdist:-'false'}
|
||||
buildStrictly=${buildStrictly:-'false'}
|
||||
disableOptimization=${disableOptimization:-'true'}
|
||||
buildStackProject=${buildStackProject:-'false'}
|
||||
# NOTE: *Oprparse* key is redifined in the code further
|
||||
generateOptparseApplicativeCompletions=${generateOptparseApplicativeCompletions:-'false'}
|
||||
allowInconsistentDependencies=${allowInconsistentDependencies:-'false'}
|
||||
ghcjsTmpLogFile=${ghcjsTmpLogFile:-'/tmp/ghcjsTmpLogFile.log'}
|
||||
ghcjsLogTailLength=${ghcjsLogTailLength:-'10000'}
|
||||
|
||||
|
||||
GHCJS_BUILD(){
|
||||
# NOTE: Function for GHCJS build that outputs its huge log into a file
|
||||
|
||||
@ -35,35 +65,6 @@ SILENT(){
|
||||
}
|
||||
|
||||
BUILD_PROJECT(){
|
||||
set -xe
|
||||
set -euo pipefail
|
||||
IFS=$'\n\t'
|
||||
|
||||
# NOTE: If var not imported - set to the default value
|
||||
GHCVERSION=${GHCVERSION:-ghc865}
|
||||
rev=${rev:-nixpkgs-unstable}
|
||||
NIX_PATH=${NIX_PATH:-"nixpkgs=https://github.com/nixos/nixpkgs/archive/$rev.tar.gz"}
|
||||
export NIX_PATH
|
||||
name=${name:-defaultBinaryName}
|
||||
pkgName=${pkgName:-defaultPkgName}
|
||||
failOnAllWarnings=${failOnAllWarnings:-'false'}
|
||||
checkUnusedPackages=${checkUnusedPackages:-'false'}
|
||||
doCoverage=${doCoverage:-'false'}
|
||||
doHaddock=${doHaddock:-'false'}
|
||||
doJailbreak=${doJailbreak:-'false'}
|
||||
doCheck=${doCheck:-'true'}
|
||||
doBenchmark=${doBenchmark:-'false'}
|
||||
enableExecutableProfiling=${enableExecutableProfiling:-'false'}
|
||||
enableLibraryProfiling=${enableLibraryProfiling:-'false'}
|
||||
buildFromSdist=${buildFromSdist:-'false'}
|
||||
buildStrictly=${buildStrictly:-'false'}
|
||||
disableOptimization=${disableOptimization:-'true'}
|
||||
buildStackProject=${buildStackProject:-'false'}
|
||||
# NOTE: *Oprparse* key is redifined in the code further
|
||||
generateOptparseApplicativeCompletion=${generateOptparseApplicativeCompletion:-'false'}
|
||||
allowInconsistentDependencies=${allowInconsistentDependencies:-'false'}
|
||||
ghcjsTmpLogFile=${ghcjsTmpLogFile:-'/tmp/ghcjsTmpLogFile.jog'}
|
||||
ghcjsLogTailLength=${ghcjsLogTailLength:-'10000'}
|
||||
|
||||
|
||||
# NOTE: Resulting value injects into `nix-build` commands
|
||||
@ -76,6 +77,7 @@ if [ "$generateOptparseApplicativeCompletion" = 'true' ]
|
||||
generateOptparseApplicativeCompletion=''
|
||||
fi
|
||||
|
||||
IFS=$'\n\t'
|
||||
|
||||
if [ "$GHCVERSION" = "ghcjs" ]
|
||||
then
|
||||
|
Loading…
Reference in New Issue
Block a user