Skip to content

Commit

Permalink
Switch to GitHub Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
tfausak committed Feb 6, 2021
1 parent 47de95d commit df82665
Show file tree
Hide file tree
Showing 6 changed files with 69 additions and 84 deletions.
46 changes: 46 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: CI
on:
pull_request:
branches:
- main
push:
branches:
- main
release:
types:
- created
jobs:
build:
strategy:
matrix:
include:
- { os: ubuntu-18.04, ghc: 9.0.1, cabal: 3.4.0.0 }
- { os: ubuntu-18.04, ghc: 8.10.3, cabal: 3.2.0.0 }
- { os: macos-10.15, ghc: 8.10.3, cabal: 3.2.0.0 }
- { os: windows-2019, ghc: 8.10.3, cabal: 3.2.0.0 }
- { os: ubuntu-18.04, ghc: 8.8.4, cabal: 3.0.0.0 }
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- id: setup-haskell
uses: haskell/actions/setup@v1
with:
ghc-version: ${{ matrix.ghc }}
cabal-version: ${{ matrix.cabal }}
- run: cabal freeze && cat cabal.project.freeze
- uses: actions/cache@v2
with:
path: ${{ steps.setup-haskell.outputs.cabal-store }}
key: ${{ matrix.os }}-${{ matrix.ghc }}-${{ matrix.cabal }}-${{ hashFiles('cabal.project.freeze') }}
restore-keys: |
${{ matrix.os }}-${{ matrix.ghc }}-${{ matrix.cabal }}-
${{ matrix.os }}-${{ matrix.ghc }}-
- run: cabal test --test-show-details direct
- run: cabal sdist
- uses: actions/upload-artifact@v2
with:
path: dist-newstyle/sdist/burrito-*.tar.gz
name: burrito-${{ github.sha }}.tar.gz
- run: cabal check
- if: github.event_name == 'release' && matrix.os == 'ubuntu-18.04' && matrix.ghc == '9.0.1'
run: cabal upload --publish --username '${{ secrets.HACKAGE_USERNAME }}' --password '${{ secrets.HACKAGE_PASSWORD }}' dist-newstyle/sdist/burrito-*.tar.gz
48 changes: 0 additions & 48 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion LICENSE.markdown
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
ISC License (ISC)

Copyright 2020 Taylor Fausak
Copyright 2021 Taylor Fausak

Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
Expand Down
2 changes: 1 addition & 1 deletion README.markdown
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Burrito

[![Travis CI](https://travis-ci.org/tfausak/burrito.svg?branch=master)](https://travis-ci.org/tfausak/burrito)
[![CI](https://github.com/tfausak/burrito/workflows/CI/badge.svg)](https://github.com/tfausak/burrito/actions/new)
[![Hackage](https://img.shields.io/hackage/v/burrito)](https://hackage.haskell.org/package/burrito)
[![Stackage](https://www.stackage.org/package/burrito/badge/nightly?label=stackage)](https://www.stackage.org/package/burrito)

Expand Down
51 changes: 20 additions & 31 deletions burrito.cabal
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cabal-version: 2.2
cabal-version: >= 1.10

name: burrito
version: 1.2.0.0
Expand Down Expand Up @@ -32,37 +32,16 @@ source-repository head
location: https://github.com/tfausak/burrito
type: git

common basics
default-language: Haskell2010
ghc-options:
-Weverything
-Wno-all-missed-specialisations
-Wno-implicit-prelude
-Wno-missing-exported-signatures
-Wno-missing-import-lists
-Wno-safe
-Wno-unsafe

if impl(ghc >= 8.8)
ghc-options:
-Wno-missing-deriving-strategies

if impl(ghc >= 8.10)
ghc-options:
-Wno-missing-safe-haskell-mode
-Wno-prepositive-qualified-module

library
import: basics

build-depends:
base >= 4.12.0 && < 4.15
, bytestring >= 0.10.8 && < 0.11
, containers >= 0.6.0 && < 0.7
base >= 4.13.0 && < 4.16
, bytestring >= 0.10.10 && < 0.11
, containers >= 0.6.2 && < 0.7
, parsec >= 3.1.14 && < 3.2
, template-haskell >= 2.14.0 && < 2.17
, text >= 1.2.3 && < 1.3
, template-haskell >= 2.15.0 && < 2.18
, text >= 1.2.4 && < 1.3
, transformers >= 0.5.6 && < 0.6
default-language: Haskell2010
exposed-modules:
Burrito
Burrito.Internal.Expand
Expand All @@ -85,18 +64,28 @@ library
Burrito.Internal.Type.Token
Burrito.Internal.Type.Value
Burrito.Internal.Type.Variable
ghc-options:
-Weverything
-Wno-implicit-prelude
-Wno-missing-deriving-strategies
-Wno-missing-exported-signatures
-Wno-safe
hs-source-dirs: src/lib

test-suite test
import: basics
if impl(ghc >= 8.10)
ghc-options:
-Wno-missing-safe-haskell-mode
-Wno-prepositive-qualified-module

test-suite test
build-depends:
base -any
, burrito -any
, containers -any
, hspec >= 2.7.1 && < 2.8
, hspec >= 2.7.6 && < 2.8
, QuickCheck >= 2.13.2 && < 2.15
, text -any
default-language: Haskell2010
hs-source-dirs: src/test
main-is: Main.hs
type: exitcode-stdio-1.0
4 changes: 1 addition & 3 deletions stack.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
# snapshot: lts-14.27 # GHC 8.6
snapshot: lts-15.4 # GHC 8.8
# compiler: ghc-8.10.1 # GHC 8.10 (use with LTS-15.4)
resolver: lts-17.0

0 comments on commit df82665

Please sign in to comment.