Skip to content

Commit

Permalink
Merge branch 'master' into configure-messages
Browse files Browse the repository at this point in the history
  • Loading branch information
mergify[bot] authored Aug 3, 2024
2 parents c597551 + e931ca1 commit 3eaee16
Show file tree
Hide file tree
Showing 306 changed files with 5,080 additions and 4,901 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/bootstrap.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest]
ghc: ["8.10.7", "9.0.2", "9.2.8", "9.4.8", "9.6.4", "9.8.2"]
ghc: ["9.0.2", "9.2.8", "9.4.8", "9.6.4", "9.8.2"]
include:
- os: macos-latest
ghc: "9.2.8"
Expand Down
48 changes: 24 additions & 24 deletions .github/workflows/quick-jobs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@ jobs:
gen-spdx
gen-spdx-exc
steps:
- name: ghcup
run: |
ghcup --version
ghcup config set cache true
ghcup install ghc $GHC_FOR_QUICK_JOBS
ghcup set ghc $GHC_FOR_QUICK_JOBS
- name: Install primary compiler
uses: haskell-actions/setup@v2
id: setup-haskell
with:
ghc-version: ${{ env.GHC_FOR_QUICK_JOBS }}
cabal-version: latest
- name: Haskell versions
run: |
ghc --version
Expand Down Expand Up @@ -72,12 +72,12 @@ jobs:
name: Doctest Cabal
runs-on: ubuntu-latest
steps:
- name: ghcup
run: |
ghcup --version
ghcup config set cache true
ghcup install ghc $GHC_FOR_QUICK_JOBS
ghcup set ghc $GHC_FOR_QUICK_JOBS
- name: Install primary compiler
uses: haskell-actions/setup@v2
id: setup-haskell
with:
ghc-version: ${{ env.GHC_FOR_QUICK_JOBS }}
cabal-version: latest
- name: Haskell versions
run: |
ghc --version
Expand Down Expand Up @@ -117,12 +117,12 @@ jobs:
env:
cabal_build: cabal build buildinfo-reference-generator
steps:
- name: ghcup
run: |
ghcup --version
ghcup config set cache true
ghcup install ghc $GHC_FOR_QUICK_JOBS
ghcup set ghc $GHC_FOR_QUICK_JOBS
- name: Install primary compiler
uses: haskell-actions/setup@v2
id: setup-haskell
with:
ghc-version: ${{ env.GHC_FOR_QUICK_JOBS }}
cabal-version: latest
- name: Haskell versions
run: |
ghc --version
Expand Down Expand Up @@ -154,12 +154,12 @@ jobs:
name: Check Release Project
runs-on: ubuntu-latest
steps:
- name: ghcup
run: |
ghcup --version
ghcup config set cache true
ghcup install ghc $GHC_FOR_QUICK_JOBS
ghcup set ghc $GHC_FOR_QUICK_JOBS
- name: Install primary compiler
uses: haskell-actions/setup@v2
id: setup-haskell
with:
ghc-version: ${{ env.GHC_FOR_QUICK_JOBS }}
cabal-version: latest
- name: Haskell versions
run: |
ghc --version
Expand Down
137 changes: 73 additions & 64 deletions .github/workflows/validate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,16 @@ concurrency:
on:
push:
paths-ignore:
- 'doc/**'
- '**/README.md'
- 'CONTRIBUTING.md'
- "doc/**"
- "**/README.md"
- "CONTRIBUTING.md"
branches:
- master
pull_request:
paths-ignore:
- 'doc/**'
- '**/README.md'
- 'CONTRIBUTING.md'
- "doc/**"
- "**/README.md"
- "CONTRIBUTING.md"
release:
types:
- created
Expand All @@ -31,27 +31,26 @@ on:
inputs:
allow-newer:
description: allow-newer line
required: true
required: false
type: string
constraints:
description: constraints line
required: true
required: false
type: string

env:
# We choose a stable ghc version across all os's
# which will be used to do the next release
GHC_FOR_RELEASE: '9.4.8'
GHC_FOR_RELEASE: "9.4.8"
# Ideally we should use the version about to be released for hackage tests and benchmarks
GHC_FOR_SOLVER_BENCHMARKS: '9.4.8'
GHC_FOR_COMPLETE_HACKAGE_TESTS: '9.4.8'
COMMON_FLAGS: '-j 2 -v'
GHC_FOR_SOLVER_BENCHMARKS: "9.4.8"
GHC_FOR_COMPLETE_HACKAGE_TESTS: "9.4.8"
COMMON_FLAGS: "-j 2 -v"

