mirror of
https://github.com/lexi-lambda/freer-simple.git
synced 2024-09-11 08:05:51 +03:00
Switch to GitHub Actions for CI
This commit is contained in:
parent
0d1346b258
commit
ffce9c1c87
30
.github/workflows/build.yml
vendored
Normal file
30
.github/workflows/build.yml
vendored
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
name: build
|
||||||
|
on: [push]
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
ghc: ['8.6.5', '8.8.4', '8.10.7', '9.0.2', '9.2.1']
|
||||||
|
name: Build with GHC ${{ matrix.ghc }}
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- name: Setup Haskell
|
||||||
|
uses: haskell/actions/setup@v1
|
||||||
|
with:
|
||||||
|
ghc-version: ${{ matrix.ghc }}
|
||||||
|
|
||||||
|
- run: cp cabal.project.ci cabal.project.local
|
||||||
|
- run: cabal v2-update
|
||||||
|
- run: cabal v2-freeze
|
||||||
|
- uses: actions/cache@v2
|
||||||
|
with:
|
||||||
|
path: ~/.cabal/store
|
||||||
|
key: ${{ runner.os }}-${{ matrix.ghc }}-${{ hashFiles('cabal.project.freeze') }}
|
||||||
|
restore-keys: |
|
||||||
|
${{ runner.os }}-${{ matrix.ghc }}-
|
||||||
|
|
||||||
|
- run: cabal v2-build
|
||||||
|
- run: cabal v2-test
|
||||||
|
- run: cabal v2-sdist
|
58
.travis.yml
58
.travis.yml
@ -1,58 +0,0 @@
|
|||||||
language: c
|
|
||||||
|
|
||||||
cache:
|
|
||||||
directories:
|
|
||||||
- $HOME/.stack
|
|
||||||
|
|
||||||
# The different configurations we want to test.
|
|
||||||
#
|
|
||||||
# We set the compiler values here to tell Travis to use a different
|
|
||||||
# cache file per set of arguments.
|
|
||||||
matrix:
|
|
||||||
include:
|
|
||||||
- env: ARGS="--stack-yaml=stack.ghc-8.4.yaml --resolver lts-7"
|
|
||||||
compiler: ": #stack 8.0.1"
|
|
||||||
addons: { apt: { packages: [libgmp-dev] } }
|
|
||||||
|
|
||||||
- env: ARGS="--stack-yaml=stack.ghc-8.4.yaml --resolver lts-8"
|
|
||||||
compiler: ": #stack 8.0.2"
|
|
||||||
addons: { apt: { packages: [libgmp-dev] } }
|
|
||||||
|
|
||||||
- env: ARGS="--stack-yaml=stack.ghc-8.4.yaml --resolver lts-10"
|
|
||||||
compiler: ": #stack 8.2.1"
|
|
||||||
addons: { apt: { packages: [libgmp-dev] } }
|
|
||||||
|
|
||||||
- env: ARGS="--stack-yaml=stack.ghc-8.4.yaml --resolver lts-11"
|
|
||||||
compiler: ": #stack 8.2.2"
|
|
||||||
addons: { apt: { packages: [libgmp-dev] } }
|
|
||||||
|
|
||||||
- env: ARGS="--stack-yaml=stack.ghc-8.4.yaml --resolver lts-12"
|
|
||||||
compiler: ": #stack 8.4.4"
|
|
||||||
addons: { apt: { packages: [libgmp-dev] } }
|
|
||||||
|
|
||||||
- env: ARGS="--resolver lts-14"
|
|
||||||
compiler: ": #stack 8.6.5"
|
|
||||||
addons: { apt: { packages: [libgmp-dev] } }
|
|
||||||
|
|
||||||
- env: ARGS="--stack-yaml=stack.ghc-8.8.yaml --resolver nightly"
|
|
||||||
compiler: ": #stack nightly"
|
|
||||||
addons: { apt: { packages: [libgmp-dev] } }
|
|
||||||
|
|
||||||
allow_failures:
|
|
||||||
# Nightly builds are allowed to fail
|
|
||||||
- env: ARGS="--stack-yaml=stack.ghc-8.8.yaml --resolver nightly"
|
|
||||||
|
|
||||||
before_install:
|
|
||||||
# Using compiler above sets CC to an invalid value, so unset it
|
|
||||||
- unset CC
|
|
||||||
|
|
||||||
# Download and unpack the stack executable
|
|
||||||
- export PATH=$HOME/.local/bin:$PATH
|
|
||||||
- mkdir -p ~/.local/bin
|
|
||||||
- travis_retry curl -L https://www.stackage.org/stack/linux-x86_64 | tar xz --wildcards --strip-components=1 -C ~/.local/bin '*/stack'
|
|
||||||
|
|
||||||
install:
|
|
||||||
- stack -j1 --no-terminal --install-ghc $ARGS test --bench --only-dependencies
|
|
||||||
|
|
||||||
script:
|
|
||||||
- stack -j1 --no-terminal $ARGS test --bench --no-run-benchmarks --haddock --no-haddock-deps --ghc-options=-Werror
|
|
@ -1,12 +1,5 @@
|
|||||||
packages: .
|
packages: .
|
||||||
jobs: $ncpus
|
jobs: $ncpus
|
||||||
|
|
||||||
package *
|
|
||||||
haddock-html: true
|
|
||||||
haddock-hoogle: true
|
|
||||||
haddock-hyperlink-source: true
|
|
||||||
haddock-quickjump: true
|
|
||||||
|
|
||||||
package freer-simple
|
package freer-simple
|
||||||
ghc-options: -j
|
ghc-options: -j
|
||||||
haddock-options: "--optghc=-Wno-unused-imports"
|
|
||||||
|
5
cabal.project.ci
Normal file
5
cabal.project.ci
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
package freer-simple
|
||||||
|
ghc-options: -Werror
|
||||||
|
documentation: true
|
||||||
|
benchmarks: true
|
||||||
|
tests: true
|
@ -28,14 +28,14 @@ license-file: LICENSE
|
|||||||
homepage: https://github.com/lexi-lambda/freer-simple
|
homepage: https://github.com/lexi-lambda/freer-simple
|
||||||
bug-reports: https://github.com/lexi-lambda/freer-simple/issues
|
bug-reports: https://github.com/lexi-lambda/freer-simple/issues
|
||||||
|
|
||||||
source-repository head
|
|
||||||
type: git
|
|
||||||
location: https://github.com/lexi-lambda/freer-simple
|
|
||||||
|
|
||||||
extra-source-files:
|
extra-source-files:
|
||||||
CHANGELOG.md
|
CHANGELOG.md
|
||||||
README.md
|
README.md
|
||||||
|
|
||||||
|
source-repository head
|
||||||
|
type: git
|
||||||
|
location: https://github.com/lexi-lambda/freer-simple
|
||||||
|
|
||||||
common common
|
common common
|
||||||
ghc-options:
|
ghc-options:
|
||||||
-Wall
|
-Wall
|
||||||
|
Loading…
Reference in New Issue
Block a user