Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Regenerate case mapping #334

Merged
merged 4 commits into from
May 8, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 30 additions & 28 deletions .github/workflows/haskell-ci.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
# This GitHub workflow config has been generated by a script via
#
# haskell-ci 'github' '--config=cabal.haskell-ci' 'cabal.project'
# haskell-ci 'github' '--config=cabal.haskell-ci' 'cabal.project' '--doctest'
#
# To regenerate the script (for example after adjusting tested-with) run
#
# haskell-ci regenerate
#
# For more information, see https://github.com/haskell-CI/haskell-ci
#
# version: 0.11.20210222
# version: 0.13.20210525
#
# REGENDATA ("0.11.20210222",["github","--config=cabal.haskell-ci","cabal.project"])
# REGENDATA ("0.13.20210525",["github","--config=cabal.haskell-ci","cabal.project","--doctest"])
#
name: Haskell-CI
on:
Expand All @@ -22,39 +22,39 @@ on:
- master
jobs:
linux:
name: Haskell-CI - Linux - GHC ${{ matrix.ghc }}
name: Haskell-CI - Linux - ${{ matrix.compiler }}
runs-on: ubuntu-18.04
container:
image: buildpack-deps:bionic
image: buildpack-deps:xenial
continue-on-error: ${{ matrix.allow-failure }}
strategy:
matrix:
include:
- ghc: 9.0.1
- compiler: ghc-9.0.1
allow-failure: false
- ghc: 8.10.4
- compiler: ghc-8.10.4
allow-failure: false
- ghc: 8.8.4
- compiler: ghc-8.8.4
allow-failure: false
- ghc: 8.6.5
- compiler: ghc-8.6.5
allow-failure: false
- ghc: 8.4.4
- compiler: ghc-8.4.4
allow-failure: false
- ghc: 8.2.2
- compiler: ghc-8.2.2
allow-failure: false
- ghc: 8.0.2
- compiler: ghc-8.0.2
allow-failure: false
- ghc: 7.10.3
- compiler: ghc-7.10.3
allow-failure: false
- ghc: 7.8.4
- compiler: ghc-7.8.4
allow-failure: false
- ghc: 7.6.3
- compiler: ghc-7.6.3
allow-failure: false
- ghc: 7.4.2
- compiler: ghc-7.4.2
allow-failure: false
- ghc: 7.2.2
- compiler: ghc-7.2.2
allow-failure: false
- ghc: 7.0.4
- compiler: ghc-7.0.4
allow-failure: false
fail-fast: false
steps:
Expand All @@ -64,29 +64,31 @@ jobs:
apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common
apt-add-repository -y 'ppa:hvr/ghc'
apt-get update
apt-get install -y ghc-$GHC_VERSION cabal-install-3.4
apt-get install -y $CC cabal-install-3.4
env:
GHC_VERSION: ${{ matrix.ghc }}
CC: ${{ matrix.compiler }}
- name: Set PATH and environment variables
run: |
echo "$HOME/.cabal/bin" >> $GITHUB_PATH
echo "LANG=C.UTF-8" >> $GITHUB_ENV
echo "CABAL_DIR=$HOME/.cabal" >> $GITHUB_ENV
echo "CABAL_CONFIG=$HOME/.cabal/config" >> $GITHUB_ENV
HC=/opt/ghc/$GHC_VERSION/bin/ghc
HCDIR=$(echo "/opt/$CC" | sed 's/-/\//')
HCNAME=ghc
HC=$HCDIR/bin/$HCNAME
echo "HC=$HC" >> $GITHUB_ENV
echo "HCPKG=/opt/ghc/$GHC_VERSION/bin/ghc-pkg" >> $GITHUB_ENV
echo "HADDOCK=/opt/ghc/$GHC_VERSION/bin/haddock" >> $GITHUB_ENV
echo "HCPKG=$HCDIR/bin/$HCNAME-pkg" >> $GITHUB_ENV
echo "HADDOCK=$HCDIR/bin/haddock" >> $GITHUB_ENV
echo "CABAL=/opt/cabal/3.4/bin/cabal -vnormal+nowrap" >> $GITHUB_ENV
HCNUMVER=$(${HC} --numeric-version|perl -ne '/^(\d+)\.(\d+)\.(\d+)(\.(\d+))?$/; print(10000 * $1 + 100 * $2 + ($3 == 0 ? $5 != 1 : $3))')
echo "HCNUMVER=$HCNUMVER" >> $GITHUB_ENV
echo "ARG_TESTS=--enable-tests" >> $GITHUB_ENV
if [ $((HCNUMVER >= 70600)) -ne 0 ] ; then echo "ARG_BENCH=--enable-benchmarks" >> $GITHUB_ENV ; else echo "ARG_BENCH=--disable-benchmarks" >> $GITHUB_ENV ; fi
echo "HEADHACKAGE=false" >> $GITHUB_ENV
echo "ARG_COMPILER=--ghc --with-compiler=$HC" >> $GITHUB_ENV
echo "ARG_COMPILER=--$HCNAME --with-compiler=$HC" >> $GITHUB_ENV
echo "GHCJSARITH=0" >> $GITHUB_ENV
env:
GHC_VERSION: ${{ matrix.ghc }}
CC: ${{ matrix.compiler }}
- name: env
run: |
env
Expand Down Expand Up @@ -121,7 +123,7 @@ jobs:
- name: cache (tools)
uses: actions/cache@v2.1.5
with:
key: ${{ runner.os }}-${{ matrix.ghc }}-tools-2f29a7e3
key: ${{ runner.os }}-${{ matrix.compiler }}-tools-8139d618
path: ~/.haskell-ci-tools
- name: install cabal-plan
run: |
Expand Down Expand Up @@ -175,9 +177,9 @@ jobs:
- name: cache
uses: actions/cache@v2.1.5
with:
key: ${{ runner.os }}-${{ matrix.ghc }}-${{ github.sha }}
key: ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}
path: ~/.cabal/store
restore-keys: ${{ runner.os }}-${{ matrix.ghc }}-
restore-keys: ${{ runner.os }}-${{ matrix.compiler }}-
- name: build w/o tests
run: |
$CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks all
Expand Down
4 changes: 3 additions & 1 deletion benchmarks/haskell/Benchmarks/Builder.hs
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,17 @@
--
-- * Concatenating many small strings using a builder
--
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE CPP, OverloadedStrings #-}
module Benchmarks.Builder
( benchmark
) where