# See https://github.com/haskell/cabal/blob/master/CONTRIBUTING.md#hackage-revisions
ALLOWNEWER: ${{ github.event.inputs.allow-newer }}
CONSTRAINTS: ${{ github.event.inputs.constraints }}


jobs:
validate:
name: Validate ${{ matrix.sys.os }} ghc-${{ matrix.ghc }}
Expand All @@ -61,28 +60,36 @@ jobs:
strategy:
matrix:
sys:
- { os: windows-latest, shell: 'C:/msys64/usr/bin/bash.exe -e {0}' }
- { os: ubuntu-latest, shell: bash }
- { os: macos-13, shell: bash}
- { os: windows-latest, shell: "C:/msys64/usr/bin/bash.exe -e {0}" }
- { os: ubuntu-latest, shell: bash }
- { os: macos-13, shell: bash }
# If you remove something from here, then add it to the old-ghcs job.
# Also a removed GHC from here means that we are actually dropping
# support, so the PR *must* have a changelog entry.
ghc: ['9.10.1', '9.8.2', '9.6.4', '9.4.8', '9.2.8', '9.0.2', '8.10.7', '8.8.4', '8.6.5']
ghc:
[
"9.10.1",
"9.8.2",
"9.6.4",
"9.4.8",
"9.2.8",
"9.0.2",
"8.10.7",
"8.8.4",
]
exclude:
# corrupts GHA cache or the fabric of reality itself, see https://github.com/haskell/cabal/issues/8356
- sys: { os: windows-latest, shell: 'C:/msys64/usr/bin/bash.exe -e {0}' }
ghc: '8.10.7'
- sys:
{ os: windows-latest, shell: "C:/msys64/usr/bin/bash.exe -e {0}" }
ghc: "8.10.7"
# lot of segfaults caused by ghc bugs
- sys: { os: windows-latest, shell: 'C:/msys64/usr/bin/bash.exe -e {0}' }
ghc: '8.8.4'
# it often randomly does "C:\Users\RUNNER~1\AppData\Local\Temp\ghcFEDE.c: DeleteFile "\\\\?\\C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\ghcFEDE.c": permission denied (Access is denied.)"
- sys: { os: windows-latest, shell: 'C:/msys64/usr/bin/bash.exe -e {0}' }
ghc: '8.6.5'
- sys:
{ os: windows-latest, shell: "C:/msys64/usr/bin/bash.exe -e {0}" }
ghc: "8.8.4"
defaults:
run:
shell: ${{ matrix.sys.shell }}
run:
shell: ${{ matrix.sys.shell }}
steps:

