Skip to content

Cabal + Make based build #34

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 629 commits into
base: tmp/make-build-offset
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
629 commits
Select commit Hold shift + click to select a range
92d11f7
Fix rts per file flags
hsyl20 Dec 11, 2024
237276d
Generate AutoApply*.cmm
hsyl20 Dec 13, 2024
3f71d2c
Build libffi
hsyl20 Dec 16, 2024
98bf99a
Progress building ghc-prim
hsyl20 Dec 18, 2024
9e07058
Build ghc-prim
hsyl20 Dec 18, 2024
d8cfaa2
refactor: avoid hack when checking size of struct MD5Context
andreabedini Dec 19, 2024
c49129a
Build ghc-bignum
hsyl20 Dec 18, 2024
14a9e46
WIP: build ghc-internal
hsyl20 Jan 7, 2025
8f4afaf
Fix new error while bootstrapping
hsyl20 Jan 8, 2025
f2bf5f2
Fix more stuff
hsyl20 Jan 8, 2025
01baf0b
Build base
hsyl20 Jan 8, 2025
e110b00
Build statically linked stage0 programs.
hsyl20 Jan 10, 2025
b06a033
Add Haskell build script
hsyl20 Jan 10, 2025
3b3f8c1
Build stage1 boot libraries with Build.hs
hsyl20 Jan 13, 2025
95b7d29
Add timing to messages
hsyl20 Jan 13, 2025
003de80
Fix messages
hsyl20 Jan 13, 2025
3c83994
Don't wire in the compiler
hsyl20 Jan 14, 2025
816b2bd
Fix options
hsyl20 Jan 14, 2025
9db4d2b
Fix compiler path
hsyl20 Jan 14, 2025
ccbd329
Minor refactor
hsyl20 Jan 14, 2025
0cf0008
Fix Makefile to use Build.hs
hsyl20 Jan 14, 2025
79780dc
Fix Setup scripts
hsyl20 Jan 14, 2025
37eaeca
Add Alex
hsyl20 Jan 14, 2025
14dd4a3
Use the Makefile in CI
hsyl20 Jan 14, 2025
c16dbd6
Comments
hsyl20 Jan 15, 2025
b8da82a
Cleanup
hsyl20 Jan 15, 2025
7aa9c5e
Generate cabal.project files for easier maintenance and parameterization
hsyl20 Jan 16, 2025
7ba725b
Fix passing ghc-options to the rts when building Cmm
hsyl20 Jan 16, 2025
20971a8
Fix hard-wired paths
hsyl20 Jan 16, 2025
b4dbafd
Fix fs.h for unlit
hsyl20 Jan 20, 2025
a74c97a
Build all the boot libraries at once, including the rts
hsyl20 Jan 20, 2025
15bfa2f
Dump logs into files
hsyl20 Jan 20, 2025
bbfe910
Fix a few things found while trying to use "cabal install --lib"
hsyl20 Jan 20, 2025
b17afb4
Move Cabal submodule to our patched version
andreabedini Jan 21, 2025
68a94fb
Add patched cabal to Makefile
andreabedini Jan 21, 2025
8bfaab1
Add TODO list
andreabedini Jan 21, 2025
d3367cc
Simplify Build.hs dependencies
andreabedini Jan 21, 2025
6bcdac1
Progress towards cabal-install install --lib
hsyl20 Jan 21, 2025
6e1befc
Fix timestamps
hsyl20 Jan 21, 2025
13175b3
Use cabal install --lib to build boot libraries
hsyl20 Jan 22, 2025
bfc68ec
Parse package env
hsyl20 Jan 22, 2025
0d34304
Do not hardcode GHC version into Makefile
andreabedini Jan 23, 2025
9ebd773
chore: add Build.hs to hie.yaml
andreabedini Jan 23, 2025
b3f04b3
Display output from cabal build
andreabedini Jan 23, 2025
783ef72
Separate cabal from GHC in GitHub workflow
andreabedini Jan 23, 2025
960e1f9
No need to recache a newly initialised packagedb
andreabedini Jan 24, 2025
4cc5d65
Use GHC 9.8.4 on CI
hsyl20 Jan 24, 2025
224e842
Revert "Display output from cabal build"
hsyl20 Jan 24, 2025
ebd395f
Revert "Do not hardcode GHC version into Makefile"
hsyl20 Jan 24, 2025
ba5ae87
Show logs on failure when building boot libs
hsyl20 Jan 24, 2025
3383dcd
Add xxhash.h
hsyl20 Jan 24, 2025
76536cd
Fix after merge of ghc-prim into ghc-internal
hsyl20 Jan 27, 2025
42c1f5b
Workaround environment file parsing
hsyl20 Jan 27, 2025
1ab92d3
Better fix to package env without package dbs...
hsyl20 Jan 27, 2025
81b98bc
Prepare stage1's package db
hsyl20 Jan 27, 2025
c862269
Progress towards building more boot libraries and building stage2
hsyl20 Jan 27, 2025
5031be0
Fix package copy
hsyl20 Jan 27, 2025
062ea6d
Enable TNTC to avoid link issue for now
hsyl20 Jan 27, 2025
47208ea
Workaround cabal bug with multiple flags
hsyl20 Jan 28, 2025
e1cc701
Try adding ffi to extra-libraries-static
hsyl20 Jan 28, 2025
99a96be
Fix FS_NAMESPACE for the rts
hsyl20 Jan 28, 2025
80bcd9b
Enable the internal interpreter in stage2 compiler
hsyl20 Jan 29, 2025
4087c94
Fully enable internal-interpreter in stage2 (it works!)
hsyl20 Jan 29, 2025
d12b134
Build ghc-toolchain
hsyl20 Jan 30, 2025
2c971ec
Add TODO
hsyl20 Jan 31, 2025
e9d629a
ghc-toolchain: allow generation of settings file instead of Target
hsyl20 Jan 31, 2025
26a25a0
Factor ghcTargetArchOS
hsyl20 Jan 31, 2025
c1c7896
Use ghc-toolchain to generate settings
hsyl20 Jan 31, 2025
26d7803
Build auxiliary programs to allow running the testsuite
hsyl20 Feb 3, 2025
2d79952
Build shallow libraries on top of ghc-internal
hsyl20 Feb 3, 2025
c990e59
Try to add template-haskell and explain what's failing
hsyl20 Feb 3, 2025
a6f4fd1
Allow hsc2hs to find template-hsc.h in GHC's lib directory
hsyl20 Feb 4, 2025
3b13632
Use custom version of hsc2hs with debug print
hsyl20 Feb 4, 2025
af1fda9
Fix typo...
hsyl20 Feb 4, 2025
5def38f
Revert "Use custom version of hsc2hs with debug print"
hsyl20 Feb 4, 2025
d752a2e
Try to enable template-haskell again
hsyl20 Feb 4, 2025
3792261
Remove old comment
hsyl20 Feb 4, 2025
8770f15
Install more boot libraries
hsyl20 Feb 5, 2025
322901f
Create bindist dir
hsyl20 Feb 10, 2025
c18269e
Try to upload bindist and to run tests on CI
hsyl20 Feb 10, 2025
dd964fc
Add Happy as a source package
hsyl20 Feb 10, 2025
558e4fe
Run stage1 compiler from _build/stage1 instead of _build/stage0 + misc
hsyl20 Feb 10, 2025
1ee1fdb
Install more tools
hsyl20 Feb 10, 2025
4cd3e12
Comment
hsyl20 Feb 10, 2025
1b91ad0
Fix github url to use https
hsyl20 Feb 10, 2025
4ee63de
Install happy directly...
hsyl20 Feb 11, 2025
0a5141b
Use happy from Hackage
hsyl20 Feb 11, 2025
876a53c
Install GHC lib
hsyl20 Feb 11, 2025
45bae68
Install ghc-platform
hsyl20 Feb 11, 2025
c6ff483
Normalize testsuite backtrace paths
hsyl20 Feb 11, 2025
4ea8b69
Upload test results
hsyl20 Feb 11, 2025
14fab0b
Upload test results always
hsyl20 Feb 11, 2025
03e7013
Build iserv
hsyl20 Feb 12, 2025
f0d715a
Build ghc-experimental
hsyl20 Feb 12, 2025
a259c13
Reduce verbosity
hsyl20 Feb 12, 2025
acef575
Copy usage files
hsyl20 Feb 12, 2025
a5fa25c
Normalise callstacks in both and stderr and stdout
hsyl20 Feb 12, 2025
0056a4b
Use same options for ghc-lib when building ghc and boot libs
hsyl20 Feb 12, 2025
a4b8637
Fix encodingAllocations test
hsyl20 Feb 12, 2025
0515e91
Build system-cxx-std-lib package
hsyl20 Feb 13, 2025
180e020
Build and install runghc
hsyl20 Feb 13, 2025
f7a8233
Build and install ghc-compact
hsyl20 Feb 13, 2025
8767b42
Use cabal from stable-haskell repository
hsyl20 Feb 13, 2025
4c82d70
Distribute ghc-toolchain lib (used by some tests)
hsyl20 Feb 13, 2025
541f8de
Fix stage2 build to support plugins
hsyl20 Feb 13, 2025
5df9acd
Remove useless boot-lib-reinstall
hsyl20 Feb 13, 2025
ff5686b
Remove useless flags
hsyl20 Feb 13, 2025
38ed8dc
Only run compact sanity tests when the debug rts is available
hsyl20 Feb 17, 2025
47fa737
Flush C buffers in T7388
hsyl20 Feb 17, 2025
c67c9b7
Fix RTS report of host arch/os for the testsuite
hsyl20 Feb 17, 2025
a9b5cfe
Properly skip more tests
hsyl20 Feb 18, 2025
b705130
Fix InternalCounters test
hsyl20 Feb 19, 2025
4c93de4
Use C++ compiler to link code depending on system-cxx-std-lib
hsyl20 Feb 19, 2025
f24fec6
Fix stack_misc_closures
hsyl20 Feb 19, 2025
1c2ca73
Ensure that we use vanilla rts
hsyl20 Feb 21, 2025
4389edb
Drop libffi; Stop shipping a copy of libffi
angerman Feb 24, 2025
3cb6228
[build] drop ffi
angerman Feb 24, 2025
075df3f
[UX] Add quotes around missing tools
angerman Feb 24, 2025
6664afe
Add otool, and install_name_tool to lib/settings
angerman Feb 24, 2025
e7f6ba1
aarch64-apple-darwin support
angerman Feb 24, 2025
1eecc40
[test] add THREADS
angerman Feb 24, 2025
f997ec1
Make sure cabal update was run before cabal was built.
angerman Feb 24, 2025
07926fe
Logic to track boot
angerman Feb 24, 2025
3f0d7dd
Let's try to set CC and CXX
angerman Feb 24, 2025
7452bf9
Add link to cabal issue
hsyl20 Feb 24, 2025
184bc86
Fix triple warning
hsyl20 Feb 26, 2025
ee630c4
Fix libffi linking
hsyl20 Feb 26, 2025
baa1d00
Display unit-id on module name mistmatch
hsyl20 Feb 26, 2025
f8828cb
Replace $CC with cc
hsyl20 Feb 26, 2025
d601c90
Mark T25382 as broken
hsyl20 Feb 26, 2025
fd1b971
Skip more tests by adding rts-way-related predicates
hsyl20 Feb 26, 2025
7040d83
Fix flushing in more tests
hsyl20 Feb 26, 2025
0fce368
Indicate that T22012 is fragile due to GHC#23043
hsyl20 Feb 26, 2025
89037f2
Testsuite: remove expect_broken for static config
hsyl20 Feb 26, 2025
f9c735d
More unexpected passes fixed (see previous commit)
hsyl20 Feb 26, 2025
c75481e
Fix type name for plugin loading failure
hsyl20 Feb 26, 2025
498a6f3
Fix test output
hsyl20 Feb 27, 2025
3880d82
Add comment
hsyl20 Feb 27, 2025
dfd4b9d
Extract project files from Build.hs
angerman May 9, 2025
28f83e1
Move prepare-sources out of Build.hs
angerman May 9, 2025
da6a55c
Add configure script to repo
angerman May 9, 2025
1a63fa3
Add .envrc
angerman May 9, 2025
455c931
feat(ghc-toolchain): add otool and install_name_tool
andreabedini Feb 27, 2025
d214f46
[rts] update config.{guess,sub}
angerman May 9, 2025
5dff01e
[Makefile] stop copying config.{guess,sub} into rts
angerman May 9, 2025
8936088
Move rts stuff into the rts configure script
andreabedini Feb 28, 2025
eef398c
[rts] self-contained
angerman May 9, 2025
f241a36
[ghc-toolchain] move settings generation completely into ghc-toolchain
angerman May 10, 2025
7b7bce7
[ci] used devx action.
angerman May 10, 2025
71817f4
More platforms.
angerman May 11, 2025
d87c873
All of them now.
angerman May 11, 2025
9ba27ff
fix(rts): bump cabal-version
andreabedini Feb 12, 2025
d76462d
refactor(compiler,hadrian): Remove runtime LLVM version check
andreabedini Feb 20, 2025
821c9a8
fixup! feat(ghc-toolchain): add otool and install_name_tool
angerman Mar 3, 2025
8337b88
[ghc-pkg] Add support for UnitFlags (This requires a recent enough Ca…
angerman Apr 9, 2025
6c243cf
[ghc-pkg] Add `mermaid`
angerman Mar 22, 2025
1ee9f0d
fixup! refactor(compiler,hadrian): Remove runtime LLVM version check
angerman May 11, 2025
e95f9cb
[ci] there is no ubuntu-latest-arm, only ubuntu-24.04-arm.
angerman May 11, 2025
4524e9d
fixup! refactor(compiler,hadrian): Remove runtime LLVM version check
angerman May 11, 2025
4b76766
[stage1] We need lib:Cabal in stage1 for be recent enough for, e.g. g…
angerman May 11, 2025
238b9b6
[build/ghc-pkg] make sure we use stage1 ghc-pkg consistently.
angerman May 11, 2025
29e8218
[ci] Separate names for bindists
angerman May 12, 2025
b971bd1
Allow the rts to have dependencies.
angerman Mar 2, 2025
6293218
refactor(rts-headers): Move shared headers to new package
andreabedini Feb 26, 2025
bd3bdf2
refactor(rts-fs): turn utils/fs into a cabal package
andreabedini Feb 27, 2025
384615a
Adding HADRIAN_SETTINGS to Makefile
angerman May 12, 2025
dfed738
fixup! refactor(rts-fs): turn utils/fs into a cabal package
angerman May 12, 2025
64546be
fixup! Adding HADRIAN_SETTINGS to Makefile
angerman May 13, 2025
3cfe73e
[Makefile] move remaining Build.hs logic to Makefile
angerman May 13, 2025
0e228bf
[rts] cleanup cabal file; set -ghcversion-file in the cabal file
angerman May 13, 2025
38faee1
fixup! [rts] cleanup cabal file; set -ghcversion-file in the cabal file
angerman May 13, 2025
821c8e6
Allow GHC to dump primop modules
hsyl20 Mar 27, 2025
bcd93a1
[ghc-internal] Move GHC.Internal.{Prim,PrimopWrappers} into ghc-inter…
angerman May 13, 2025
0d05067
fixup! [ghc-internal] Move GHC.Internal.{Prim,PrimopWrappers} into gh…
angerman May 13, 2025
21072ad
Makefile prettification
angerman May 13, 2025
f87e129
Final cleanup
angerman May 13, 2025
1dcfa2c
fixup! fixup! refactor(compiler,hadrian): Remove runtime LLVM version…
angerman May 15, 2025
21cdf67
Drop suffix logic
angerman Apr 10, 2025
0b68a56
fixup! [ghc-pkg] Add support for UnitFlags (This requires a recent en…
angerman May 21, 2025
0ec6eb6
(rts) split into sublibs
angerman May 21, 2025
87c6670
[rts] split into sub-libs
angerman May 26, 2025
3827aae
fixup some test-suite issues.
angerman May 26, 2025
e340289
Build nonthread-debug as well.
angerman May 26, 2025
fbdb38d
Add multi-target support
hsyl20 May 5, 2025
a9a88e5
Support listing targets
hsyl20 May 7, 2025
189cbfe
Add zig cc support
hsyl20 Apr 7, 2025
52df8ce
Use zig to cross-compile to aarch64-linux
hsyl20 Apr 15, 2025
814aadb
Allow targets to be specified by the ghc executable name.
angerman May 27, 2025
8df59de
fixup! Allow targets to be specified by the ghc executable name.
angerman May 27, 2025
10dc5a6
Add logic to build _build/stage0/bin/cabal if needed.
angerman May 27, 2025
14bbfb8
fixup! fixup! Allow targets to be specified by the ghc executable name.
angerman May 27, 2025
4bdc221
fixup! Add logic to build _build/stage0/bin/cabal if needed.
angerman May 27, 2025
d3f2ce1
Build in-place cabal, until we update the devx container.
angerman May 27, 2025
6f756f5
fixup! Allow GHC to dump primop modules
angerman May 27, 2025
66ee4f8
fixup! fixup! fixup! Allow targets to be specified by the ghc executa…
angerman May 27, 2025
b7bd64d
[ghc-toolchain] Add LLVM llvm-as flags
angerman May 27, 2025
4ef9539
Add ProddableBlock to rts.cabal
angerman May 27, 2025
0c49226
[testsuite] more ghc_ prefix stripping.
angerman May 28, 2025
bbdd154
Ensure we inject the correct rts sublib as a dependency on ghc-internal.
angerman May 28, 2025
3a20cbd
Improve logging by redirecting stderr to stdout with `tee`
andreabedini May 29, 2025
5ff5983
Revert "fixup! [ghc-pkg] Add support for UnitFlags (This requires a r…
andreabedini Jun 3, 2025
2d7b39b
Revert "[ghc-pkg] Add support for UnitFlags (This requires a recent e…
andreabedini Jun 3, 2025
e27f00a
Use my cabal
andreabedini Jun 3, 2025
0b54e54
adapt makefile
andreabedini Jun 3, 2025
0b5c862
Rename iserv executable and component to ghc-iserv
andreabedini Jun 5, 2025
2345fd5
Let's see what CI says.
Jun 13, 2025
4b0ece9
Fix T20604
hsyl20 Jun 16, 2025
b343f2a
Build additional RTS flavour
hsyl20 Jun 23, 2025
c0324b0
Disable T25382 again
hsyl20 Jun 24, 2025
f68a6b3
Fix T16180
hsyl20 Jun 24, 2025
f4a4792
Fix T10279
hsyl20 Jul 2, 2025
a73b74d
Correctly filter rts package with -fno-link-rts
hsyl20 Jul 2, 2025
cb30635
Fix T21097b
hsyl20 Jul 7, 2025
ce9d5f9
Fix T20494 by using fd directly instead of stdout global
hsyl20 Jul 10, 2025
9a930cb
Update nix-direnv source URL to version 3.0.7
andreabedini Jul 18, 2025
46e0a4e
Fix typo in stage1 build process
andreabedini Jul 18, 2025
1c9db51
Update cabal
andreabedini Jul 22, 2025
186a763
fix cabal-install build directory
andreabedini Jul 18, 2025
babeb35
fix: configure is not phony target but a real file
andreabedini Jul 18, 2025
a68ff60
fix: avoid leaking processes during build
andreabedini Jul 18, 2025
67c2885
debug: troubleshoot DerivedConstants.h
andreabedini Jul 30, 2025
9eca8fa
update cabal
andreabedini Aug 7, 2025
f4f14da
actually bump cabal
Aug 8, 2025
9757569
[debug] add log message for no more include_dirs
Aug 8, 2025
f2b97d5
Add github group markers; drop run_and_log
Aug 9, 2025
9393e31
Reduce source-path noise.
Aug 9, 2025
3cd4cb5
reduce noise
Aug 9, 2025
00aae62
improve error messages
Aug 9, 2025
d529a6c
build stage2 sequentially to know where things really break
Aug 9, 2025
9623cc9
more debug info
Aug 9, 2025
a04c33a
more debug info (2)
Aug 9, 2025
caa63b0
meh
Aug 9, 2025
1d39bcf
[debug] this is stupid...
Aug 10, 2025
9ce2b9b
.
Aug 10, 2025
3e1e4bb
..
Aug 10, 2025
e16467c
This should really be part of GHC. (and cabal). When a command fails,…
Aug 10, 2025
0cf3917
simplify wrapper
Aug 11, 2025
cec3c99
chore(hie.yaml): adapt hie.yaml to our cabal based build
andreabedini Aug 11, 2025
b1db259
sublibs should not set -this-unit-id rts
Aug 11, 2025
feb09de
chore: tidy up cabal project files
andreabedini Aug 13, 2025
dd572ac
chore: refactor and simplify Makefile
andreabedini Aug 13, 2025
84cfb50
ci: adapt ci.yml workflow to Makefile
andreabedini Aug 13, 2025
400af3e
fixup! chore: refactor and simplify Makefile
andreabedini Aug 14, 2025
5e2f7b6
fixup! chore: refactor and simplify Makefile
andreabedini Aug 14, 2025
a7c7f58
fixup! chore: refactor and simplify Makefile
andreabedini Aug 14, 2025
ecddce6
fixup! [rts] self-contained
andreabedini Aug 14, 2025
8668f46
fix(Makefile): update prepare target to use order-only dependency for…
andreabedini Aug 15, 2025
747e580
fix(Makefile): use absolute path for stage1 bin in PATH variable
andreabedini Aug 15, 2025
a7f9a0c
fix(Makefile): remove unnecessary installation of executables during …
andreabedini Aug 15, 2025
553d003
fix(Makefile): adjust phony targets for cabal to ensure proper rebuil…
andreabedini Aug 15, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
7 changes: 7 additions & 0 deletions .envrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Check if nix-direnv is already loaded; if not, source it
if ! has nix_direnv_reload; then
source_url "https://raw.githubusercontent.com/nix-community/nix-direnv/3.0.7/direnvrc" "sha256-bn8WANE5a91RusFmRI7kS751ApelG02nMcwRekC/qzc="
fi

# Use the specified flake to enter the Nix development environment
use flake github:input-output-hk/devx#ghc98-minimal-ghc
63 changes: 63 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: CI

# Trigger the workflow on push or pull request, but only for the master branch
on:
pull_request:
types:
- opened
- synchronize
push:
branches: [master]

workflow_dispatch:

jobs:
cabal:
name: ${{ matrix.plat }} / ghc ${{ matrix.ghc }}
runs-on: "${{ fromJSON('{\"x86_64-linux\": \"ubuntu-24.04\", \"aarch64-linux\": \"ubuntu-24.04-arm\", \"x86_64-darwin\": \"macos-latest\", \"aarch64-darwin\": \"macos-latest\"}')[matrix.plat] }}"

strategy:
fail-fast: false
matrix:
plat: [x86_64-linux, aarch64-linux, x86_64-darwin, aarch64-darwin]
ghc: ['98'] # bootstrapping compiler

steps:
- uses: actions/checkout@v4
with:
submodules: "recursive"

- uses: input-output-hk/actions/devx@latest
with:
platform: ${{ matrix.plat }}
compiler-nix-name: 'ghc98'
minimal: true
ghc: true

- name: Update hackage
shell: devx {0}
run: cabal update

- name: Build the bindist
shell: devx {0}
run: make

- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.plat }}-bindist
path: _build/bindist