import Test.Tasty.Bench (Benchmark, bgroup, bench, nf)
import Data.Binary.Builder as B
import Data.ByteString.Char8 ()
#if !MIN_VERSION_base(4,8,0)
import Data.Monoid (mconcat, mempty)
#endif
import qualified Data.ByteString.Builder as Blaze
import qualified Data.ByteString as SB
import qualified Data.ByteString.Lazy as LB
Expand Down
1 change: 1 addition & 0 deletions benchmarks/haskell/Benchmarks/DecodeUtf8.hs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{-# LANGUAGE ForeignFunctionInterface #-}
{-# OPTIONS_GHC -fno-warn-deprecations #-}

-- | Test decoding of UTF-8
--
Expand Down
5 changes: 5 additions & 0 deletions benchmarks/haskell/Benchmarks/FileRead.hs
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,16 @@
--
-- * Reading a file from the disk
--

{-# LANGUAGE CPP #-}

module Benchmarks.FileRead
( benchmark
) where

#if !MIN_VERSION_base(4,8,0)
import Control.Applicative ((<$>))
#endif
import Test.Tasty.Bench (Benchmark, bgroup, bench, whnfIO)
import qualified Data.ByteString as SB
import qualified Data.ByteString.Lazy as LB
Expand Down
6 changes: 4 additions & 2 deletions benchmarks/haskell/Benchmarks/Programs/BigTable.hs
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,15 @@
--
-- * Writing to a handle
--
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE CPP, OverloadedStrings #-}
module Benchmarks.Programs.BigTable
( benchmark
) where

import Test.Tasty.Bench (Benchmark, bench, whnfIO)
import Data.Monoid (mappend, mconcat)
#if !MIN_VERSION_base(4,8,0)
import Data.Monoid (mconcat, mempty, mappend)
#endif
import Data.Text.Lazy.Builder (Builder, fromText, toLazyText)
import Data.Text.Lazy.IO (hPutStr)
import System.IO (Handle)
Expand Down
4 changes: 3 additions & 1 deletion benchmarks/haskell/Benchmarks/Programs/Fold.hs
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,16 @@
--
-- * Writing back to a handle
--
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE CPP, OverloadedStrings #-}
module Benchmarks.Programs.Fold
( benchmark
) where

import Data.List (foldl')
import Data.List (intersperse)
#if !MIN_VERSION_base(4,8,0)
import Data.Monoid (mempty, mappend, mconcat)
#endif
import System.IO (Handle)
import Test.Tasty.Bench (Benchmark, bench, whnfIO)
import qualified Data.Text as T
Expand Down
4 changes: 3 additions & 1 deletion benchmarks/haskell/Benchmarks/Programs/Sort.hs
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,15 @@
--
-- * Writing back to a handle
--
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE CPP, OverloadedStrings #-}
module Benchmarks.Programs.Sort
( benchmark
) where

import Test.Tasty.Bench (Benchmark, bgroup, bench, whnfIO)
#if !MIN_VERSION_base(4,8,0)
import Data.Monoid (mconcat)
#endif
import System.IO (Handle)
import qualified Data.ByteString as B
import qualified Data.ByteString.Lazy as BL
Expand Down
2 changes: 2 additions & 0 deletions benchmarks/haskell/Benchmarks/Pure.hs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ module Benchmarks.Pure
import Control.DeepSeq (NFData (..))
import Control.Exception (evaluate)
import Test.Tasty.Bench (Benchmark, bgroup, bench, nf)
#if !MIN_VERSION_base(4,8,0)
import Data.Monoid (mappend, mempty)
#endif
import GHC.Base (Char (..), Int (..), chr#, ord#, (+#))
import GHC.Generics (Generic)
import GHC.Int (Int64)
Expand Down
2 changes: 1 addition & 1 deletion scripts/CaseMapping.hs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import SpecialCasing
main = do
args <- getArgs
let oname = case args of
[] -> "../Data/Text/Internal/Fusion/CaseMapping.hs"
[] -> "../src/Data/Text/Internal/Fusion/CaseMapping.hs"
[o] -> o
psc <- parseSC "SpecialCasing.txt"
pcf <- parseCF "CaseFolding.txt"
Expand Down
Loading