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
geekosaur authored Jun 26, 2024
2 parents 4b59113 + bf6f26d commit c597551
Show file tree
Hide file tree
Showing 515 changed files with 13,190 additions and 4,233 deletions.
15 changes: 15 additions & 0 deletions .github/mergify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,21 @@ pull_request_rules:
- body~=backport
- '#approved-reviews-by>=1'

# merge+squash strategy for backports: require 1 approver instead of 2
- actions:
queue:
name: default
method: squash
# both update methods get absorbed by the squash, so we use the most
# reliable
update_method: merge
name: Put backports in the squash+merge queue
conditions:
- label=squash+merge me
- base!=master
- body~=backport
- '#approved-reviews-by>=1'

# backports should be labeled as such
- actions:
label:
Expand Down
7 changes: 4 additions & 3 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Please read [Github PR Conventions](https://github.com/haskell/cabal/blob/master

---

**Template Α: This PR modifies `cabal` behaviour**
**Template Α: This PR modifies [behaviour or interface](https://github.com/cabalism/cabal/blob/master/CONTRIBUTING.md#changelog)**

Include the following checklist in your PR:

Expand All @@ -14,10 +14,11 @@ Include the following checklist in your PR:

---

**Template Β: This PR does not modify `cabal` behaviour (documentation, tests, refactoring, etc.)**
**Template B: This PR does not modify behaviour or interface**

*E.g. the PR only touches documentation or tests, does refactorings, etc.*

Include the following checklist in your PR:

* [ ] Patches conform to the [coding conventions](https://github.com/haskell/cabal/blob/master/CONTRIBUTING.md#other-conventions).
* [ ] Is this a PR that fixes CI? If so, it will need to be backported to older cabal release branches (ask maintainers for directions).

24 changes: 7 additions & 17 deletions .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.1"]
ghc: ["8.10.7", "9.0.2", "9.2.8", "9.4.8", "9.6.4", "9.8.2"]
include:
- os: macos-latest
ghc: "9.2.8"
Expand All @@ -52,28 +52,18 @@ jobs:
restore-keys: bootstrap-${{ runner.os }}-${{ matrix.ghc }}-20221115-

- uses: actions/checkout@v4
# 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
with:
ghc-version: ${{ matrix.ghc }}

- name: bootstrap.py
run: |
GHC_VERSION=${{ matrix.ghc }}
ghcup --version
ghcup config set cache true
ghcup install ghc $GHC_VERSION
# Fetch the bootstrap sources (we use linux dependencies also on macos)
python3 bootstrap/bootstrap.py -w $(ghcup whereis ghc $GHC_VERSION) -d bootstrap/linux-$GHC_VERSION.json fetch
python3 bootstrap/bootstrap.py -d bootstrap/linux-$GHC_VERSION.json fetch
# Bootstrap using the bootstrap sources
python3 bootstrap/bootstrap.py -w $(ghcup whereis ghc $GHC_VERSION) --bootstrap-sources bootstrap-sources.tar.gz
python3 bootstrap/bootstrap.py --bootstrap-sources bootstrap-sources.tar.gz
- name: Smoke test
run: |
Expand Down
39 changes: 4 additions & 35 deletions .github/workflows/changelogs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,43 +26,12 @@ jobs:

steps:

# Cannot install changelog-d directly from remote tarball due to
# https://github.com/haskell/cabal/issues/7360
# Also, we would like to get the build plan for the cache key.
- name: Fetch changelog-d
run: |
changelog_d_latest="$(curl https://codeberg.org/api/v1/repos/fgaz/changelog-d/branches/master | jq -r .commit.id)"
echo "Using changelog-d revision $changelog_d_latest"
curl "https://codeberg.org/fgaz/changelog-d/archive/$changelog_d_latest.tar.gz" -o changelog-d.tar.gz
tar -xf changelog-d.tar.gz
- name: Update Hackage index
run: cabal v2-update

- name: Build plan for changelog-d
working-directory: changelog-d
run: |
cabal v2-build --dry-run --allow-newer=changelog-d:base
- name: Restore dependencies of changelog-d
uses: actions/cache/restore@v4
id: cache
with:
path: ~/.local/state/cabal
key: linux-store-changelogs-${{ hashfiles('changelog-d/dist-newstyle/cache/plan.json') }}
restore-keys: linux-store-changelogs

- name: Install changelog-d
working-directory: changelog-d
run: |
cabal v2-install --allow-newer=changelog-d:base
- name: Cache dependencies of changelog-d
uses: actions/cache/save@v4
if: always() && steps.cache.outputs.cache-hit != 'true'
with:
path: ~/.local/state/cabal
key: ${{ steps.cache.outputs.cache-primary-key }}
curl --create-dirs -o "$HOME/.local/bin/changelog-d" "https://codeberg.org/fgaz/changelog-d/releases/download/v1.0/changelog-d-v1.0-x86_64-linux"
chmod +x "$HOME/.local/bin/changelog-d"
# https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#adding-a-system-path
echo "$HOME/.local/bin" >> $GITHUB_PATH
- name: Checkout cabal sources
uses: actions/checkout@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
- uses: actions/checkout@v4
- uses: haskell-actions/hlint-setup@v2
with:
version: "3.5"
version: "3.8"
- uses: haskell-actions/hlint-run@v2
with:
path: "."
Expand Down
53 changes: 42 additions & 11 deletions .github/workflows/quick-jobs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,26 +14,27 @@ on:
types:
- created

env:
GHC_FOR_QUICK_JOBS: 9.6.5

jobs:
meta:
name: Meta checks
runs-on: ubuntu-latest
env:
cabal_build: >-
cabal build --builddir=dist-newstyle-meta --project-file=cabal.project.meta
cabal build --builddir=dist-newstyle-meta --project-file=cabal.meta.project
gen-cabal-macros
gen-paths-module
gen-spdx
gen-spdx-exc
# This job is not run in a container, any recent GHC should be fine
steps:
# SKIP installation of ghc and cabal and use the preinstalled versions.
# - name: ghcup
# run: |
# ghcup --version
# ghcup config set cache true
# ghcup install ghc recommended
# ghcup set ghc recommended
- 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: Haskell versions
run: |
ghc --version
Expand Down Expand Up @@ -71,6 +72,16 @@ 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: Haskell versions
run: |
ghc --version
cabal --version
# It is complicated to get a proper cache key for the dependencies of a package
# (here: doctest) that we just `cabal install`.
# So, as a heuristics we update the cache once per day.
Expand Down Expand Up @@ -106,6 +117,16 @@ 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: Haskell versions
run: |
ghc --version
cabal --version
- name: Update Hackage index
run: cabal v2-update
- uses: actions/checkout@v4
Expand Down Expand Up @@ -133,10 +154,20 @@ 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: Haskell versions
run: |
ghc --version
cabal --version
- name: Update Hackage Index
run: cabal v2-update
- uses: actions/checkout@v4
- name: Check Release with Pinned Hackage
run: cabal build all --dry-run --project-file=cabal.project.release
run: cabal build all --dry-run --project-file=cabal.release.project
- name: Check Release with Latest Hackage
run: cabal build all --dry-run --project-file=cabal.project.release --index-state="hackage.haskell.org HEAD"
run: cabal build all --dry-run --project-file=cabal.release.project --index-state="hackage.haskell.org HEAD"
10 changes: 8 additions & 2 deletions .github/workflows/users-guide.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ on:
- 'doc/Makefile'
- 'doc/pyproject.toml'
- 'doc/requirements.in'
- 'doc/requirements.txt'
- 'doc/*.inc'
- 'doc/*.py'
- 'doc/*.rst'
Expand All @@ -26,7 +25,6 @@ on:
- 'doc/Makefile'
- 'doc/pyproject.toml'
- 'doc/requirements.in'
- 'doc/requirements.txt'
- 'doc/*.inc'
- 'doc/*.py'
- 'doc/*.rst'
Expand Down Expand Up @@ -58,6 +56,14 @@ jobs:
with:
python-version: ${{ matrix.python-version }}

- name: Install pip-compile
run: |
pip install pip-tools
- name: Create requirements.txt from requirements.in
run: |
make users-guide-requirements
# Subsumed by make users-guide
# - name: Install dependencies
# run: |
Expand Down
Loading

0 comments on commit c597551

Please sign in to comment.