- name: Run the testsuite
shell: devx {0}
run: make test

- name: Upload test results
uses: actions/upload-artifact@v4
if: ${{ !cancelled() }} # upload test results even if the testsuite failed to pass
with:
name: testsuite-results
path: |
_build/test-perf.csv
_build/test-summary.txt
_build/test-junit.xml
50 changes: 48 additions & 2 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ variables:
GIT_SSL_NO_VERIFY: "1"

# Commit of ghc/ci-images repository from which to pull Docker images
DOCKER_REV: eb4d3389fd62e4f7321a0c8799014ec1f4da0708
DOCKER_REV: 6e9f8f17086e56e83adae4a8a9d63e2fec3cb6c7

# Sequential version number of all cached things.
# Bump to invalidate GitLab CI cache.
Expand Down Expand Up @@ -909,6 +909,10 @@ test-primops-label:
extends: .test-primops-validate-template
rules:
- if: '$CI_MERGE_REQUEST_LABELS =~ /.*test-primops.*/'
# We do not use *.full-ci here since that would imply running in nightly
# where we do not have the normal validate jobs. We have the -nightly job
# below to handle this case.
- if: '$CI_MERGE_REQUEST_LABELS =~ /.*full-ci.*/'

test-primops-nightly:
extends: .test-primops
Expand Down Expand Up @@ -1056,6 +1060,48 @@ abi-test:
- *full-ci
- if: '$CI_MERGE_REQUEST_LABELS =~ /.*test-abi.*/'

