diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index a919fb10..4d6ae319 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -17,12 +17,35 @@ jobs: matrix: include: # Linux - - { cabal: "3.4", os: ubuntu-latest, ghc: "7.10.3" } - - { cabal: "3.4", os: ubuntu-latest, ghc: "8.0.2" } - - { cabal: "3.4", os: ubuntu-latest, ghc: "8.2.2" } - - { cabal: "3.4", os: ubuntu-latest, ghc: "latest" } + - { cabal: "3.6", os: ubuntu-latest, ghc: "7.10.3" } + - { cabal: "3.6", os: ubuntu-latest, ghc: "8.0.2" } + - { cabal: "3.6", os: ubuntu-latest, ghc: "8.2.2" } + - { cabal: "3.6", os: ubuntu-latest, ghc: "8.4.4" } + - { cabal: "3.6", os: ubuntu-latest, ghc: "8.6.5" } + - { cabal: "3.6", os: ubuntu-latest, ghc: "8.8.4" } + # - { cabal: "3.6", os: ubuntu-latest, ghc: "8.10.7" } + - { cabal: "3.6", os: ubuntu-latest, ghc: "9.0.2" } + - { cabal: "3.6", os: ubuntu-latest, ghc: "9.2.2" } # MacOS - - { cabal: "3.4", os: macOS-latest, ghc: "latest" } + - { cabal: "3.6", os: macOS-latest, ghc: "7.10.3" } + - { cabal: "3.6", os: macOS-latest, ghc: "8.0.2" } + - { cabal: "3.6", os: macOS-latest, ghc: "8.2.2" } + - { cabal: "3.6", os: macOS-latest, ghc: "8.4.4" } + - { cabal: "3.6", os: macOS-latest, ghc: "8.6.5" } + - { cabal: "3.6", os: macOS-latest, ghc: "8.8.4" } + # - { cabal: "3.6", os: macOS-latest, ghc: "8.10.7" } + - { cabal: "3.6", os: macOS-latest, ghc: "9.0.2" } + - { cabal: "3.6", os: macOS-latest, ghc: "9.2.2" } + # Windows + - { cabal: "3.6", os: windows-latest, ghc: "7.10.3" } + - { cabal: "3.6", os: windows-latest, ghc: "8.0.2" } + - { cabal: "3.6", os: windows-latest, ghc: "8.2.2" } + - { cabal: "3.6", os: windows-latest, ghc: "8.4.4" } + - { cabal: "3.6", os: windows-latest, ghc: "8.6.5" } + - { cabal: "3.6", os: windows-latest, ghc: "8.8.4" } + # - { cabal: "3.6", os: windows-latest, ghc: "8.10.7" } + - { cabal: "3.6", os: windows-latest, ghc: "9.0.2" } + - { cabal: "3.6", os: windows-latest, ghc: "9.2.2" } steps: - uses: actions/checkout@v2 - uses: actions/setup-haskell@v1 @@ -57,7 +80,7 @@ jobs: fail-fast: false matrix: os: [ubuntu-latest] - resolver: [nightly, lts-18, lts-16, lts-14, lts-12] + resolver: [nightly, lts-19, lts-18, lts-16, lts-14, lts-12] include: - resolver: lts-12 ghc: 8.4.4 @@ -68,24 +91,37 @@ jobs: ghc: 8.8.4 stack-yaml: stack-old.yaml - resolver: lts-18 - ghc: 8.10.4 + ghc: 8.10.7 + stack-yaml: stack.yaml + - resolver: lts-19 + ghc: 9.0.2 stack-yaml: stack.yaml - resolver: nightly stack-yaml: stack.yaml # Latest stable for MacOS: ghc-8.8.4 - resolver: lts-16 os: macos-latest + stack-yaml: stack-old.yaml # Latest stable for Windows: ghc-8.6.4 - resolver: lts-14 os: windows-latest stack-yaml: stack-coveralls.yaml env: STACK_YAML: stack.yaml - STACK_ARGS: '--resolver ${{ matrix.resolver }}' - cache-version: v3 # bump up this version to invalidate currently stored cache + STACK_ARGS: '--resolver ${{ matrix.resolver }} --system-ghc' + cache-version: v4 # bump up this version to invalidate currently stored cache steps: - uses: actions/checkout@v2 + - uses: haskell/actions/setup@v1 + id: setup-haskell-cabal + name: Setup Haskell + with: + ghc-version: ${{ matrix.ghc }} + enable-stack: true + stack-version: 'latest' + cabal-version: '3.6' + - name: Cache id: cache uses: actions/cache@v2 @@ -116,25 +152,19 @@ jobs: restore-keys: | ${{ runner.os }}-${{ matrix.resolver }}-programs-${{ env.cache-version }} - # For ubuntu we can use fast ppa installation that also reduce cache size drastically - - name: Ubuntu install GHC - if: matrix.ghc != '' && matrix.os == 'ubuntu-latest' - run: | - sudo add-apt-repository ppa:hvr/ghc -y - sudo apt-get update - sudo apt-get install ghc-${{ matrix.ghc }} - name: Install Stack and GHC run: | set -ex curl -sSL https://get.haskellstack.org/ | sh -s - -f - curl -sSL https://raw.githubusercontent.com/lehins/utils/786c3fe7e9e1345d7b403019f52e344627224edf/haskell/git-modtime/git-modtime.hs -o git-modtime.hs + curl -sSL https://raw.githubusercontent.com/lehins/utils/5d9b17f2f084ce54978dbd71974970483063a540/haskell/git-modtime/git-modtime.hs -o git-modtime.hs [ -n "${{ matrix.ghc }}" ] && [ "${{ matrix.os }}" == "ubuntu-latest" ] && STACK_ARGS="$STACK_ARGS --system-ghc" [ -n "${{ matrix.stack-yaml }}" ] && STACK_YAML=${{ matrix.stack-yaml }} # git-modtime.hs updates modification time of files to the latest commit time that # a file was modified in. This ensures that stack does not rebuild unchanged # files. More info in this SO answer: # https://stackoverflow.com/questions/60906336/stack-haskell-build-cache-of-source-files-with-github-actions/61178945#61178945 - stack $STACK_ARGS runghc git-modtime.hs + # Windows is confused about stack's default user directory + stack $STACK_ARGS runghc -- git-modtime.hs -f .stack-work/tree-contents.txt - name: Tests env: COVERALLS_TOKEN: ${{ secrets.COVERALLS_TOKEN }} diff --git a/random.cabal b/random.cabal index 3e8182b3..7aa655e2 100644 --- a/random.cabal +++ b/random.cabal @@ -119,7 +119,7 @@ test-suite legacy-test RangeTest default-language: Haskell2010 - ghc-options: -with-rtsopts=-M4M + ghc-options: -with-rtsopts=-M8M if impl(ghc >= 8.0) ghc-options: -Wno-deprecations diff --git a/stack.yaml b/stack.yaml index ea70d354..d15416fa 100644 --- a/stack.yaml +++ b/stack.yaml @@ -1,11 +1,4 @@ -resolver: lts-18.0 +resolver: lts-18.28 packages: - . -extra-deps: -- splitmix-0.1.0.3@sha256:fc3aae74c467f4b608050bef53aec17904a618731df9407e655d8f3bf8c32d5c,6049 -- smallcheck-1.2.1@sha256:1ef2b61327ddac96f46766dabd50f8a8bbdfccfae532248757849bfa01eac4d4,1512 -- tasty-1.4.1@sha256:69e90e965543faf0fc2c8e486d6c1d8cf81fd108e2c4541234c41490f392f94f,2638 -- tasty-bench-0.2.5@sha256:4f00fdafc3aba6e48366a3684c427618d98c0b1b130cd9cab35c9498796c9a65,1497 -- inspection-testing-0.4.5.0@sha256:938e7ce2ef42033071a5e60198c6e19ab61c411f5879b85821247a504f131768,8058 -- tasty-inspection-testing-0.1@sha256:9c5e76345168fd3a59b43d305eebf8df3c792ce324c66bbdee45b54aa7d2c0ad,1214 -- primitive-0.7.1.0@sha256:29de6bfd0cf8ba023ceb806203dfbec0e51e3524e75ffe41056f70b4229c6f0f,2728 +extra-deps: []