-
Notifications
You must be signed in to change notification settings - Fork 710
CI: add GHC 9.6.1 #8840
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
Merged
CI: add GHC 9.6.1 #8840
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
ba407e0
Bump upper bounds for some deps due to GHC 9.6
ulysses4ever 561bf1b
CI GHC 9.6: cabal-plan allow-newer base (TODO: revert)
ulysses4ever db4d518
CI GHC 9.6: allow-newer base for rere (TODO: revert)
ulysses4ever d04a881
CI GHC 9.6: have to disable *-suite validation (TODO: revert)
ulysses4ever 7ce7b7a
CI: add GHC 9.6.1 and bump minor versions on other series
ulysses4ever ea1ec57
CI: no need in chown for ghcup anymore
ulysses4ever 4f58355
CI: no need to exclude caching on Windows anymore
ulysses4ever 3b8e6e9
CI: no need to restore cache before setup-haskell
ulysses4ever bb10ae3
CI: remove separate prerelease workflow
ulysses4ever a68c07d
CI: cleanup the cache key
ulysses4ever 2e8a1e1
CI: remove the matrix.cli parameter
ulysses4ever 420ccd8
After moving GHC 9.4.2->9.4.4 some broken Windows tests work
ulysses4ever File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,10 +23,10 @@ on: | |
env: | ||
# We choose a stable ghc version across all os's | ||
# which will be used to do the next release | ||
GHC_FOR_RELEASE: '9.2.3' | ||
GHC_FOR_RELEASE: '9.2.7' | ||
# Ideally we should use the version about to be released for hackage tests and benchmarks | ||
GHC_FOR_SOLVER_BENCHMARKS: '9.2.3' | ||
GHC_FOR_COMPLETE_HACKAGE_TESTS: '9.2.3' | ||
GHC_FOR_SOLVER_BENCHMARKS: '9.2.7' | ||
GHC_FOR_COMPLETE_HACKAGE_TESTS: '9.2.7' | ||
COMMON_FLAGS: '-j 2 -v' | ||
|
||
jobs: | ||
|
@@ -38,7 +38,7 @@ jobs: | |
strategy: | ||
matrix: | ||
os: ["ubuntu-20.04", "macos-latest", "windows-latest"] | ||
ghc: ["9.4.2", "9.2.3", "9.0.2", "8.10.7", "8.8.4", "8.6.5", "8.4.4"] | ||
ghc: ["9.6.1", "9.4.4", "9.2.7", "9.0.2", "8.10.7", "8.8.4", "8.6.5", "8.4.4"] | ||
exclude: | ||
# corrupts GHA cache or the fabric of reality itself, see https://github.com/haskell/cabal/issues/8356 | ||
- os: "windows-latest" | ||
|
@@ -59,28 +59,15 @@ jobs: | |
|
||
# See the following link for a breakdown of the following step | ||
# https://github.com/haskell/actions/issues/7#issuecomment-745697160 | ||
# | ||
# See https://github.com/haskell/cabal/pull/8739 for why Windows is excluded | ||
- if: ${{ runner.os != 'Windows' }} | ||
uses: actions/cache@v3 | ||
- uses: actions/cache@v3 | ||
with: | ||
# validate.sh uses a special build dir | ||
path: | | ||
${{ steps.setup-haskell.outputs.cabal-store }} | ||
dist-* | ||
key: ${{ runner.os }}-${{ matrix.ghc }}-20220419-${{ github.sha }} | ||
restore-keys: ${{ runner.os }}-${{ matrix.ghc }}-20220419- | ||
key: ${{ runner.os }}-${{ matrix.ghc }}-${{ github.sha }} | ||
restore-keys: ${{ runner.os }}-${{ matrix.ghc }}- | ||
|
||
# See https://github.com/haskell/cabal/pull/8739 | ||
- name: Sudo chmod to permit ghcup to update its cache | ||
run: | | ||
if [[ "${{ runner.os }}" == "Linux" ]]; then | ||
sudo ls -lah /usr/local/.ghcup/cache | ||
sudo mkdir -p /usr/local/.ghcup/cache | ||
sudo ls -lah /usr/local/.ghcup/cache | ||
sudo chown -R $USER /usr/local/.ghcup | ||
sudo chmod -R 777 /usr/local/.ghcup | ||
fi | ||
- uses: haskell/actions/setup@v2 | ||
id: setup-haskell | ||
with: | ||
|
@@ -97,7 +84,7 @@ jobs: | |
- name: Install cabal-plan | ||
run: | | ||
cd $(mktemp -d) | ||
cabal install cabal-plan --constraint='cabal-plan +exe' | ||
cabal install cabal-plan --allow-newer="base" --constraint='cabal-plan +exe' | ||
echo "$HOME/.cabal/bin:$HOME/.local/bin" >> $GITHUB_PATH | ||
|
||
# The tool is not essential to the rest of the test suite. If | ||
|
@@ -120,9 +107,6 @@ jobs: | |
- name: Set validate inputs | ||
run: | | ||
FLAGS="${{ env.COMMON_FLAGS }}" | ||
if [[ "${{ matrix.cli }}" == "false" ]]; then | ||
FLAGS="$FLAGS --lib-only" | ||
fi | ||
if [[ ${{ matrix.ghc }} == ${{ env.GHC_FOR_SOLVER_BENCHMARKS }} ]]; then | ||
FLAGS="$FLAGS --solver-benchmarks" | ||
fi | ||
|
@@ -131,6 +115,11 @@ jobs: | |
fi | ||
echo "FLAGS=$FLAGS" >> $GITHUB_ENV | ||
|
||
- name: Allow newer dependencies when built with latest GHC | ||
if: ${{ matrix.ghc }} == '9.6.1' | ||
run: | | ||
echo "allow-newer: rere:base, rere:transformers" >> cabal.project.validate | ||
|
||
- name: Validate print-config | ||
run: sh validate.sh $FLAGS -s print-config | ||
|
||
|
@@ -141,7 +130,7 @@ jobs: | |
run: sh validate.sh $FLAGS -s build | ||
|
||
- name: Tar cabal head executable | ||
if: matrix.cli != 'false' && matrix.ghc == env.GHC_FOR_RELEASE | ||
if: matrix.ghc == env.GHC_FOR_RELEASE | ||
run: | | ||
CABAL_EXEC=$(cabal-plan list-bin --builddir=dist-newstyle-validate-ghc-${{ matrix.ghc }} cabal-install:exe:cabal) | ||
# We have to tar the executable to preserve executable permissions | ||
|
@@ -163,7 +152,7 @@ jobs: | |
# - Reuse it in the dogfooding job (although we could use the cached build dir) | ||
# - Make it available in the workflow to make easier testing it locally | ||
- name: Upload cabal-install executable to workflow artifacts | ||
if: matrix.cli != 'false' && matrix.ghc == env.GHC_FOR_RELEASE | ||
if: matrix.ghc == env.GHC_FOR_RELEASE | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: cabal-${{ runner.os }}-${{ matrix.ghc }} | ||
|
@@ -177,145 +166,18 @@ jobs: | |
run: sh validate.sh $FLAGS -s lib-tests | ||
|
||
- name: Validate lib-suite | ||
# Have to disable *-suite validation: | ||
# - the [email protected] problem is tracked at https://github.com/haskell/cabal/issues/8858 | ||
# - but curently can't run it with GHC 9.6, tracking: https://github.com/haskell/cabal/issues/8883 | ||
if: (runner.os != 'Windows') || (matrix.ghc != '9.6.1') | ||
run: sh validate.sh $FLAGS -s lib-suite | ||
|
||
- name: Validate cli-tests | ||
if: matrix.cli != 'false' | ||
run: sh validate.sh $FLAGS -s cli-tests | ||
|
||
- name: Validate cli-suite | ||
if: matrix.cli != 'false' | ||
run: sh validate.sh $FLAGS -s cli-suite | ||
|
||
# The job below is a copy-paste of validate with the necessary tweaks | ||
# to make all work with an upcoming GHC. Those tweaks include: | ||
# - ghcup needs the prerelease channel activated | ||
# - allow-newer for base libraries and Cabal* libraries | ||
# - (sometimes) disabling some parts on Windows because it's hard to figure | ||
# out why they fail | ||
validate-prerelease: | ||
# TODO: reenable when the next GHC prerelease appears | ||
if: false | ||
|
||
name: Validate ${{ matrix.os }} ghc-prerelease | ||
runs-on: ${{ matrix.os }} | ||
outputs: | ||
GHC_FOR_RELEASE: ${{ format('["{0}"]', env.GHC_FOR_RELEASE) }} | ||
strategy: | ||
matrix: | ||
os: ["ubuntu-20.04", "macos-latest", "windows-latest"] | ||
|
||
steps: | ||
|
||
- uses: actions/checkout@v3 | ||
|
||
# See the following link for a breakdown of the following step | ||
# https://github.com/haskell/actions/issues/7#issuecomment-745697160 | ||
# | ||
# See https://github.com/haskell/cabal/pull/8739 for why Windows is excluded | ||
- if: ${{ runner.os != 'Windows' }} | ||
uses: actions/cache@v3 | ||
with: | ||
# validate.sh uses a special build dir | ||
path: | | ||
${{ steps.setup-haskell.outputs.cabal-store }} | ||
dist-* | ||
key: ${{ runner.os }}-${{ matrix.ghc }}-20220419-${{ github.sha }} | ||
restore-keys: ${{ runner.os }}-${{ matrix.ghc }}-20220419- | ||
|
||
# See https://github.com/haskell/cabal/pull/8739 | ||
- name: Sudo chmod to permit ghcup to update its cache | ||
run: | | ||
if [[ "${{ runner.os }}" == "Linux" ]]; then | ||
sudo ls -lah /usr/local/.ghcup/cache | ||
sudo mkdir -p /usr/local/.ghcup/cache | ||
sudo ls -lah /usr/local/.ghcup/cache | ||
sudo chown -R $USER /usr/local/.ghcup | ||
sudo chmod -R 777 /usr/local/.ghcup | ||
fi | ||
|
||
- name: ghcup | ||
run: | | ||
ghcup --version | ||
ghcup config set cache true | ||
ghcup config add-release-channel https://raw.githubusercontent.com/haskell/ghcup-metadata/master/ghcup-prereleases-0.0.7.yaml | ||
ghcup install ghc --set 9.6.0.20230210 | ||
ghcup install cabal --set latest | ||
ghc --version | ||
cabal update | ||
|
||
- name: Work around git problem https://bugs.launchpad.net/ubuntu/+source/git/+bug/1993586 (cabal PR #8546) | ||
run: | | ||
git config --global protocol.file.allow always | ||
|
||
# The '+exe' constraint below is important, otherwise cabal-install | ||
# might decide to build the library but not the executable which is | ||
# what we need. | ||
- name: Install cabal-plan | ||
run: | | ||
cd $(mktemp -d) | ||
cabal install cabal-plan --constraint='cabal-plan +exe' --allow-newer | ||
echo "$HOME/.cabal/bin:$HOME/.local/bin" >> $GITHUB_PATH | ||
|
||
# The tool is not essential to the rest of the test suite. If | ||
# hackage-repo-tool is not present, any test that requires it will | ||
# be skipped. | ||
# We want to keep this in the loop but we don't want to fail if | ||
# hackage-repo-tool breaks or fails to support a newer GHC version. | ||
- name: Install hackage-repo-tool | ||
continue-on-error: true | ||
run: | | ||
cd $(mktemp -d) | ||
cabal install hackage-repo-tool | ||
|
||
# Needed by cabal-testsuite/PackageTests/Configure/setup.test.hs | ||
- name: Install Autotools | ||
if: runner.os == 'macOS' | ||
run: | | ||
brew install automake | ||
|
||
- name: Allow newer boot libraries | ||
run: | | ||
echo "allow-newer: base, template-haskell, ghc-prim, Cabal-syntax, Cabal-described, Cabal, cabal-install-solver, cabal-install" >> cabal.project.validate | ||
|
||
- name: Set validate inputs | ||
run: | | ||
FLAGS="${{ env.COMMON_FLAGS }}" | ||
if [[ "${{ matrix.cli }}" == "false" ]]; then | ||
FLAGS="$FLAGS --lib-only" | ||
fi | ||
echo "FLAGS=$FLAGS" >> $GITHUB_ENV | ||
|
||
- name: Validate print-config | ||
run: sh validate.sh $FLAGS -s print-config | ||
|
||
- name: Validate print-tool-versions | ||
run: sh validate.sh $FLAGS -s print-tool-versions | ||
|
||
- name: Validate build | ||
run: sh validate.sh $FLAGS -s build | ||
|
||
- name: Validate lib-tests | ||
env: | ||
# `rawSystemStdInOut reports text decoding errors` | ||
# test does not find ghc without the full path in windows | ||
GHCPATH: ${{ steps.setup-haskell.outputs.ghc-exe }} | ||
run: sh validate.sh $FLAGS -s lib-tests | ||
|
||
- name: Validate lib-suite | ||
# see https://github.com/haskell/cabal/pull/8754#issuecomment-1435025848 | ||
# for discussion about the trouble on Windows | ||
if: ${{ runner.os != 'Windows' }} | ||
run: sh validate.sh $FLAGS -s lib-suite | ||
|
||
- name: Validate cli-tests | ||
if: matrix.cli != 'false' | ||
run: sh validate.sh $FLAGS -s cli-tests | ||
|
||
- name: Validate cli-suite | ||
# see https://github.com/haskell/cabal/pull/8754#issuecomment-1435025848 | ||
# for discussion about the trouble on Windows | ||
if: ( runner.os != 'Windows' ) && ( matrix.cli != 'false' ) | ||
# Have to disable *-suite validation, see above the comment for lib-suite | ||
if: (runner.os != 'Windows') || (matrix.ghc != '9.6.1') | ||
run: sh validate.sh $FLAGS -s cli-suite | ||
|
||
validate-old-ghcs: | ||
|
@@ -351,17 +213,6 @@ jobs: | |
git fetch origin $GITHUB_SHA:temporary-ci-branch | ||
git checkout $GITHUB_SHA || (git fetch && git checkout $GITHUB_SHA) | ||
|
||
# As we are reusing the cached build dir from the previous step | ||
# the generated artifacts are available here, | ||
# including the cabal executable and the test suite | ||
- uses: actions/cache@v3 | ||
with: | ||
path: | | ||
${{ steps.setup-haskell.outputs.cabal-store }} | ||
dist-* | ||
key: ${{ runner.os }}-${{ matrix.ghc }}-20220419-${{ github.sha }} | ||
restore-keys: ${{ runner.os }}-${{ matrix.ghc }}-20220419- | ||
|
||
- name: Install extra compiler | ||
run: | | ||
apt-get update | ||
|
@@ -373,10 +224,21 @@ jobs: | |
ghc-version: ${{ matrix.ghc }} | ||
cabal-version: latest # latest is mandatory for cabal-testsuite, see https://github.com/haskell/cabal/issues/8133 | ||
|
||
# As we are reusing the cached build dir from the previous step | ||
# the generated artifacts are available here, | ||
# including the cabal executable and the test suite | ||
- uses: actions/cache@v3 | ||
with: | ||
path: | | ||
${{ steps.setup-haskell.outputs.cabal-store }} | ||
dist-* | ||
key: ${{ runner.os }}-${{ matrix.ghc }}-${{ github.sha }} | ||
restore-keys: ${{ runner.os }}-${{ matrix.ghc }}- | ||
|
||
- name: Install cabal-plan | ||
run: | | ||
cd $(mktemp -d) | ||
cabal install cabal-plan --constraint='cabal-plan +exe' | ||
cabal install cabal-plan --allow-newer="base" --constraint='cabal-plan +exe' | ||
echo "$HOME/.cabal/bin:$HOME/.local/bin" >> $GITHUB_PATH | ||
|
||
- name: Validate build | ||
|
@@ -424,7 +286,7 @@ jobs: | |
- name: Install cabal-plan | ||
run: | | ||
cd $(mktemp -d) | ||
cabal install cabal-plan --constraint='cabal-plan +exe' | ||
cabal install cabal-plan --allow-newer="base" --constraint='cabal-plan +exe' | ||
echo "$HOME/.cabal/bin:$HOME/.local/bin" >> $GITHUB_PATH | ||
|
||
- name: Download cabal executable from workflow artifacts | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,4 @@ | ||
import Test.Cabal.Prelude | ||
main = cabalTest $ do | ||
isWin <- isWindows | ||
ghc94 <- isGhcVersion "== 9.4.*" | ||
expectBrokenIf (isWin && ghc94) 8451 $ do | ||
cabal "v2-build" ["foreign-opts-c-exe"] | ||
withPlan $ runPlanExe "foreign-opts-c" "foreign-opts-c-exe" [] |
3 changes: 0 additions & 3 deletions
3
cabal-testsuite/PackageTests/FFI/ForeignOptsCxx/cabal.test.hs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,4 @@ | ||
import Test.Cabal.Prelude | ||
main = cabalTest $ do | ||
isWin <- isWindows | ||
ghc94 <- isGhcVersion "== 9.4.*" | ||
expectBrokenIf (isWin && ghc94) 8451 $ do | ||
cabal "v2-build" ["foreign-opts-cxx-exe"] | ||
withPlan $ runPlanExe "foreign-opts-cxx" "foreign-opts-cxx-exe" [] |
3 changes: 0 additions & 3 deletions
3
cabal-testsuite/PackageTests/NewBuild/CmdBench/OptionsFlag/cabal.test.hs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.