############################################################
# ghc-wasm-meta integration testing
############################################################

.ghc-wasm-meta:
stage: testing
variables:
UPSTREAM_GHC_PIPELINE_ID: $CI_PIPELINE_ID
UPSTREAM_GHC_PROJECT_ID: $CI_PROJECT_ID
rules:
- if: '$CI_MERGE_REQUEST_LABELS =~ /.*test-wasm.*/'
trigger:
project: haskell-wasm/ghc-wasm-meta
branch: master
strategy: depend

ghc-wasm-meta-gmp:
extends: .ghc-wasm-meta
needs:
- job: x86_64-linux-alpine3_20-wasm-cross_wasm32-wasi-release+host_fully_static+text_simdutf
artifacts: false
variables:
UPSTREAM_GHC_FLAVOUR: gmp
UPSTREAM_GHC_JOB_NAME: x86_64-linux-alpine3_20-wasm-cross_wasm32-wasi-release+host_fully_static+text_simdutf

ghc-wasm-meta-native:
extends: .ghc-wasm-meta
needs:
- job: x86_64-linux-alpine3_20-wasm-int_native-cross_wasm32-wasi-release+host_fully_static+text_simdutf
artifacts: false
variables:
UPSTREAM_GHC_FLAVOUR: native
UPSTREAM_GHC_JOB_NAME: x86_64-linux-alpine3_20-wasm-int_native-cross_wasm32-wasi-release+host_fully_static+text_simdutf

