Skip to content

Commit

Permalink
Merge branch 'master' into suppress-warnings-on-empty-packages
Browse files Browse the repository at this point in the history
  • Loading branch information
depressed-pho authored Jan 9, 2025
2 parents 6ca030f + 04db7d0 commit bd6c7de
Show file tree
Hide file tree
Showing 1,146 changed files with 29,242 additions and 9,255 deletions.
12 changes: 12 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# See: https://editorconfig.org
root = true

[*]
charset = utf-8

[*.hs]
indent_style = space
indent_size = 2

[Makefile]
indent_style = tab
1 change: 1 addition & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@ updates:
schedule:
# Check for updates to GitHub Actions every week
interval: "weekly"

138 changes: 118 additions & 20 deletions .github/mergify.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,22 @@
# Note: We do not use the rebase strategy to merge PRs, because that
# loses information needed by changelog-d to associate commits with PRs.

priority_rules:

- name: high priority
conditions:
- 'label=priority: high :fire:'
priority: high

# The idea is we slightly prioritize those PRs because we're in
# a release cycle if a PR matches.
- name: release branch
conditions:
- 'base~=^3\.'
- 'label!=backport'
# 'normal' is 2000, 'high' is 3000
priority: 2500

pull_request_rules:

# implementing PR delay logic: apply a label after 2 days of inactivity
Expand All @@ -8,42 +27,89 @@ pull_request_rules:
- merge delay passed
name: Wait for 2 days before validating merge
conditions:
- updated-at<2 days ago
- or:
- 'label=priority: high :fire:'
- updated-at<2 days ago
- or:
- label=merge me
- label=squash+merge me
- label=merge+no rebase
- '#approved-reviews-by>=2'

# label when Mergify is ready but waiting for the above
- actions:
label:
add:
- ready and waiting
name: Waiting out merge delay (used by bot)
conditions:
- base=master
- -draft
- -closed
- or:
- label=merge me
- label=squash+merge me
- label=merge+no rebase
- '#approved-reviews-by>=2'
- '#changes-requested-reviews-by=0'
# oy
# lifted these from branch protection imports
- check-success=fourmolu
- check-success=hlint
- check-success=Meta checks
- check-success=Doctest Cabal
- check-success=Validate post job
- check-success=Bootstrap post job
- 'check-success=docs/readthedocs.org:cabal'

# label when Mergify didn't trigger a merge automatically
- actions:
label:
add:
- waiting too long
name: Mergify hasn't merged a PR yet
conditions:
- base=master
- -draft
- -closed
- -merged
- '#approved-reviews-by>=2'
- '#changes-requested-reviews-by=0'
- updated-at<4 days ago
- label=merge delay passed
# oy
# lifted these from branch protection imports
- check-success=fourmolu
- check-success=hlint
- check-success=Meta checks
- check-success=Doctest Cabal
- check-success=Validate post job
- check-success=Bootstrap post job
- 'check-success=docs/readthedocs.org:cabal'

# rebase+merge strategy
- actions:
queue:
name: default
# Merge into master with a merge commit
method: merge
# Update the pr branch with rebase, so the history is clean
update_method: rebase
name: Put pull requests in the rebase+merge queue
conditions:
- base=master
- label=merge me
- label=merge delay passed
- '#approved-reviews-by>=2'
- '-label~=^blocked:'

# merge+squash strategy
- actions:
queue:
name: default
method: squash
# both update methods get absorbed by the squash, so we use the most
# reliable
update_method: merge
name: squash-merge
name: Put pull requests in the squash+merge queue
conditions:
- base=master
- label=squash+merge me
- label=merge delay passed
- '#approved-reviews-by>=2'
- '-label~=^blocked:'

# merge+no rebase strategy
- actions:
Expand All @@ -55,36 +121,55 @@ pull_request_rules:
- label=merge+no rebase
- label=merge delay passed
- '#approved-reviews-by>=2'
- '-label~=^blocked:'

# rebase+merge strategy for backports: require 1 approver instead of 2
# merge strategy for release branches
- actions:
queue:
name: default
name: Put release branch pull requests in the rebase+merge queue
conditions:
- label=merge me
- base!=master
- -body~=backport
- '#approved-reviews-by>=2'
- '-label~=^blocked:'

