Skip to content

Commit e2bb894

Browse files
committed
CI: use 3.17.0.0 pre-built binary
1 parent 9e841a2 commit e2bb894

File tree

1 file changed

+15
-4
lines changed

1 file changed

+15
-4
lines changed

.github/workflows/reusable-release.yml

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ on:
1616
default: "install_bin install_lib update_package_db"
1717
cabal:
1818
type: string
19-
default: 3.14.2.0
19+
default: 3.17.0.0
2020
test:
2121
type: boolean
2222
default: true
@@ -26,6 +26,8 @@ env:
2626
GHC_VERSION: ${{ inputs.ghc }}
2727
GHC_TARGETS: ${{ inputs.ghc_targets }}
2828
CABAL_VERSION: ${{ inputs.cabal }}
29+
# this makes the Makefile pick system cabal instead of building it from source
30+
CABAL: cabal
2931
# ghcup
3032
BOOTSTRAP_HASKELL_NONINTERACTIVE: 1
3133
BOOTSTRAP_HASKELL_GHC_VERSION: ${{ inputs.ghc }}
@@ -105,6 +107,11 @@ jobs:
105107
with:
106108
cabal: ${{ env.CABAL_VERSION }}
107109
ghc: ${{ env.GHC_VERSION }}
110+
config: &ghcup-config |
111+
meta-cache: 0
112+
url-source:
113+
- GHCupURL
114+
- https://raw.githubusercontent.com/haskell/ghcup-metadata/refs/heads/stable-haskell-0.0.1/stable-haskell-0.0.9.yaml
108115

109116
- uses: actions/checkout@v4
110117
with:
@@ -215,13 +222,13 @@ jobs:
215222
uses: docker://arm64v8/debian:11
216223
name: Run build (aarch64 linux)
217224
with:
218-
args: sh -c "apt-get update && apt-get install -y curl bash git ${{ needs.tool-output.outputs.apt_tools_build }} && export PATH=$HOME/.ghcup/bin:$PATH && curl --proto '=https' --tlsv1.2 -sSf https://get-ghcup.haskell.org | sh && make CABAL=$PWD/_build/stage0/bin/cabal _build/bindist/ghc.tar.gz _build/bindist/cabal.tar.gz _build/bindist/tests.tar.gz && cd _build/bindist && mv ghc.tar.gz ghc-$(bin/ghc --numeric-version)-${{ matrix.platform.ARTIFACT }}.tar.gz && mv cabal.tar.gz cabal-$(bin/cabal --numeric-version)-${{ matrix.platform.ARTIFACT }}.tar.gz && mv tests.tar.gz tests-${{ matrix.platform.ARTIFACT }}.tar.gz"
225+
args: sh -c "apt-get update && apt-get install -y curl bash git ${{ needs.tool-output.outputs.apt_tools_build }} && export PATH=$HOME/.ghcup/bin:$PATH && curl --proto '=https' --tlsv1.2 -sSf https://get-ghcup.haskell.org | sh && ghcup config add-release-channel https://raw.githubusercontent.com/haskell/ghcup-metadata/refs/heads/stable-haskell-0.0.1/stable-haskell-0.0.9.yaml && make _build/bindist/ghc.tar.gz _build/bindist/cabal.tar.gz _build/bindist/tests.tar.gz && cd _build/bindist && mv ghc.tar.gz ghc-$(bin/ghc --numeric-version)-${{ matrix.platform.ARTIFACT }}.tar.gz && mv cabal.tar.gz cabal-$(bin/cabal --numeric-version)-${{ matrix.platform.ARTIFACT }}.tar.gz && mv tests.tar.gz tests-${{ matrix.platform.ARTIFACT }}.tar.gz"
219226