ghc-wasm-meta-unreg:
extends: .ghc-wasm-meta
needs:
- job: x86_64-linux-alpine3_20-wasm-unreg-cross_wasm32-wasi-release+host_fully_static+text_simdutf
artifacts: false
variables:
UPSTREAM_GHC_FLAVOUR: unreg
UPSTREAM_GHC_JOB_NAME: x86_64-linux-alpine3_20-wasm-unreg-cross_wasm32-wasi-release+host_fully_static+text_simdutf

############################################################
# Documentation deployment via GitLab Pages
Expand Down Expand Up @@ -1155,7 +1201,7 @@ ghcup-metadata-nightly:
needs:
- job: nightly-x86_64-linux-fedora33-release
artifacts: false
- job: nightly-x86_64-linux-centos7-validate
- job: nightly-x86_64-linux-ubuntu24_04-validate
artifacts: false
- job: nightly-x86_64-linux-ubuntu22_04-validate
artifacts: false
Expand Down
33 changes: 28 additions & 5 deletions .gitlab/ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ set -Eeuo pipefail

# Configuration:
# N.B. You may want to also update the index-state in hadrian/cabal.project.
HACKAGE_INDEX_STATE="2024-10-30T22:56:00Z"
HACKAGE_INDEX_STATE="2025-01-27T17:45:32Z"
MIN_HAPPY_VERSION="1.20"
MIN_ALEX_VERSION="3.2.6"

