Skip to content

Commit 7a0d75a

Browse files
committed
Merge branch 'stable' into rc/v2.15
2 parents c340017 + 300edbe commit 7a0d75a

File tree

2 files changed

+38
-5
lines changed

2 files changed

+38
-5
lines changed

doc/maintainers/self-hosted_runners.md

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,22 @@
66
The `linux-arm64` job of the `integration-tests.yml` workflow runs on a
77
self-hosted runner for Linux and ARM64.
88

9-
The basic setup is:
9+
The current basic setup is:
1010

1111
* FP Complete has an Oracle Cloud account that provides a free tier that
1212
includes a really powerful ARM64 machine;
1313
* within Oracle Cloud, FP Complete are running an Ubuntu/ARM64 instance; and
1414
* on that instance, FP Complete are running the GitHub Runner software.
1515

16+
The runner name is `stack-github-action3` and the machine name is
17+
`stack-github-action3`.
18+
1619
Occasionally Oracle will turn off the machine because:
1720

1821
* Oracle thinks it is not being used (because of the free tier); and/or
1922
* other things, like disk space filling up.
2023

21-
## Managing the runner
24+
## Managing the `stack-github-action3` runner
2225

2326
With the appropriate authority installed on the server, the runner can be
2427
managed remotely using SSH, with command `ssh [email protected]`.
@@ -28,3 +31,24 @@ is for filesystem `/dev/sda1`.
2831

2932
If the available space is low, that may be due to unncessary GHC versions
3033
installed in Stack's `programs` directory.
34+
35+
## The `ghc-arm-5` runner
36+
37+
From 9 February 2024, the Haskell Foundation sought to provide an alternative
38+
runner named `ghc-arm-5` but that was based on NixOS and proved to be
39+
incompatible.
40+
41+
## Alternatives to the self-hosted runners
42+
43+
One alternative to the self-hosted runners is to build statically-linked Stack
44+
executables for Linux/AArch64 on macOS/AArch64. This can be done thanks to
45+
the multi-architecture Docker images built and published by Olivier Benz, at
46+
https://gitlab.com/benz0li/ghc-musl.
47+
48+
GitHub provides a GitHub-hosted macOS/AArch64 runner (`macOS-14`).
49+
Unfortunately, that is macOS/M1 and the M1 machine architecture does not support
50+
nested virtualisation. This rules out using Docker, as the runner is itself a
51+
virtual machine.
52+
53+
However, this solution can be applied locally and the build outputs for the
54+
Linux/AArch64 platform added manually to the result of the GitHub workflow.

doc/stack_root.md

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -166,9 +166,18 @@ it, Stack will recreate the contents of the directory.
166166

167167
### `pantry\hackage` directory
168168

169-
This contains the package index. If the contents of the directory are deleted,
170-
and Stack needs to consult the package index, Stack will seek to download the
171-
latest package index.
169+
This contains a local cache of the package index. If the contents of the
170+
directory are deleted, and Stack needs to consult the package index, Stack will
171+
seek to download the latest package index.
172+
173+
!!! info
174+
175+
Stack depends on package `pantry` which, in turn, depends on package
176+
`hackage-security`. The latter handles the local cache of the package index.
177+
The type `CacheLayout` represents the location of the files that are cached.
178+
`pantry` uses `cabalCacheLayout :: CacheLayout`, the layout that Cabal (the
179+
tool) uses. That is what specifies the names of the files used to cache the
180+
package index, including `00-index.tar` and `00-index.tar.gz`.
172181

173182
### `pantry` directory
174183

0 commit comments

Comments
 (0)