Skip to content

Commit

Permalink
[#540] Build Summoner with 9.0 (#543)
Browse files Browse the repository at this point in the history
* [#540] Build Summoner with 9.0

Resolves #540

* Fix Stack

* Fix

* Brick is fixed

* Build examples on all OSes

Co-authored-by: Dmitrii Kovanikov <kovanikov@gmail.com>
  • Loading branch information
vrom911 and chshersh authored Apr 5, 2021
1 parent 0e93438 commit 7945feb
Show file tree
Hide file tree
Showing 8 changed files with 112 additions and 149 deletions.
117 changes: 95 additions & 22 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,70 +1,143 @@
name: CI

# Trigger the workflow on push or pull request, but only for the main branch
on:
pull_request:
types: [synchronize, opened, reopened]
push:
branches: [main]
schedule:
# additionally run once per week (At 00:00 on Sunday) to maintain cache
- cron: '0 0 * * 0'


jobs:
build:
name: ghc ${{ matrix.ghc }}
runs-on: ubuntu-16.04
cabal:
name: ${{ matrix.os }} / ghc ${{ matrix.ghc }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
cabal: ["3.2"]
os: [ubuntu-latest, macOS-latest, windows-latest]
cabal: ["3.4"]
ghc:
- "8.4.4"
- "8.6.5"
- "8.8.4"
- "8.10.3"
- "8.10.4"
- "9.0.1"
exclude:
- os: macOS-latest
ghc: 8.10.4
- os: macOS-latest
ghc: 8.8.4
- os: macOS-latest
ghc: 8.6.5
- os: macOS-latest
ghc: 8.4.4

- os: windows-latest
ghc: 8.10.4
- os: windows-latest
ghc: 8.8.4
- os: windows-latest
ghc: 8.6.5
- os: windows-latest
ghc: 8.4.4

steps:
- uses: actions/checkout@v2.3.3
if: github.event.action == 'opened' || github.event.action == 'synchronize' || github.event.ref == 'refs/heads/main'
- uses: actions/checkout@v2

- uses: haskell/actions/setup@v1
id: setup-haskell-cabal
name: Setup Haskell
with:
ghc-version: ${{ matrix.ghc }}
cabal-version: ${{ matrix.cabal }}

- uses: actions/cache@v2.1.2
- name: Configure
run: |
cabal configure --enable-tests --enable-benchmarks --test-show-details=direct --write-ghc-environment-files=always
- name: Freeze
run: |
cabal freeze
- uses: actions/cache@v2.1.4
name: Cache ~/.cabal/store
with:
path: ~/.cabal/store
key: ${{ runner.os }}-${{ matrix.ghc }}-cabal
path: ${{ steps.setup-haskell-cabal.outputs.cabal-store }}
key: ${{ runner.os }}-${{ matrix.ghc }}-${{ hashFiles('cabal.project.freeze') }}

- name: Install dependencies
run: |
cabal build all --only-dependencies
- name: Build
run: |
cabal v2-update
cabal v2-build all --enable-tests --enable-benchmarks
cabal build all
- name: Unit and property tests
run: |
cabal v2-test all --enable-tests --test-show-details=direct
cabal test all --enable-tests --test-show-details=direct
- if: matrix.ghc == '8.10.3'
- if: matrix.ghc == '8.10.4'
name: Build 'cabal-minimal'
run: |
cd "summoner-cli/examples/cabal-minimal/"
echo "packages: ." > cabal.project
cabal v2-build all
cabal build all
- name: Build 'cabal-full'
- if: matrix.ghc != '9.0.1'
name: Build 'cabal-full'
run: |
cd "summoner-cli/examples/cabal-full/"
echo "packages: ." > cabal.project
cabal v2-build all
cabal build all
- name: Build 'stack-full'
- if: matrix.ghc != '9.0.1'
name: Build 'stack-full'
run: |
cd "summoner-cli/examples/stack-full/"
echo "packages: ." > cabal.project
cabal v2-build all
cabal build all
- name: Build 'full-batteries'
- if: matrix.ghc != '9.0.1'
name: Build 'full-batteries'
run: |
cd "summoner-cli/examples/full-batteries/"
echo "packages: ." > cabal.project
cabal v2-build all
cabal build all
stack:
name: stack / ghc ${{ matrix.ghc }}
runs-on: ubuntu-latest
strategy:
matrix:
stack: ["2.5"]
ghc: ["8.10.4"]

steps:
- uses: actions/checkout@v2

- uses: haskell/actions/setup@v1
name: Setup Haskell Stack
with:
ghc-version: ${{ matrix.ghc }}
stack-version: ${{ matrix.stack }}

- uses: actions/cache@v1
name: Cache ~/.stack
with:
path: ~/.stack
key: ${{ runner.os }}-${{ matrix.ghc }}-stack

- name: Install dependencies
run: |
stack build --system-ghc --test --bench --no-run-tests --no-run-benchmarks --only-dependencies
- name: Build
run: |
stack build --system-ghc --test --bench --no-run-tests --no-run-benchmarks
- name: Test
run: |
stack test --system-ghc
59 changes: 0 additions & 59 deletions .travis.yml

This file was deleted.

2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
![wizard](https://user-images.githubusercontent.com/8126674/44388234-320aac00-a55a-11e8-879d-5dca68512031.png)

[![GitHub CI](https://github.com/kowainik/summoner/workflows/CI/badge.svg)](https://github.com/kowainik/summoner/actions)
[![Build](https://img.shields.io/travis/kowainik/summoner.svg?logo=travis)](http://travis-ci.org/kowainik/summoner)
[![Windows build](https://ci.appveyor.com/api/projects/status/github/kowainik/summoner?branch=main&svg=true)](https://ci.appveyor.com/project/kowainik/summoner)

[![Hackage](https://img.shields.io/hackage/v/summoner.svg?logo=haskell)](https://hackage.haskell.org/package/summoner)
[![Stackage Lts](http://stackage.org/package/summoner/badge/lts)](http://stackage.org/lts/package/summoner)
Expand Down
56 changes: 0 additions & 56 deletions appveyor.yml

This file was deleted.

5 changes: 5 additions & 0 deletions cabal.project
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,8 @@ packages:
summoner-tui/

tests: true

source-repository-package
type: git
location: https://github.com/kowainik/microaeson.git
tag: 0630d4d8c6d912180b35795dc462f8ea75affa99
12 changes: 6 additions & 6 deletions stack.yaml
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
resolver: lts-15.5
resolver: lts-17.9

packages:
- summoner-cli/
- summoner-tui/

extra-deps:
- colourista-0.1.0.0
- colourista-0.1.0.1
- generic-data-0.8.0.0
- hspec-hedgehog-0.0.1.1
- relude-1.0.0.0
- tomland-1.3.0.0
- validation-selective-0.1.0.0
- hashable-1.3.1.0
- microaeson-0.1.0.0
- optparse-applicative-0.16.0.0
- relude-1.0.0.1
- tomland-1.3.3.0
- vty-5.31
5 changes: 3 additions & 2 deletions summoner-cli/summoner.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ tested-with: GHC == 8.4.4
GHC == 8.6.5
GHC == 8.8.4
GHC == 8.10.3
GHC == 9.0.1
extra-source-files:
examples/summoner-default.toml

Expand Down Expand Up @@ -72,7 +73,7 @@ source-repository head
location: git@github.com:kowainik/summoner.git

common common-options
build-depends: base >= 4.11 && < 4.15
build-depends: base >= 4.11 && < 4.16
, relude ^>= 1.0.0.0

mixins: base hiding (Prelude)
Expand Down Expand Up @@ -138,7 +139,7 @@ library
autogen-modules: Paths_summoner
other-modules: Paths_summoner

build-depends: colourista ^>= 0.1
build-depends: colourista ^>= 0.1.0.1
, directory ^>= 1.3.0.2
, filepath ^>= 1.4.1.2
, generic-data ^>= 0.8.0.0
Expand Down
5 changes: 3 additions & 2 deletions summoner-tui/summoner-tui.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,14 @@ tested-with: GHC == 8.4.4
GHC == 8.6.5
GHC == 8.8.4
GHC == 8.10.3
GHC == 9.0.1

source-repository head
type: git
location: git@github.com:kowainik/summoner.git

common common-options
build-depends: base >= 4.11 && < 4.15
build-depends: base >= 4.11 && < 4.16
, relude ^>= 1.0.0.0

mixins: base hiding (Prelude)
Expand Down Expand Up @@ -79,7 +80,7 @@ library
autogen-modules: Paths_summoner_tui
other-modules: Paths_summoner_tui

build-depends: brick >= 0.56 && < 0.59
build-depends: brick >= 0.56 && < 0.61
, colourista ^>= 0.1
, directory ^>= 1.3.0.2
, microlens ^>= 0.4
Expand Down

0 comments on commit 7945feb

Please sign in to comment.