Expand Down Expand Up @@ -561,9 +561,17 @@ function install_bindist() {
*)
read -r -a args <<< "${INSTALL_CONFIGURE_ARGS:-}"

if [[ "${CROSS_TARGET:-no_cross_target}" =~ "mingw" ]]; then
# We suppose that host target = build target.
# By the fact above it is clearly turning out which host value is
# for currently built compiler.
# The fix for #21970 will probably remove this if-branch.
local -r CROSS_HOST_GUESS=$($SHELL ./config.guess)
args+=( "--target=$CROSS_TARGET" "--host=$CROSS_HOST_GUESS" )

# FIXME: The bindist configure script shouldn't need to be reminded of
# the target platform. See #21970.
if [ -n "${CROSS_TARGET:-}" ]; then
elif [ -n "${CROSS_TARGET:-}" ]; then
args+=( "--target=$CROSS_TARGET" "--host=$CROSS_TARGET" )
fi

Expand All @@ -572,7 +580,7 @@ function install_bindist() {
"${args[@]+"${args[@]}"}" || fail "bindist configure failed"
make_install_destdir "$TOP"/destdir "$instdir"
# And check the `--info` of the installed compiler, sometimes useful in CI log.
"$instdir"/bin/ghc --info
"$instdir/bin/${cross_prefix}ghc$exe" --info
;;
esac
popd
Expand Down Expand Up @@ -629,8 +637,23 @@ function test_hadrian() {
install_bindist _build/bindist/ghc-*/ "$instdir"
echo 'main = putStrLn "hello world"' > expected
run "$test_compiler" -package ghc "$TOP/.gitlab/hello.hs" -o hello
${CROSS_EMULATOR:-} ./hello > actual
run diff expected actual

if [[ "${CROSS_TARGET:-no_cross_target}" =~ "mingw" ]]; then
${CROSS_EMULATOR:-} ./hello.exe > actual
else
${CROSS_EMULATOR:-} ./hello > actual
fi

# We have to use `-w` to make the test more stable across supported
# platforms, i.e. Windows:
# $ cmp expected actual
# differ: byte 30, line 1
# $ diff expected actual
# 1c1
# < main = putStrLn "hello world"
# ---
# > main = putStrLn "hello world"
run diff -w expected actual
elif [[ -n "${REINSTALL_GHC:-}" ]]; then
run_hadrian \
test \
Expand Down
Loading
Loading