Skip to content

Commit d1a6ced

Browse files
authored
CI: install changelog-d from bindist (#10048)
This will avoid build problems when the GHC in the CI environment is updated sooner than expected. Previous breakage: #9177 (comment)
1 parent 50d9f9c commit d1a6ced

File tree

1 file changed

+4
-35
lines changed

1 file changed

+4
-35
lines changed

Diff for: .github/workflows/changelogs.yml

+4-35
Original file line numberDiff line numberDiff line change
@@ -26,43 +26,12 @@ jobs:
2626

2727
steps:
2828

29-
# Cannot install changelog-d directly from remote tarball due to
30-
# https://github.com/haskell/cabal/issues/7360
31-
# Also, we would like to get the build plan for the cache key.
32-
- name: Fetch changelog-d
33-
run: |
34-
changelog_d_latest="$(curl https://codeberg.org/api/v1/repos/fgaz/changelog-d/branches/master | jq -r .commit.id)"
35-
echo "Using changelog-d revision $changelog_d_latest"
36-
curl "https://codeberg.org/fgaz/changelog-d/archive/$changelog_d_latest.tar.gz" -o changelog-d.tar.gz
37-
tar -xf changelog-d.tar.gz
38-
39-
- name: Update Hackage index
40-
run: cabal v2-update
41-
42-
- name: Build plan for changelog-d
43-
working-directory: changelog-d
44-
run: |
45-
cabal v2-build --dry-run --allow-newer=changelog-d:base
46-
47-
- name: Restore dependencies of changelog-d
48-
uses: actions/cache/restore@v4
49-
id: cache
50-
with:
51-
path: ~/.local/state/cabal
52-
key: linux-store-changelogs-${{ hashfiles('changelog-d/dist-newstyle/cache/plan.json') }}
53-
restore-keys: linux-store-changelogs
54-
5529
- name: Install changelog-d
56-
working-directory: changelog-d
5730
run: |
58-
cabal v2-install --allow-newer=changelog-d:base
59-
60-
- name: Cache dependencies of changelog-d
61-
uses: actions/cache/save@v4
62-
if: always() && steps.cache.outputs.cache-hit != 'true'
63-
with:
64-
path: ~/.local/state/cabal
65-
key: ${{ steps.cache.outputs.cache-primary-key }}
31+
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"
32+
chmod +x "$HOME/.local/bin/changelog-d"
33+
# https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#adding-a-system-path
34+
echo "$HOME/.local/bin" >> $GITHUB_PATH
6635
6736
- name: Checkout cabal sources
6837
uses: actions/checkout@v4

0 commit comments

Comments
 (0)