ci: Rework CI for Darwin
This branch does a few things:
- Makes GHC on platforms which ship runtime-retargetable toolchains (e.g. Darwin) more robust by passing the
--target=<triple>
flag where possible (fixing #20162 (closed)) - Refactors the CI-phase timing logic into
ci.sh
- Isolates the build from
$HOME
, using theCABAL_DIR
environment variable to ensure thatcabal-install
doesn't look in$HOME
- Eliminates the usage of
nix-shell
from the CI infrastructure, rather generating a shell fragment to provide the environment (fixing #20131 (closed)) - Performs a few sundry cleanups
Merge request reports
Activity
added CI label
added 5 commits
Toggle commit listadded 5 commits
Toggle commit listadded 8 commits
- 43c78181 - ci: Drop redundant `cabal update`s
- a0d10347 - ci: Consolidate handling of cabal cache
- e657898c - ci: Isolate build from HOME
- c7a661ad - ci: Move phase timing logic into ci.sh
- ccd3de53 - ci: More surgical use of nix in Darwin builds
- 25750408 - configure: Move nm search logic to new file
- b7898f93 - configure: Add check for whether CC supports --target
- 09eff30f - ci: Add version to cache key
Toggle commit list- Resolved by Ben Gamari
- Resolved by Ben Gamari
I think the toolchain needs a
system
flag, and then needs to be prameterized over the system. We can't assume that people on regular intel macs can run arm64 binaries, which the toolchain defaults to. Nor can we rule out there are bugs that result from building x86_64 software with an arm toolchain. I still believe we should cleanly separate both environments. We are effectively pretending to be on an intel-mac building intel-mac software to cover for the x86_64-darwin case. And the same for aarch64-darwin case, however as it is now, we assume we are always on an aarch64-darwin machine.I don't argue that being explicit about the target is a good thing, but this is lacking the "native" element in our CI setup.
I think I'll hold off on merging this until %8.10.6 is out since it's currently suffering from #19950 (closed).
added 61 commits
-
a065d271...10678945 - 52 commits from branch
master
- 777adf96 - ci: Drop redundant `cabal update`s
- 45d59a08 - ci: Consolidate handling of cabal cache
- da94951d - ci: Isolate build from HOME
- e63c3b6a - ci: Move phase timing logic into ci.sh
- 2e265a10 - ci: More surgical use of nix in Darwin builds
- f2f611b1 - configure: Move nm search logic to new file
- bd7b8bbc - configure: Add check for whether CC supports --target
- e0a5847e - ci: Add version to cache key
- 8aa40ff6 - DEBUG
Toggle commit list-
a065d271...10678945 - 52 commits from branch
mentioned in merge request !5737 (closed)
- Resolved by Ben Gamari
aarch64 build currently fails with
error: Package ‘ghc-8.10.4’ in /nix/store/9ry8c3r3213rqrbm4j8vdh66mwj02i6r-nixpkgs-src/pkgs/development/compilers/ghc/8.10.4.nix:267 is not supported on ‘aarch64-darwin’, refusing to evaluate. a) To temporarily allow packages that are unsupported for this system, you can use an environment variable for a single invocation of the nix tools. $ export NIXPKGS_ALLOW_UNSUPPORTED_SYSTEM=1 b) For `nixos-rebuild` you can set { nixpkgs.config.allowUnsupportedSystem = true; } in configuration.nix to override this. c) For `nix-env`, `nix-build`, `nix-shell` or any other Nix command you can add { allowUnsupportedSystem = true; } to ~/.config/nixpkgs/config.nix. (use '--show-trace' to show detailed location information)
added 74 commits
-
8aa40ff6...5d651c78 - 64 commits from branch
master
- d7adfc4e - ci: Drop redundant `cabal update`s
- 9562858b - ci: Consolidate handling of cabal cache
- 37443969 - ci: Isolate build from HOME
- ba329c1a - ci: Move phase timing logic into ci.sh
- 8563a87f - ci: More surgical use of nix in Darwin builds
- 3a000172 - configure: Move nm search logic to new file
- fb443430 - configure: Add check for whether CC supports --target
- 45d5b3bb - ci: Add version to cache key
- cf811a51 - DEBUG
- 82fd33d6 - gitlab-ci: Ensure that CABAL_DIR is a Windows path
Toggle commit list-
8aa40ff6...5d651c78 - 64 commits from branch
added 50 commits
-
de7d9fa2...4ff4d434 - 38 commits from branch
master
- 740b2931 - ci: Drop redundant `cabal update`s
- 72db296c - ci: Consolidate handling of cabal cache
- 5d428ee0 - ci: Isolate build from HOME
- e560e95a - ci: Move phase timing logic into ci.sh
- c23e02a5 - ci: More surgical use of nix in Darwin builds
- 9ef396d0 - configure: Move nm search logic to new file
- de056a66 - configure: Add check for whether CC supports --target
- 1234704c - ci: Add version to cache key
- 0ed2c6cb - DEBUG
- 2899232c - gitlab-ci: Ensure that CABAL_DIR is a Windows path
- 4a77a5df - gitlab-ci: Use correct CABAL executable
- 439e1e87 - Ensure that cabal update is invoked before building
Toggle commit list-
de7d9fa2...4ff4d434 - 38 commits from branch