# merge+squash strategy for release branches
- actions:
queue:
name: squash-merge
name: Put release branch pull requests in the squash+merge queue
conditions:
- base!=master
- label=squash+merge me
- -body~=backport
- '#approved-reviews-by>=2'
- '-label~=^blocked:'

# merge strategy for backports: require 1 approver instead of 2
- actions:
queue:
name: default
# Merge with a merge commit
method: merge
# Update the pr branch with rebase, so the history is clean
update_method: rebase
name: Put backports in the rebase+merge queue
conditions:
- label=merge me
- base!=master
- body~=backport
- '#approved-reviews-by>=1'
- '-label~=^blocked:'

# 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: squash-merge
name: Put backports in the squash+merge queue
conditions:
- label=squash+merge me
- base!=master
- body~=backport
- '#approved-reviews-by>=1'
- '-label~=^blocked:'

# backports should be labeled as such
- actions:
Expand All @@ -96,5 +181,18 @@ pull_request_rules:
- body~=automatic backport

queue_rules:
# Mergify now requires different queues for different strategies
- name: default
update_bot_account: Mikolaj
merge_method: merge
update_method: rebase

- name: squash-merge
update_bot_account: Mikolaj
merge_method: squash
update_method: merge

defaults:
actions:
backport:
title: "Backport #{{ number }}: {{ title }}"
1 change: 1 addition & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ Include the following checklist in your PR:

* [ ] Patches conform to the [coding conventions](https://github.com/haskell/cabal/blob/master/CONTRIBUTING.md#other-conventions).
* [ ] Any changes that could be relevant to users [have been recorded in the changelog](https://github.com/haskell/cabal/blob/master/CONTRIBUTING.md#changelog).
* [ ] [Is the change significant?](https://github.com/haskell/cabal/blob/master/CONTRIBUTING.md#is-my-change-significant) If so, remember to add `significance: significant` in the changelog file.
* [ ] The documentation has been updated, if necessary.
* [ ] [Manual QA notes](https://github.com/haskell/cabal/blob/master/CONTRIBUTING.md#qa-notes) have been included.
* [ ] Tests have been added. (*Ask for help if you don’t know how to write them! Ask for an exemption if tests are too complex for too little coverage!*)
Expand Down
9 changes: 9 additions & 0 deletions .github/workflows/bootstrap.skip.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,22 @@ on:
- 'doc/**'
- '**/README.md'
- 'CONTRIBUTING.md'
- "changelog.d/**"
# only top level for these, because various test packages have them too
- "*/ChangeLog.md"
- "*/changelog.md"
- "release-notes/**"
branches:
- master
pull_request:
paths:
- 'doc/**'
- '**/README.md'
- 'CONTRIBUTING.md'
- "changelog.d/**"
- "*/ChangeLog.md"
- "*/changelog.md"
- "release-notes/**"
release:
types:
- created
Expand Down
15 changes: 12 additions & 3 deletions .github/workflows/bootstrap.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,22 @@ on:
- 'doc/**'
- '**/README.md'
- 'CONTRIBUTING.md'
- "changelog.d/**"
# only top level for these, because various test packages have them too
- "*/ChangeLog.md"
- "*/changelog.md"
- "release-notes/**"
branches:
- master
pull_request:
paths-ignore:
- 'doc/**'
- '**/README.md'
- 'CONTRIBUTING.md'
- "changelog.d/**"
- "*/ChangeLog.md"
- "*/changelog.md"
- "release-notes/**"
release:
types:
- created
Expand All @@ -30,7 +39,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.6", "9.8.2"]
include:
- os: macos-latest
ghc: "9.2.8"
Expand All @@ -43,7 +52,7 @@ jobs:
rm -rf ~/.config/cabal
rm -rf ~/.cache/cabal
- uses: actions/cache@v3
- uses: actions/cache@v4
name: Cache the downloads
id: bootstrap-cache
with:
Expand All @@ -69,7 +78,7 @@ jobs:
run: |
_build/bin/cabal --version
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: cabal-${{ matrix.os }}-${{ matrix.ghc }}-bootstrapped
path: _build/artifacts/*
Expand Down
40 changes: 5 additions & 35 deletions .github/workflows/changelogs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,43 +26,13 @@ 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" -sS --fail \
"https://codeberg.org/fgaz/changelog-d/releases/download/v1.0.1/changelog-d-v1.0.1-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
Loading

0 comments on commit bd6c7de

Please sign in to comment.