ci: add nightly version to cabal file
This commit is contained in:
committed by
Steve Chavez
parent
b6d8d89b32
commit
3830887577
@@ -164,6 +164,14 @@ jobs:
|
|||||||
command: |
|
command: |
|
||||||
nix-env -iA cachix -f https://cachix.org/api/v1/install
|
nix-env -iA cachix -f https://cachix.org/api/v1/install
|
||||||
cachix use postgrest
|
cachix use postgrest
|
||||||
|
- run:
|
||||||
|
name: Change postgrest.cabal if nightly
|
||||||
|
command: |
|
||||||
|
if test "$CIRCLE_TAG" = "nightly"
|
||||||
|
then
|
||||||
|
cabal_nightly_version=$(git show -s --format='%cd' --date='format:%Y%m%d')
|
||||||
|
sed -i "s/^version:.*/version:$cabal_nightly_version/" postgrest.cabal
|
||||||
|
fi
|
||||||
- run:
|
- run:
|
||||||
name: Build all derivations from default.nix and push results to Cachix
|
name: Build all derivations from default.nix and push results to Cachix
|
||||||
command: |
|
command: |
|
||||||
|
|||||||
@@ -29,6 +29,12 @@ build_task:
|
|||||||
|
|
||||||
build_script:
|
build_script:
|
||||||
- cabal v2-update
|
- cabal v2-update
|
||||||
|
- |
|
||||||
|
if test "$CIRRUS_TAG" = "nightly"
|
||||||
|
then
|
||||||
|
cabal_nightly_version=$(git show -s --format='%cd' --date='format:%Y%m%d')
|
||||||
|
sed -i '' "s/^version:.*/version:$cabal_nightly_version/" postgrest.cabal
|
||||||
|
fi
|
||||||
- cabal v2-build
|
- cabal v2-build
|
||||||
|
|
||||||
publish_script:
|
publish_script:
|
||||||
|
|||||||
@@ -38,6 +38,12 @@ jobs:
|
|||||||
rm ghr.zip
|
rm ghr.zip
|
||||||
fi
|
fi
|
||||||
script:
|
script:
|
||||||
|
- |
|
||||||
|
if test "$TRAVIS_TAG" = "nightly"
|
||||||
|
then
|
||||||
|
cabal_nightly_version=$(git show -s --format='%cd' --date='format:%Y%m%d')
|
||||||
|
sed -i '' "s/^version:.*/version:$cabal_nightly_version/" postgrest.cabal
|
||||||
|
fi
|
||||||
## Building the whole project can take longer than 50 minutes. Since Travis has a global timeout of 50 minutes
|
## Building the whole project can take longer than 50 minutes. Since Travis has a global timeout of 50 minutes
|
||||||
## we compile for 30 minutes tops(`gtimeout 1800`) and quit compiling with no error.
|
## we compile for 30 minutes tops(`gtimeout 1800`) and quit compiling with no error.
|
||||||
## Since we CACHE the compile results we can continue compiling from where we left off
|
## Since we CACHE the compile results we can continue compiling from where we left off
|
||||||
|
|||||||
@@ -23,6 +23,8 @@ install:
|
|||||||
- go get -u github.com/tcnksm/ghr
|
- go get -u github.com/tcnksm/ghr
|
||||||
|
|
||||||
build_script:
|
build_script:
|
||||||
|
- ps: $env:cabal_nightly_version=(git show -s --format='%cd' --date='format:%Y%m%d')
|
||||||
|
- IF "%APPVEYOR_REPO_TAG_NAME%"=="nightly" bash -lc "sed -i -r \"s/^(version:\s+)\S+$/\1$cabal_nightly_version/\" postgrest.cabal"
|
||||||
- stack setup --no-terminal > nul
|
- stack setup --no-terminal > nul
|
||||||
# Appveyor has a timeout of 60 mins, building can take longer, limit the time and make sure this succeeds,
|
# Appveyor has a timeout of 60 mins, building can take longer, limit the time and make sure this succeeds,
|
||||||
# previous work will get cached and finish on next commit
|
# previous work will get cached and finish on next commit
|
||||||
|
|||||||
Reference in New Issue
Block a user