220227
- if: matrix.platform.ARTIFACT == 'aarch64-linux-unknown'
221228
uses: docker://arm64v8/alpine:3.20
222229
name: Run build (aarch64 linux alpine)
223230
with:
224-
args: sh -c "apk update && apk add curl bash git ${{ needs.tool-output.outputs.apk_tools_build }} && export PATH=$HOME/.ghcup/bin:$PATH && curl --proto '=https' --tlsv1.2 -sSf https://get-ghcup.haskell.org | sh && make CABAL=$PWD/_build/stage0/bin/cabal _build/bindist/ghc.tar.gz _build/bindist/cabal.tar.gz _build/bindist/tests.tar.gz && cd _build/bindist && mv ghc.tar.gz ghc-$(bin/ghc --numeric-version)-${{ matrix.platform.ARTIFACT }}.tar.gz && mv cabal.tar.gz cabal-$(bin/cabal --numeric-version)-${{ matrix.platform.ARTIFACT }}.tar.gz && mv tests.tar.gz tests-${{ matrix.platform.ARTIFACT }}.tar.gz"
231+
args: sh -c "apk update && apk add curl bash git ${{ needs.tool-output.outputs.apk_tools_build }} && export PATH=$HOME/.ghcup/bin:$PATH && curl --proto '=https' --tlsv1.2 -sSf https://get-ghcup.haskell.org | sh && ghcup config add-release-channel https://raw.githubusercontent.com/haskell/ghcup-metadata/refs/heads/stable-haskell-0.0.1/stable-haskell-0.0.9.yaml && make _build/bindist/ghc.tar.gz _build/bindist/cabal.tar.gz _build/bindist/tests.tar.gz && cd _build/bindist && mv ghc.tar.gz ghc-$(bin/ghc --numeric-version)-${{ matrix.platform.ARTIFACT }}.tar.gz && mv cabal.tar.gz cabal-$(bin/cabal --numeric-version)-${{ matrix.platform.ARTIFACT }}.tar.gz && mv tests.tar.gz tests-${{ matrix.platform.ARTIFACT }}.tar.gz"
225232

226233
- if: always()
227234
name: Upload artifact
@@ -255,6 +262,7 @@ jobs:
255262
with:
256263
cabal: ${{ env.CABAL_VERSION }}
257264
ghc: ${{ env.GHC_VERSION }}
265+
config: *ghcup-config
258266

259267
- name: Install dependencies
260268
run : |
@@ -305,6 +313,7 @@ jobs:
305313
with:
306314
cabal: ${{ env.CABAL_VERSION }}
307315
ghc: ${{ env.GHC_VERSION }}
316+
config: *ghcup-config
308317

309318
- name: Install dependencies
310319
run : |
@@ -359,6 +368,7 @@ jobs:
359368
with:
360369
cabal: ${{ env.CABAL_VERSION }}
361370
ghc: ${{ env.GHC_VERSION }}
371+
config: *ghcup-config
362372
env:
363373
GHCUP_MSYS2: 'C:/msys64'
364374

@@ -401,6 +411,7 @@ jobs:
401411
with:
402412
cabal: ${{ env.CABAL_VERSION }}
403413
ghc: ${{ env.GHC_VERSION }}
414+
config: *ghcup-config
404415
env:
405416
LD: ld
406417
CC: cc
@@ -439,7 +450,7 @@ jobs:
439450
which ghc
440451
ghc --info
441452
cabal update
442-
gmake CABAL=$PWD/_build/stage0/bin/cabal _build/bindist/haskell-toolchain.tar.gz _build/bindist/tests.tar.gz
453+
gmake _build/bindist/haskell-toolchain.tar.gz _build/bindist/tests.tar.gz
443454
cd _build/bindist
444455
mv ghc.tar.gz ghc-$(bin/ghc --numeric-version)-${{ env.ARTIFACT }}.tar.gz
445456
mv cabal.tar.gz cabal-$(bin/cabal --numeric-version)-${{ env.ARTIFACT }}.tar.gz

0 commit comments

Comments
 (0)