From 8ce372c58ef45b49890a67581dac5873779c3215 Mon Sep 17 00:00:00 2001 From: Phil de Joux Date: Sun, 12 Jan 2025 14:04:56 -0500 Subject: [PATCH 1/4] Add a workflow to dry run cabal-install - Push to any branch - Only check with the latest GHC version - Shorten name of job - Don't skip if run on master - Don't ignore **/README.md files - Ignore known test paths - Don't ignore change logs --- .github/workflows/check-install.yml | 47 +++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 .github/workflows/check-install.yml diff --git a/.github/workflows/check-install.yml b/.github/workflows/check-install.yml new file mode 100644 index 00000000000..babd391cc7e --- /dev/null +++ b/.github/workflows/check-install.yml @@ -0,0 +1,47 @@ +name: Check install + +# See: https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#concurrency. +concurrency: + group: ${{ github.ref }}-${{ github.workflow }} + cancel-in-progress: true + +on: + push: + paths-ignore: + - 'CONTRIBUTING.md' + - 'doc/**' + - 'release-notes/**' + - 'Cabal-tests/test/**' + - 'cabal-testsuite/PackageTests/**' + pull_request: + paths-ignore: + - 'CONTRIBUTING.md' + - 'doc/**' + - 'release-notes/**' + - 'Cabal-tests/test/**' + - 'cabal-testsuite/PackageTests/**' + release: + types: + - created + +jobs: + + cabal-install-dry-run: + name: cabal install with ghc-${{ matrix.ghc }} + runs-on: ubuntu-latest + strategy: + matrix: + ghc: + ["9.12.1"] + + steps: + + - uses: haskell-actions/setup@v2 + id: setup-haskell + with: + ghc-version: ${{ matrix.ghc }} + cabal-version: latest + + - uses: actions/checkout@v4 + + - run: cabal install cabal-install --dry-run From 094901929ae5f70769ca64ddb082dae24db27517 Mon Sep 17 00:00:00 2001 From: Phil de Joux Date: Sun, 16 Feb 2025 06:41:11 -0500 Subject: [PATCH 2/4] Use paths mixing include and exclude paths --- .github/workflows/check-install.yml | 34 +++++++++++++++++++---------- 1 file changed, 22 insertions(+), 12 deletions(-) diff --git a/.github/workflows/check-install.yml b/.github/workflows/check-install.yml index babd391cc7e..fb4f69b0ab6 100644 --- a/.github/workflows/check-install.yml +++ b/.github/workflows/check-install.yml @@ -7,19 +7,29 @@ concurrency: on: push: - paths-ignore: - - 'CONTRIBUTING.md' - - 'doc/**' - - 'release-notes/**' - - 'Cabal-tests/test/**' - - 'cabal-testsuite/PackageTests/**' + paths: + - 'Cabal-QuickCheck/**' + - 'Cabal-described/**' + - 'Cabal-syntax/**' + - 'Cabal-tests/**' + - 'Cabal-tree-diff/**' + - 'Cabal/**' + - 'cabal-install-solver/**' + - 'cabal-install/**' + - '!Cabal-tests/test/**' + - '!cabal-testsuite/PackageTests/**' pull_request: - paths-ignore: - - 'CONTRIBUTING.md' - - 'doc/**' - - 'release-notes/**' - - 'Cabal-tests/test/**' - - 'cabal-testsuite/PackageTests/**' + paths: + - 'Cabal-QuickCheck/**' + - 'Cabal-described/**' + - 'Cabal-syntax/**' + - 'Cabal-tests/**' + - 'Cabal-tree-diff/**' + - 'Cabal/**' + - 'cabal-install-solver/**' + - 'cabal-install/**' + - '!Cabal-tests/test/**' + - '!cabal-testsuite/PackageTests/**' release: types: - created From 6303456971b3fa99942682c18b53687799ed87fd Mon Sep 17 00:00:00 2001 From: Phil de Joux Date: Sun, 16 Feb 2025 06:45:26 -0500 Subject: [PATCH 3/4] Revert "Fix casing of extra-source-files in Cabal-hooks" This reverts commit 963a684ccc5b3cb25e90b477bd86bce2d539c669. --- Cabal-hooks/Cabal-hooks.cabal | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cabal-hooks/Cabal-hooks.cabal b/Cabal-hooks/Cabal-hooks.cabal index 325a8f41dd9..d07b1201ec7 100644 --- a/Cabal-hooks/Cabal-hooks.cabal +++ b/Cabal-hooks/Cabal-hooks.cabal @@ -15,7 +15,7 @@ category: Distribution build-type: Simple extra-source-files: - README.md CHANGELOG.md + readme.md changelog.md source-repository head type: git From 8f99cc3833c8ec5bcbdaa79b45a18b75d7a80380 Mon Sep 17 00:00:00 2001 From: Phil de Joux Date: Sun, 16 Feb 2025 06:58:29 -0500 Subject: [PATCH 4/4] Use cabal sdist for the check --- .github/workflows/check-install.yml | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/.github/workflows/check-install.yml b/.github/workflows/check-install.yml index fb4f69b0ab6..1e15e6f2f4f 100644 --- a/.github/workflows/check-install.yml +++ b/.github/workflows/check-install.yml @@ -1,4 +1,4 @@ -name: Check install +name: Check sdist # See: https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#concurrency. concurrency: @@ -10,6 +10,7 @@ on: paths: - 'Cabal-QuickCheck/**' - 'Cabal-described/**' + - 'Cabal-hooks/**' - 'Cabal-syntax/**' - 'Cabal-tests/**' - 'Cabal-tree-diff/**' @@ -22,6 +23,7 @@ on: paths: - 'Cabal-QuickCheck/**' - 'Cabal-described/**' + - 'Cabal-hooks/**' - 'Cabal-syntax/**' - 'Cabal-tests/**' - 'Cabal-tree-diff/**' @@ -54,4 +56,12 @@ jobs: - uses: actions/checkout@v4 - - run: cabal install cabal-install --dry-run + - run: cabal sdist Cabal + - run: cabal sdist Cabal-QuickCheck + - run: cabal sdist Cabal-described + - run: cabal sdist Cabal-hooks + - run: cabal sdist Cabal-syntax + - run: cabal sdist Cabal-tests + - run: cabal sdist Cabal-tree-diff + - run: cabal sdist cabal-install + - run: cabal sdist cabal-install-solver