Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/stable'
Browse files Browse the repository at this point in the history
  • Loading branch information
snoyberg committed Apr 22, 2020
2 parents cd73d72 + cd501e7 commit 8cee2f9
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 36 deletions.
17 changes: 0 additions & 17 deletions .azure/azure-linux-template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,23 +36,6 @@ jobs:
./etc/scripts/get-hlint.sh
export PATH="$(pwd)"/hlint:$PATH
;;
cabal)
sudo add-apt-repository -y ppa:hvr/ghc
sudo apt-get update
sudo apt-get install cabal-install-$CABALVER ghc-$GHCVER
# See note here: https://github.com/haskell-CI/haskell-ci#alex--happy-with-ghc--78
if [ "$GHCVER" = "head" ] || [ "${GHCVER%.*}" = "7.8" ] || [ "${GHCVER%.*}" = "7.10" ]; then
sudo apt-get install happy-1.19.4 alex-3.1.3
export PATH=/opt/alex/3.1.3/bin:/opt/happy/1.19.4/bin:$PATH
else
sudo apt-get install happy alex
fi
export PATH=$HOME/.local/bin:/opt/ghc/$GHCVER/bin:/opt/cabal/$CABALVER/bin:$PATH
cabal --version
cabal update
PACKAGES=$(stack --install-ghc query locals | grep '^ *path' | sed 's@^ *path:@@')
cabal install --only-dependencies --enable-tests --enable-benchmarks --force-reinstalls --ghc-options=-O0 --reorder-goals --max-backjumps=-1 $CABALARGS $PACKAGES
;;
*)
export PATH=$HOME/.local/bin:$PATH
stack --install-ghc $ARGS test --bench --only-dependencies
Expand Down
18 changes: 16 additions & 2 deletions .azure/azure-nightly-template-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ jobs:
vmImage: ${{ parameters.vmImage }}
steps:
- script: |
set -ex
export STACK_ROOT="$(Build.SourcesDirectory)"/.stack-root;
echo $STACK_ROOT
mkdir -p ~/.local/bin
Expand All @@ -17,31 +19,39 @@ jobs:
cache-s3 --prefix="${CACHE_S3_PREFIX}" --git-branch="$(Build.SourceBranchName)" --suffix="${OS_NAME}" restore stack work --base-branch="${BASE_BRANCH}"
etc/scripts/ci-setup.sh
export PATH=$HOME/.local/bin:/opt/ghc/$GHCVER/bin:/opt/happy/1.19.5/bin:/opt/alex/3.1.7/bin:$PATH
set +ex
env:
OS_NAME: ${{ parameters.os }}
AWS_ACCESS_KEY_ID: $(AWS_ACCESS_KEY_ID)
AWS_SECRET_ACCESS_KEY: $(AWS_SECRET_ACCESS_KEY)
displayName: 'Installation ${{parameters.os}}'
- script: |
set -ex
# Retry installing nix due to nondeterministic error
# Fatal error: glibc detected an invalid stdio handle
# See:
# https://github.com/nh2/static-haskell-nix/pull/27#issuecomment-502652181
# https://github.com/NixOS/nix/issues/2733
(for i in {1..5}; do bash <(curl https://nixos.org/nix/install) && exit 0; done; exit 1)
source ~/.profile
. ~/.nix-profile/etc/profile.d/nix.sh
nix-channel --add https://nixos.org/channels/nixos-19.09 nixpkgs
nix-channel --update # Get GHC 8.2.2
export STACK_ROOT="$(Build.SourcesDirectory)"/.stack-root;
export PATH=$HOME/.local/bin:$PATH;
stack etc/scripts/release.hs check
set +ex
displayName: Integration Test
- script: |
set -ex
export STACK_ROOT="$(Build.SourcesDirectory)"/.stack-root;
export PATH=$HOME/.local/bin:$PATH;
set -ex
stack etc/scripts/release.hs build
cp _release/stack-* $(Build.ArtifactStagingDirectory)
set +ex
displayName: Build bindist
condition: in(variables['Agent.JobStatus'], 'Succeeded', 'SucceededWithIssues', 'Failed')
Expand All @@ -51,6 +61,8 @@ jobs:
artifactName: stack-linux
condition: in(variables['Agent.JobStatus'], 'Succeeded', 'SucceededWithIssues', 'Failed')
- script: |
set -ex
export PATH=$HOME/.local/bin:$PATH;
export AWS_ACCESS_KEY_ID="$(AWS_ACCESS_KEY_ID)";
export AWS_SECRET_ACCESS_KEY="$(AWS_SECRET_ACCESS_KEY)";
Expand All @@ -59,6 +71,8 @@ jobs:
cache-s3 --prefix="${CACHE_S3_PREFIX}" --git-branch="$(Build.SourceBranchName)" --suffix="${OS_NAME}" save stack;
fi;
cache-s3 --prefix="${CACHE_S3_PREFIX}" --git-branch="$(Build.SourceBranchName)" --suffix="${OS_NAME}" save stack work
set +ex
env:
OS_NAME: ${{ parameters.os }}
displayName: 'Cache data'
16 changes: 16 additions & 0 deletions .azure/azure-nightly-template-osx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ jobs:
vmImage: ${{ parameters.vmImage }}
steps:
- script: |
set -ex
export AWS_ACCESS_KEY_ID="$(AWS_ACCESS_KEY_ID)";
export AWS_SECRET_ACCESS_KEY="$(AWS_SECRET_ACCESS_KEY)";
export STACK_ROOT="$(Build.SourcesDirectory)"/.stack-root;
Expand All @@ -20,21 +22,31 @@ jobs:
etc/scripts/ci-setup.sh
brew install mercurial
export PATH=$HOME/.local/bin:/opt/ghc/$GHCVER/bin:/opt/happy/1.19.5/bin:/opt/alex/3.1.7/bin:$PATH
set +ex
env:
OS_NAME: ${{ parameters.os }}
displayName: 'Installation ${{parameters.os}}'
- script: |
set -ex
curl https://nixos.org/nix/install | sh
. ~/.nix-profile/etc/profile.d/nix.sh
export STACK_ROOT="$(Build.SourcesDirectory)"/.stack-root;
export PATH=$HOME/.local/bin:$PATH;
stack etc/scripts/release.hs check
set +ex
displayName: Integration Test
- script: |
set -ex
export STACK_ROOT="$(Build.SourcesDirectory)"/.stack-root;
export PATH=$HOME/.local/bin:$PATH;
stack etc/scripts/release.hs build
cp _release/stack-* $(Build.ArtifactStagingDirectory)
set +ex
condition: in(variables['Agent.JobStatus'], 'Succeeded', 'SucceededWithIssues', 'Failed')
displayName: Build bindist
- task: PublishBuildArtifacts@1
Expand All @@ -43,6 +55,8 @@ jobs:
artifactName: stack-osx
condition: in(variables['Agent.JobStatus'], 'Succeeded', 'SucceededWithIssues', 'Failed')
- script: |
set -ex
export PATH=$HOME/.local/bin:$PATH;
export AWS_ACCESS_KEY_ID="$(AWS_ACCESS_KEY_ID)";
export AWS_SECRET_ACCESS_KEY="$(AWS_SECRET_ACCESS_KEY)";
Expand All @@ -51,6 +65,8 @@ jobs:
cache-s3 --prefix="${CACHE_S3_PREFIX}" --git-branch="$(Build.SourceBranchName)" --suffix="${OS_NAME}" save stack;
fi;
cache-s3 --prefix="${CACHE_S3_PREFIX}" --git-branch="$(Build.SourceBranchName)" --suffix="${OS_NAME}" save stack work
set +ex
env:
OS_NAME: ${{ parameters.os }}
displayName: 'Cache data'
4 changes: 2 additions & 2 deletions doc/install_and_upgrade.md
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,8 @@ Use the [generic Linux option](#linux).

There is also an
unofficial
[Fedora Copr repo](https://copr.fedoraproject.org/coprs/petersen/stack/) which
can be enabled with: `sudo dnf copr enable petersen/stack`. Note that this Stack
[Fedora Copr repo](https://copr.fedoraproject.org/coprs/petersen/stack2/) which
can be enabled with: `sudo dnf copr enable petersen/stack2`. Note that this Stack
version may lag behind, so we recommend running `stack upgrade` after installing
it.

Expand Down
15 changes: 0 additions & 15 deletions etc/scripts/ci-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,18 +23,3 @@ if [ `uname` = "Darwin" ]; then
else
travis_retry fetch_stack_linux
fi

case "$BUILD" in
stack)
# However, we only need stack to download GHC for stack builds.
travis_retry stack --no-terminal setup;
;;
cabal)
mkdir -p $HOME/.cabal
cat > $HOME/.cabal/config <<EOF
remote-repo: hackage.haskell.org:http://hackage.fpcomplete.com/
remote-repo-cache: $HOME/.cabal/packages
jobs: \$ncpus
EOF
;;
esac

0 comments on commit 8cee2f9

Please sign in to comment.