Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ jobs:

- name: Build the bindist
shell: devx {0}
run: make CABAL=$PWD/_build/stage0/bin/cabal
run: make CABAL=$(./build-cabal.sh)

- name: Upload artifacts
uses: actions/upload-artifact@v4
Expand All @@ -62,7 +62,7 @@ jobs:

- name: Run the testsuite
shell: devx {0}
run: make test CABAL=$PWD/_build/stage0/bin/cabal
run: make test CABAL=$(./build-cabal.sh)

- name: Upload test results
uses: actions/upload-artifact@v4
Expand Down
108 changes: 58 additions & 50 deletions .github/workflows/reusable-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ on:
default: "install_bin install_lib update_package_db"
cabal:
type: string
default: 3.14.2.0
default: 3.17.0.1
test:
type: boolean
default: true
Expand All @@ -28,8 +28,7 @@ env:
CABAL_VERSION: ${{ inputs.cabal }}
# ghcup
BOOTSTRAP_HASKELL_NONINTERACTIVE: 1
BOOTSTRAP_HASKELL_GHC_VERSION: ${{ inputs.ghc }}
BOOTSTRAP_HASKELL_CABAL_VERSION: ${{ inputs.cabal }}
BOOTSTRAP_HASKELL_MINIMAL: 1
BOOTSTRAP_HASKELL_INSTALL_NO_STACK: 1
# debian/ubuntu
DEBIAN_FRONTEND: noninteractive
Expand Down Expand Up @@ -105,6 +104,11 @@ jobs:
with:
cabal: ${{ env.CABAL_VERSION }}
ghc: ${{ env.GHC_VERSION }}
config: &ghcup-config |
meta-cache: 0
url-source:
- GHCupURL
- https://raw.githubusercontent.com/haskell/ghcup-metadata/refs/heads/stable-haskell-0.0.1/stable-haskell-0.0.9.yaml

- uses: actions/checkout@v4
with:
Expand All @@ -128,11 +132,6 @@ jobs:
ln -s make /usr/local/bin/gmake
echo "/usr/local/bin" >> $GITHUB_PATH

- name: Add extra-lib-dirs
run: &extra-lib-dirs |
echo "extra-lib-dirs: $HOME/.local/lib/" >> cabal.project.stage2
echo "extra-lib-dirs: $HOME/.local/lib/" >> cabal.project.stage3

