mirror of
https://github.com/commercialhaskell/stackage.git
synced 2026-01-11 23:08:30 +01:00
Merge pull request #3941 from commercialhaskell/gitlab-too
Add a Gitlab CI configuration
This commit is contained in:
commit
43467ab858
15
.gitlab-ci.yml
Normal file
15
.gitlab-ci.yml
Normal file
@ -0,0 +1,15 @@
|
||||
image: fpco/stack-build:lts-12.8
|
||||
|
||||
cache:
|
||||
paths:
|
||||
- $HOME/.stack
|
||||
- $HOME/.stackage/curator/cache
|
||||
|
||||
stages:
|
||||
- build
|
||||
|
||||
build:
|
||||
stage: build
|
||||
script:
|
||||
# Edit etc/ci-script.sh to change GHC version
|
||||
- ./etc/ci-script.sh
|
||||
24
.travis.yml
24
.travis.yml
@ -10,29 +10,9 @@ addons:
|
||||
packages:
|
||||
- libgmp-dev
|
||||
|
||||
env:
|
||||
- GHCVER=8.4.3
|
||||
|
||||
install:
|
||||
# Download and unpack the stack executable
|
||||
- mkdir -p ~/.local/bin
|
||||
- export PATH=$HOME/.local/bin:$PATH
|
||||
- travis_retry curl -L https://www.stackage.org/stack/linux-x86_64 | tar xz --wildcards --strip-components=1 -C ~/.local/bin '*/stack'
|
||||
|
||||
# Get stackage-curator
|
||||
- wget https://s3.amazonaws.com/stackage-travis/stackage-curator/stackage-curator.bz2
|
||||
- bunzip2 stackage-curator.bz2
|
||||
- chmod +x stackage-curator
|
||||
- mv stackage-curator ~/.local/bin
|
||||
|
||||
# Install GHC and cabal-install
|
||||
- stack setup $GHCVER
|
||||
|
||||
# Update the index
|
||||
- travis_retry stack update
|
||||
|
||||
# Edit etc/ci-script.sh to change GHC version
|
||||
script:
|
||||
- stack --resolver ghc-$GHCVER exec stackage-curator check
|
||||
- ./etc/ci-script.sh
|
||||
|
||||
cache:
|
||||
directories:
|
||||
|
||||
25
etc/ci-script.sh
Executable file
25
etc/ci-script.sh
Executable file
@ -0,0 +1,25 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -euxo pipefail
|
||||
|
||||
export GHCVER=8.4.3
|
||||
|
||||
# Download and unpack the stack executable
|
||||
mkdir -p ~/.local/bin
|
||||
export PATH=$HOME/.local/bin:$PATH
|
||||
curl -L https://www.stackage.org/stack/linux-x86_64 | tar xz --wildcards --strip-components=1 -C ~/.local/bin '*/stack'
|
||||
|
||||
# Get stackage-curator
|
||||
wget https://s3.amazonaws.com/stackage-travis/stackage-curator/stackage-curator.bz2
|
||||
bunzip2 stackage-curator.bz2
|
||||
chmod +x stackage-curator
|
||||
mv stackage-curator ~/.local/bin
|
||||
|
||||
# Install GHC
|
||||
stack setup $GHCVER
|
||||
|
||||
# Update the index
|
||||
stack update
|
||||
|
||||
# Check
|
||||
exec stack --resolver ghc-$GHCVER exec stackage-curator check
|
||||
Loading…
Reference in New Issue
Block a user