- name: Work around XDG directories existence (haskell-actions/setup#62)
if: runner.os == 'macOS'
run: |
Expand All @@ -92,11 +99,15 @@ jobs:
- uses: actions/checkout@v4

# See https://github.com/haskell/cabal/blob/master/CONTRIBUTING.md#hackage-revisions
- name: Manually supplied constraints/allow-newer
if: github.event_name == 'workflow_dispatch'
- name: Add manually supplied allow-newer
if: github.event_name == 'workflow_dispatch' && github.event.inputs.allow-newer != ''
run: |
echo "allow-newer: ${ALLOWNEWER}" >> cabal.validate.project
echo "constraints: ${CONSTRAINTS}" >> cabal.validate.project
echo "allow-newer: ${{ github.event.inputs.allow-newer }}" >> cabal.validate.project
- name: Add manually supplied constraints
if: github.event_name == 'workflow_dispatch' && github.event.inputs.constraints != ''
run: |
echo "constraints: ${{ github.event.inputs.constraints }}" >> cabal.validate.project
- uses: haskell-actions/setup@v2
id: setup-haskell
Expand Down Expand Up @@ -209,21 +220,20 @@ jobs:
if: matrix.ghc == env.GHC_FOR_SOLVER_BENCHMARKS
run: sh validate.sh $FLAGS -s solver-benchmarks-run


validate-old-ghcs:
name: Validate old ghcs ${{ matrix.extra-ghc }}
runs-on: ubuntu-latest
needs: validate

strategy:
matrix:
extra-ghc: ['8.4.4', '8.2.2', '8.0.2']
extra-ghc:
["8.4.4", "8.2.2", "8.0.2"]
## GHC 7.10.3 does not install on ubuntu-22.04 with ghcup.
## Older GHCs are not supported by ghcup in the first place.
fail-fast: false

steps:

- uses: actions/checkout@v4

- name: Install prerequisites for old GHCs
Expand Down Expand Up @@ -272,7 +282,7 @@ jobs:
build-alpine:
name: Build statically linked using alpine
runs-on: ubuntu-latest
container: 'alpine:3.19'
container: "alpine:3.19"
steps:
- name: Install extra dependencies
shell: sh
Expand Down Expand Up @@ -332,7 +342,6 @@ jobs:
name: cabal-${{ runner.os }}-static-x86_64
path: ${{ env.CABAL_EXEC_TAR }}


# The previous jobs use a released version of cabal to build cabal HEAD itself
# This one uses the cabal HEAD generated executable in the previous step
# to build itself again, as sanity check
Expand Down Expand Up @@ -389,34 +398,34 @@ jobs:
needs: [validate, validate-old-ghcs, build-alpine, dogfooding]

steps:
- uses: actions/download-artifact@v3
with:
name: cabal-Windows-x86_64

- uses: actions/download-artifact@v3
with:
name: cabal-Linux-x86_64

- uses: actions/download-artifact@v3
with:
name: cabal-Linux-static-x86_64

- uses: actions/download-artifact@v3
with:
name: cabal-macOS-x86_64

- name: Create GitHub prerelease
uses: marvinpinto/[email protected]
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
automatic_release_tag: cabal-head
prerelease: true
title: cabal-head
files: |
cabal-head-Windows-x86_64.tar.gz
cabal-head-Linux-x86_64.tar.gz
cabal-head-Linux-static-x86_64.tar.gz
cabal-head-macOS-x86_64.tar.gz
- uses: actions/download-artifact@v3
with:
name: cabal-Windows-x86_64

- uses: actions/download-artifact@v3
with:
name: cabal-Linux-x86_64

- uses: actions/download-artifact@v3
with:
name: cabal-Linux-static-x86_64

- uses: actions/download-artifact@v3
with:
name: cabal-macOS-x86_64

- name: Create GitHub prerelease
uses: marvinpinto/[email protected]
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
automatic_release_tag: cabal-head
prerelease: true
title: cabal-head
files: |
cabal-head-Windows-x86_64.tar.gz
cabal-head-Linux-x86_64.tar.gz
cabal-head-Linux-static-x86_64.tar.gz
cabal-head-macOS-x86_64.tar.gz
# We use this job as a summary of the workflow
# It will fail if any of the previous jobs does it
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ bootstrap/*.plan.json
/cabal-install/dist/
/cabal-install/Setup
/cabal-install/source-file-list
/cabal-install/tests/IntegrationTests2/config/cabal-config

.stylish-haskell.yaml
.stylish-haskell.yml
Expand Down Expand Up @@ -68,6 +69,7 @@ register.sh
# listed explicitly to show which files are generated but ignored
testdb/intree/cabal.project-test
testdb/intree/store/**/bin/alex
testdb/intree/store/**/bin/alex.exe
testdb/intree/store/**/cabal-hash.txt
testdb/intree/store/**/share/AlexTemplate.hs
testdb/intree/store/**/share/AlexWrappers.hs
Expand All @@ -78,7 +80,6 @@ testdb/intree/store/*/package.db/package.cache.lock

# windows test artifacts
cabal-testsuite/**/*.exe
cabal-testsuite/**/*.bat
cabal-testsuite/**/haddocks

# python artifacts from documentation builds
Expand Down
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,7 @@ description: {
}
```

Only the `synopsis` field is actually required, but you should also set the others where applicable.
Only the `synopsis` and `prs` fields are required, but you should also set the others where applicable.

| Field | Description |
| ----- | ----------- |
Expand Down Expand Up @@ -429,7 +429,7 @@ it, someone with enough permissions needs to go on the
[Validate workflow page](https://github.com/haskell/cabal/actions/workflows/validate.yml)
and dispatch it manually by clicking "Run workflow".

Running workflow manually as discussed above requires you to supply two inputs:
Running workflow manually as discussed above allows you to supply two inputs:

> allow-newer line
> constraints line
Expand Down
4 changes: 0 additions & 4 deletions Cabal-QuickCheck/src/Test/QuickCheck/GenericArbitrary.hs
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,6 @@ module Test.QuickCheck.GenericArbitrary (
import GHC.Generics
import Test.QuickCheck

#if !MIN_VERSION_base(4,8,0)
import Control.Applicative (pure, (<$>), (<*>))
#endif

-- Generic arbitrary for non-recursive types
genericArbitrary :: (Generic a, GArbitrary (Rep a)) => Gen a
genericArbitrary = fmap to garbitrary
Expand Down
Loading

0 comments on commit 3eaee16

Please sign in to comment.