- if: matrix.platform.image == 'rockylinux:8'
name: Install emscripten
run : &emscripten |
Expand Down Expand Up @@ -166,17 +165,20 @@ jobs:
cd emsdk
source ./emsdk_env.sh
cd ..
${{ env.MAKE }} _build/bindist/haskell-toolchain.tar.gz _build/bindist/tests.tar.gz
${{ env.MAKE }} _build/bindist/stage2/ghc.tar.gz _build/bindist/stage3/ghc-javascript-unknown-ghcjs.tar.gz _build/bindist/tests.tar.gz
else
echo $PWD
${{ env.MAKE }} --debug _build/bindist/ghc.tar.gz _build/bindist/cabal.tar.gz _build/bindist/tests.tar.gz
${{ env.MAKE }} _build/bindist/stage2/ghc.tar.gz _build/bindist/tests.tar.gz
fi
cd _build/bindist
mv ghc.tar.gz ghc-$(bin/ghc --numeric-version)-${ARTIFACT}.tar.gz
mv cabal.tar.gz cabal-$(bin/cabal --numeric-version)-${ARTIFACT}.tar.gz
if [ -e "haskell-toolchain.tar.gz" ] ; then
mv haskell-toolchain.tar.gz haskell-toolchain-${ARTIFACT}.tar.gz
mv ghc-javascript-unknown-ghcjs.tar.gz ghc-javascript-unknown-ghcjs-$(bin/ghc --numeric-version)-${ARTIFACT}.tar.gz
(
cd stage2
mv ghc.tar.gz ghc-$(bin/ghc --numeric-version)-${ARTIFACT}.tar.gz
)
if [ -e "ghc-javascript-unknown-ghcjs.tar.gz" ] ; then
(
cd stage3
mv ghc-javascript-unknown-ghcjs.tar.gz ghc-javascript-unknown-ghcjs-$(bin/ghc --numeric-version)-${ARTIFACT}.tar.gz
)
fi
mv tests.tar.gz tests-${ARTIFACT}.tar.gz
env:
Expand All @@ -189,8 +191,10 @@ jobs:
if-no-files-found: error
retention-days: 2
name: artifacts-${{ matrix.platform.ARTIFACT }}-${{ matrix.branch }}
path: |
path: &upload-paths |
./_build/bindist/*.tar.gz
./_build/bindist/stage2/*.tar.gz
./_build/bindist/stage3/*.tar.gz

build-arm:
name: Build ARM binary
Expand All @@ -215,13 +219,13 @@ jobs:
uses: docker://arm64v8/debian:11
name: Run build (aarch64 linux)
with:
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"
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 && ghcup install ghc --set ${{ env.GHC_VERSION }} && ghcup install cabal --set ${{ env.CABAL_VERSION }} && make USE_SYSTEM_CABAL=1 _build/bindist/stage2/ghc.tar.gz _build/bindist/tests.tar.gz && cd _build/bindist/stage2 && mv ghc.tar.gz ghc-$(bin/ghc --numeric-version)-${{ matrix.platform.ARTIFACT }}.tar.gz && cd .. && mv tests.tar.gz tests-${{ matrix.platform.ARTIFACT }}.tar.gz"

- if: matrix.platform.ARTIFACT == 'aarch64-linux-unknown'
uses: docker://arm64v8/alpine:3.20
name: Run build (aarch64 linux alpine)
with:
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"
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 && ghcup install ghc --set ${{ env.GHC_VERSION }} && ghcup install cabal --set ${{ env.CABAL_VERSION }} && make USE_SYSTEM_CABAL=1 _build/bindist/stage2/ghc.tar.gz _build/bindist/tests.tar.gz && cd _build/bindist/stage2 && mv ghc.tar.gz ghc-$(bin/ghc --numeric-version)-${{ matrix.platform.ARTIFACT }}.tar.gz && cd .. && mv tests.tar.gz tests-${{ matrix.platform.ARTIFACT }}.tar.gz"

- if: always()
name: Upload artifact
Expand All @@ -230,8 +234,7 @@ jobs:
if-no-files-found: error
retention-days: 2
name: artifacts-${{ matrix.platform.ARTIFACT }}-${{ matrix.branch }}
path: |
./_build/bindist/*.tar.gz
path: *upload-paths

build-mac-x86_64:
name: Build binary (Mac x86_64)
Expand All @@ -255,6 +258,7 @@ jobs:
with:
cabal: ${{ env.CABAL_VERSION }}
ghc: ${{ env.GHC_VERSION }}
config: *ghcup-config

- name: Install dependencies
run : |
Expand All @@ -263,9 +267,6 @@ jobs:
echo "/usr/local/opt/make/libexec/gnubin" >> $GITHUB_PATH
echo "/usr/local/opt/libtool/libexec/gnubin" >> $GITHUB_PATH

- name: Add extra-lib-dirs
run: *extra-lib-dirs

- name: Install emscripten
run : *emscripten

Expand All @@ -279,8 +280,7 @@ jobs:
if-no-files-found: error
retention-days: 2
name: artifacts-${{ env.ARTIFACT }}-${{ matrix.branch }}
path: |
./_build/bindist/*.tar.gz
path: *upload-paths

build-mac-aarch64:
name: Build binary (Mac aarch64)
Expand All @@ -305,6 +305,7 @@ jobs:
with:
cabal: ${{ env.CABAL_VERSION }}
ghc: ${{ env.GHC_VERSION }}
config: *ghcup-config

- name: Install dependencies
run : |
Expand All @@ -313,8 +314,8 @@ jobs:
echo "/opt/homebrew/opt/make/libexec/gnubin" >> $GITHUB_PATH
echo "/opt/homebrew/opt/libtool/libexec/gnubin" >> $GITHUB_PATH

- name: Add extra-lib-dirs
run: *extra-lib-dirs
- name: Install emscripten
run : *emscripten

- name: Run build
run: *build
Expand All @@ -326,8 +327,7 @@ jobs:
if-no-files-found: error
retention-days: 2
name: artifacts-${{ env.ARTIFACT }}-${{ matrix.branch }}
path: |
./_build/bindist/*.tar.gz
path: *upload-paths

build-windows:
name: Build binary (Windows)
Expand Down Expand Up @@ -359,6 +359,7 @@ jobs:
with:
cabal: ${{ env.CABAL_VERSION }}
ghc: ${{ env.GHC_VERSION }}
config: *ghcup-config
env:
GHCUP_MSYS2: 'C:/msys64'

Expand All @@ -374,8 +375,7 @@ jobs:
if-no-files-found: error
retention-days: 2
name: artifacts-${{ env.ARTIFACT }}-${{ matrix.branch }}
path: |
./_build/bindist/*.tar.gz
path: *upload-paths

build-freebsd-x86_64:
name: Build FreeBSD x86_64
Expand All @@ -401,6 +401,7 @@ jobs:
with:
cabal: ${{ env.CABAL_VERSION }}
ghc: ${{ env.GHC_VERSION }}
config: *ghcup-config
env:
LD: ld
CC: cc
Expand All @@ -427,9 +428,6 @@ jobs:
sudo tzsetup Etc/GMT
sudo adjkerntz -a

- name: Add extra-lib-dirs
run: *extra-lib-dirs

- name: Install emscripten
run : |
sudo pkg install -y emscripten
Expand All @@ -439,12 +437,16 @@ jobs:
which ghc
ghc --info
cabal update
gmake CABAL=$PWD/_build/stage0/bin/cabal _build/bindist/haskell-toolchain.tar.gz _build/bindist/tests.tar.gz
gmake _build/bindist/stage2/ghc.tar.gz _build/bindist/stage3/ghc-javascript-unknown-ghcjs.tar.gz _build/bindist/tests.tar.gz
cd _build/bindist
mv ghc.tar.gz ghc-$(bin/ghc --numeric-version)-${{ env.ARTIFACT }}.tar.gz
mv cabal.tar.gz cabal-$(bin/cabal --numeric-version)-${{ env.ARTIFACT }}.tar.gz
mv haskell-toolchain.tar.gz haskell-toolchain-${{ env.ARTIFACT }}.tar.gz
mv ghc-javascript-unknown-ghcjs.tar.gz ghc-javascript-unknown-ghcjs-$(bin/ghc --numeric-version)-${{ env.ARTIFACT }}.tar.gz
(
cd stage2
mv ghc.tar.gz ghc-$(bin/ghc --numeric-version)-${{ env.ARTIFACT }}.tar.gz
)
(
cd stage3
mv ghc-javascript-unknown-ghcjs.tar.gz ghc-javascript-unknown-ghcjs-$(bin/ghc --numeric-version)-${{ env.ARTIFACT }}.tar.gz
)
mv tests.tar.gz tests-${{ env.ARTIFACT }}.tar.gz
env:
EXTRA_LIB_DIRS: /usr/local/lib
Expand All @@ -458,8 +460,7 @@ jobs:
if-no-files-found: error
retention-days: 2
name: artifacts-${{ env.ARTIFACT }}-${{ matrix.branch }}
path: |
./_build/bindist/*.tar.gz
path: *upload-paths

test-linux:
name: Test linux binaries
Expand Down Expand Up @@ -587,10 +588,15 @@ jobs:

rm -rf .git
(
shopt -s globstar
cd _build/bindist
for file in *.tar.gz; do tar xzf "$file"; done
for file in **/*.tar.gz ; do tar xzf "$file"; done
find
)
PATH=$(pwd)/_build/bindist/bin:$PATH ${{ env.MAKE }} -C _build/bindist/testsuite
export PATH=${{ steps.pwd_output.outputs.pwd }}/_build/bindist/bin/:$PATH
which ghc
${{ env.MAKE }} -C _build/bindist/testsuite
shell: bash
env:
THREADS: 4
TEST_HC: ${{ steps.pwd_output.outputs.pwd }}/_build/bindist/bin/ghc
Expand Down Expand Up @@ -627,13 +633,13 @@ jobs:
uses: docker://arm64v8/debian:11
name: Run build (aarch64 linux)
with:
args: sh -c "apt-get update && apt-get install -y curl bash git ${{ needs.tool-output.outputs.apt_tools_test }} && git config --system --add safe.directory $GITHUB_WORKSPACE && rm -rf .git && cd _build/bindist && for file in *.tar.gz; do tar xzf $file; done && cd testsuite && PATH=$GITHUB_WORKSPACE/_build/bindist/bin:$PATH make"
args: sh -c "apt-get update && apt-get install -y curl bash git ${{ needs.tool-output.outputs.apt_tools_test }} && git config --system --add safe.directory $GITHUB_WORKSPACE && rm -rf .git && cd _build/bindist && for file in tests*.tar.gz stage2/ghc*.tar.gz ; do tar xzf $file; done && cd testsuite && PATH=$GITHUB_WORKSPACE/_build/bindist/bin/:$PATH make"

