|
1 |
| -name: Assorted |
| 1 | +name: Changelogs |
2 | 2 |
|
3 | 3 | on:
|
4 | 4 | push:
|
|
25 | 25 | runs-on: ubuntu-latest
|
26 | 26 |
|
27 | 27 | steps:
|
| 28 | +<<<<<<< HEAD |
28 | 29 | - name: Set PATH
|
29 | 30 | # https://docs.github.com/en/free-pro-team@latest/actions/reference/workflow-commands-for-github-actions#adding-a-system-path
|
30 | 31 | run: |
|
@@ -55,11 +56,50 @@ jobs:
|
55 | 56 | repository: "fgaz/changelog-d"
|
56 | 57 | path: "changelog-d"
|
57 | 58 | - name: Install changelog-d
|
| 59 | +======= |
| 60 | + |
| 61 | + # Cannot install changelog-d directly from remote tarball due to |
| 62 | + # https://github.com/haskell/cabal/issues/7360 |
| 63 | + # Also, we would like to get the build plan for the cache key. |
| 64 | + - name: Fetch changelog-d |
58 | 65 | run: |
|
59 |
| - pushd changelog-d |
60 |
| - cabal v2-install |
61 |
| - popd |
62 |
| - - uses: actions/checkout@v4 |
| 66 | + changelog_d_latest="$(curl https://codeberg.org/api/v1/repos/fgaz/changelog-d/branches/master | jq -r .commit.id)" |
| 67 | + echo "Using changelog-d revision $changelog_d_latest" |
| 68 | + curl "https://codeberg.org/fgaz/changelog-d/archive/$changelog_d_latest.tar.gz" -o changelog-d.tar.gz |
| 69 | + tar -xf changelog-d.tar.gz |
| 70 | +
|
| 71 | + - name: Update Hackage index |
| 72 | + run: cabal v2-update |
| 73 | + |
| 74 | + - name: Build plan for changelog-d |
| 75 | + working-directory: changelog-d |
| 76 | +>>>>>>> af5d60613 (CI changelogs: switch to XDG, fix cache key) |
| 77 | + run: | |
| 78 | + cabal v2-build --dry-run --allow-newer=changelog-d:base |
| 79 | +
|
| 80 | + - name: Restore dependencies of changelog-d |
| 81 | + uses: actions/cache/restore@v4 |
| 82 | + id: cache |
| 83 | + with: |
| 84 | + path: ~/.local/state/cabal |
| 85 | + key: linux-store-changelogs-${{ hashfiles('changelog-d/dist-newstyle/cache/plan.json') }} |
| 86 | + restore-keys: linux-store-changelogs |
| 87 | + |
| 88 | + - name: Install changelog-d |
| 89 | + working-directory: changelog-d |
| 90 | + run: | |
| 91 | + cabal v2-install --allow-newer=changelog-d:base |
| 92 | +
|
| 93 | + - name: Cache dependencies of changelog-d |
| 94 | + uses: actions/cache/save@v4 |
| 95 | + if: always() && steps.cache.outputs.cache-hit != 'true' |
| 96 | + with: |
| 97 | + path: ~/.local/state/cabal |
| 98 | + key: ${{ steps.cache.outputs.cache-primary-key }} |
| 99 | + |
| 100 | + - name: Checkout cabal sources |
| 101 | + uses: actions/checkout@v4 |
| 102 | + |
63 | 103 | - name: Run changelog-d
|
64 | 104 | run: |
|
65 | 105 | changelog-d changelog.d
|
0 commit comments