- if: matrix.platform.ARTIFACT == 'aarch64-linux-unknown'
uses: docker://arm64v8/alpine:3.20
name: Run build (aarch64 linux alpine)
with:
args: sh -c "apk update && apk add curl bash git ${{ needs.tool-output.outputs.apk_tools_test }} && git config --system --add safe.directory $GITHUB_WORKSPACE && rm -rf .git && cd _build/bindist && for file in *.tar.gz; do tar xzf $file; done && cd testsuite && PATH=$GITHUB_WORKSPACE/_build/bindist/bin:$PATH make"
args: sh -c "apk update && apk add curl bash git ${{ needs.tool-output.outputs.apk_tools_test }} && git config --system --add safe.directory $GITHUB_WORKSPACE && rm -rf .git && cd _build/bindist && for file in tests*.tar.gz stage2/ghc*.tar.gz ; do tar xzf $file; done && cd testsuite && PATH=$GITHUB_WORKSPACE/_build/bindist/bin/:$PATH make"

test-mac-x86_64:
name: Test binary (Mac x86_64)
Expand All @@ -658,6 +664,7 @@ jobs:

- name: Run test
run: *test
shell: bash
env:
THREADS: 4

Expand All @@ -677,7 +684,6 @@ jobs:
- uses: actions/checkout@v4
with:
ref: ${{ matrix.branch }}
submodules: recursive

- uses: ./.github/actions/download
with:
Expand All @@ -686,6 +692,7 @@ jobs:

- name: Run test
run: *test
shell: bash
env:
THREADS: 4

Expand All @@ -707,7 +714,6 @@ jobs:
- uses: actions/checkout@v4
with:
ref: ${{ matrix.branch }}
submodules: recursive

- name: Install msys2 dependencies
run: *msys2-install
Expand Down Expand Up @@ -756,10 +762,12 @@ jobs:
run: |
rm -rf .git
cd _build/bindist
for file in *.tar.gz; do tar xzf "$file"; done
for file in tests*.tar.gz stage2/ghc*.tar.gz stage3/ghc*.tar.gz; do tar xzf "$file"; done
which ghc
find
cd testsuite
export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH
PATH=$GITHUB_WORKSPACE/_build/bindist/bin:$PATH gmake
PATH=$GITHUB_WORKSPACE/_build/bindist/bin/:$PATH gmake
env:
MAKE: gmake
THREADS: 8
Expand Down
Loading
Loading