Skip to content
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

Multi-arch support? #44

Open
samip5 opened this issue Oct 1, 2023 · 16 comments
Open

Multi-arch support? #44

samip5 opened this issue Oct 1, 2023 · 16 comments

Comments

@samip5
Copy link

samip5 commented Oct 1, 2023

It seems that the action doesn't currently support arm64 Ubuntu 22.04?

https://github.com/samipsolutions/simplexmq/actions/runs/6373301638/job/17296910113

@andreasabel
Copy link
Member

Your run says: Runner name: 'buildjet.com_e9ab0ae3-c58c-4c7e-8dd9-ae07d5b11b57'.
We don't have to access to this runner, just the standard github free runners, AFAIK.
So we can't test it in our CI, can we?

@samip5
Copy link
Author

samip5 commented Oct 2, 2023

Your run says: Runner name: 'buildjet.com_e9ab0ae3-c58c-4c7e-8dd9-ae07d5b11b57'.
We don't have to access to this runner, just the standard github free runners, AFAIK.
So we can't test it in our CI, can we?

You can, they have a trial (doesn't cost anything) which requires going to buildjet.com and logging in as well as adding it to the right repo/org.

@andreasabel
Copy link
Member

I read there: https://buildjet.com/for-github-actions/docs/about/pricing

Every account gets a one-time $5 credit to try our services without any upfront commitment

That does not sound like a commitment to "forever free for OSS".

@samip5
Copy link
Author

samip5 commented Oct 2, 2023

I read there: https://buildjet.com/for-github-actions/docs/about/pricing

Every account gets a one-time $5 credit to try our services without any upfront commitment

That does not sound like a commitment to "forever free for OSS".

That's correct but the only way other than qemu, self-hosted arm64 runners or Circle CI (which apparently has native arm64 as well nowadays)

@andreasabel
Copy link
Member

Let me suggest a way forward towards supporting ARM.
Could you fix the ARM support in your fork of the setup action and then come back here with a recipe how to fix it or a PR?
Maybe it is just a smaller thing that does not work now, and we can fix it plausibly without continuously testing it on CI.

@samip5
Copy link
Author

samip5 commented Oct 2, 2023

I think currently it fails due to the PPA repo being used as failback, doesn't have support for Ubuntu 22.04 I believe.

I believe it should try to use the APT repo in very rare cases, right?

As this suggest it's part of the problem:

Err:8 https://ppa.launchpadcontent.net/hvr/ghc/ubuntu jammy Release
    404  Not Found [IP: 185.125.190.52 443]

@andreasabel
Copy link
Member

Right, the apt install method should only be a fall back for ubuntu-20.04, not any other platforms.

Last time I looked, the actions API did not allow me to ask for the runner name (like ubuntu-20.04, windows-2022), only for the OS (Linux, Windows...). But this was when I wrote an action in YAML. But from typescript there should be a way to get more info about the OS version.

@andreasabel
Copy link
Member

@samip5 Does the following PR (released as 2.6.0) fix things for you?

@wolverian
Copy link

I have this issue. Here's the log:

2023-12-29T13:23:11.6360462Z ##[group]Run haskell-actions/setup@v2
2023-12-29T13:23:11.6361500Z with:
2023-12-29T13:23:11.6361884Z   ghc-version: 9.8.1
2023-12-29T13:23:11.6362328Z   cabal-version: latest
2023-12-29T13:23:11.6362794Z   stack-version: latest
2023-12-29T13:23:11.6363252Z   cabal-update: true
2023-12-29T13:23:11.6363661Z env:
2023-12-29T13:23:11.6364024Z   GHC_VERSION: 9.8.1
2023-12-29T13:23:11.6364445Z ##[endgroup]
2023-12-29T13:23:11.8162890Z Preparing to setup a Haskell environment
2023-12-29T13:23:11.8175518Z Resolved cabal latest to 3.10.2.0
2023-12-29T13:23:11.8179632Z ##[group]Preparing ghc environment
2023-12-29T13:23:12.0744693Z [command]/opt/hostedtoolcache/ghcup/0.1.19.5/arm64/ghcup unset ghc
2023-12-29T13:23:12.0835002Z /opt/hostedtoolcache/ghcup/0.1.19.5/arm64/ghcup: 1: Syntax error: "(" unexpected
2023-12-29T13:23:12.0846678Z ##[endgroup]
2023-12-29T13:23:12.0847447Z ##[group]Installing ghc version 9.8.1
2023-12-29T13:23:12.2951714Z [command]/opt/hostedtoolcache/ghcup/0.1.19.5/arm64/ghcup whereis ghc 9.8.1
2023-12-29T13:23:12.3005236Z /opt/hostedtoolcache/ghcup/0.1.19.5/arm64/ghcup: 1: Syntax error: "(" unexpected
2023-12-29T13:23:12.3010248Z 
2023-12-29T13:23:12.3010534Z 
2023-12-29T13:23:12.3011587Z Attempting to access tool ghc at location /opt/ghc/9.8.1/bin
2023-12-29T13:23:12.3013594Z Failed to access tool ghc at location /opt/ghc/9.8.1/bin
2023-12-29T13:23:12.3014489Z Attempting to access tool ghc at location /home/runner/.ghcup/bin
2023-12-29T13:23:12.3015438Z Failed to access tool ghc at location /home/runner/.ghcup/bin
2023-12-29T13:23:12.3024488Z Installing libcurses5 and libtinfo5 using apt-get (for ghc < 8.3)
2023-12-29T13:23:12.3059696Z [command]/usr/bin/sudo -- sh -c apt-get update && apt-get -y install libncurses5 libtinfo5
2023-12-29T13:23:12.4905499Z Hit:1 http://ports.ubuntu.com/ubuntu-ports jammy InRelease
2023-12-29T13:23:12.4989298Z Get:2 http://ports.ubuntu.com/ubuntu-ports jammy-updates InRelease [119 kB]
2023-12-29T13:23:12.5233857Z Get:3 https://packages.microsoft.com/ubuntu/22.04/prod jammy InRelease [3631 B]
2023-12-29T13:23:12.5814703Z Get:4 http://ports.ubuntu.com/ubuntu-ports jammy-backports InRelease [109 kB]
2023-12-29T13:23:12.6044955Z Hit:5 https://ppa.launchpadcontent.net/ubuntu-toolchain-r/test/ubuntu jammy InRelease
2023-12-29T13:23:12.6134418Z Get:6 http://ports.ubuntu.com/ubuntu-ports jammy-security InRelease [110 kB]
2023-12-29T13:23:12.6988130Z Get:7 https://packages.microsoft.com/ubuntu/22.04/prod jammy/main amd64 Packages [118 kB]
2023-12-29T13:23:12.7583816Z Get:8 https://packages.microsoft.com/ubuntu/22.04/prod jammy/main arm64 Packages [28.8 kB]
2023-12-29T13:23:12.7782409Z Get:9 https://packages.microsoft.com/ubuntu/22.04/prod jammy/main armhf Packages [10.4 kB]
2023-12-29T13:23:12.7838380Z Get:10 http://ports.ubuntu.com/ubuntu-ports jammy-updates/main arm64 Packages [1104 kB]
2023-12-29T13:23:12.7906210Z Get:11 https://packages.microsoft.com/ubuntu/22.04/prod jammy/main all Packages [1036 B]
2023-12-29T13:23:12.8650024Z Get:12 http://ports.ubuntu.com/ubuntu-ports jammy-updates/main Translation-en [260 kB]
2023-12-29T13:23:12.8868941Z Get:13 http://ports.ubuntu.com/ubuntu-ports jammy-updates/main arm64 c-n-f Metadata [15.7 kB]
2023-12-29T13:23:12.9062969Z Get:14 http://ports.ubuntu.com/ubuntu-ports jammy-updates/restricted arm64 Packages [842 kB]
2023-12-29T13:23:12.9350045Z Get:15 http://ports.ubuntu.com/ubuntu-ports jammy-updates/restricted Translation-en [203 kB]
2023-12-29T13:23:12.9566861Z Get:16 http://ports.ubuntu.com/ubuntu-ports jammy-updates/restricted arm64 c-n-f Metadata [376 B]
2023-12-29T13:23:12.9761887Z Get:17 http://ports.ubuntu.com/ubuntu-ports jammy-updates/universe arm64 Packages [944 kB]
2023-12-29T13:23:13.0278090Z Get:18 http://ports.ubuntu.com/ubuntu-ports jammy-updates/universe Translation-en [226 kB]
2023-12-29T13:23:13.1371742Z Get:19 http://ports.ubuntu.com/ubuntu-ports jammy-updates/universe arm64 c-n-f Metadata [19.4 kB]
2023-12-29T13:23:13.1592220Z Get:20 http://ports.ubuntu.com/ubuntu-ports jammy-updates/multiverse arm64 Packages [23.5 kB]
2023-12-29T13:23:13.1809061Z Get:21 http://ports.ubuntu.com/ubuntu-ports jammy-updates/multiverse arm64 c-n-f Metadata [260 B]
2023-12-29T13:23:13.2017726Z Get:22 http://ports.ubuntu.com/ubuntu-ports jammy-backports/main arm64 Packages [41.3 kB]
2023-12-29T13:23:13.2248994Z Get:23 http://ports.ubuntu.com/ubuntu-ports jammy-backports/main arm64 c-n-f Metadata [388 B]
2023-12-29T13:23:13.2459018Z Get:24 http://ports.ubuntu.com/ubuntu-ports jammy-backports/universe arm64 Packages [22.7 kB]
2023-12-29T13:23:13.2677258Z Get:25 http://ports.ubuntu.com/ubuntu-ports jammy-backports/universe Translation-en [16.5 kB]
2023-12-29T13:23:13.2889294Z Get:26 http://ports.ubuntu.com/ubuntu-ports jammy-backports/universe arm64 c-n-f Metadata [572 B]
2023-12-29T13:23:13.3099454Z Get:27 http://ports.ubuntu.com/ubuntu-ports jammy-security/main arm64 Packages [898 kB]
2023-12-29T13:23:13.3805226Z Get:28 http://ports.ubuntu.com/ubuntu-ports jammy-security/main Translation-en [200 kB]
2023-12-29T13:23:13.4190491Z Get:29 http://ports.ubuntu.com/ubuntu-ports jammy-security/main arm64 c-n-f Metadata [11.1 kB]
2023-12-29T13:23:13.4373162Z Get:30 http://ports.ubuntu.com/ubuntu-ports jammy-security/restricted arm64 Packages [833 kB]
2023-12-29T13:23:13.5568672Z Get:31 http://ports.ubuntu.com/ubuntu-ports jammy-security/restricted Translation-en [200 kB]
2023-12-29T13:23:13.5937500Z Get:32 http://ports.ubuntu.com/ubuntu-ports jammy-security/restricted arm64 c-n-f Metadata [380 B]
2023-12-29T13:23:13.6121902Z Get:33 http://ports.ubuntu.com/ubuntu-ports jammy-security/universe arm64 Packages [751 kB]
2023-12-29T13:23:13.6438129Z Get:34 http://ports.ubuntu.com/ubuntu-ports jammy-security/universe Translation-en [156 kB]
2023-12-29T13:23:13.6638192Z Get:35 http://ports.ubuntu.com/ubuntu-ports jammy-security/universe arm64 c-n-f Metadata [14.2 kB]
2023-12-29T13:23:13.6819539Z Get:36 http://ports.ubuntu.com/ubuntu-ports jammy-security/multiverse arm64 Packages [19.6 kB]
2023-12-29T13:23:13.7004779Z Get:37 http://ports.ubuntu.com/ubuntu-ports jammy-security/multiverse arm64 c-n-f Metadata [236 B]
2023-12-29T13:23:21.0862501Z Fetched 7302 kB in 1s (5536 kB/s)
2023-12-29T13:23:21.8421594Z Reading package lists...
2023-12-29T13:23:21.9153031Z Reading package lists...
2023-12-29T13:23:22.1008945Z Building dependency tree...
2023-12-29T13:23:22.1021404Z Reading state information...
2023-12-29T13:23:22.3144674Z The following NEW packages will be installed:
2023-12-29T13:23:22.3151678Z   libncurses5 libtinfo5
2023-12-29T13:23:22.3728789Z 0 upgraded, 2 newly installed, 0 to remove and 145 not upgraded.
2023-12-29T13:23:22.3729888Z Need to get 202 kB of archives.
2023-12-29T13:23:22.3731037Z After this operation, 845 kB of additional disk space will be used.
2023-12-29T13:23:22.3732699Z Get:1 http://ports.ubuntu.com/ubuntu-ports jammy-updates/universe arm64 libtinfo5 arm64 6.3-2ubuntu0.1 [99.2 kB]
2023-12-29T13:23:22.4614810Z Get:2 http://ports.ubuntu.com/ubuntu-ports jammy-updates/universe arm64 libncurses5 arm64 6.3-2ubuntu0.1 [103 kB]
2023-12-29T13:23:22.9102370Z Fetched 202 kB in 0s (1301 kB/s)
2023-12-29T13:23:22.9342724Z Selecting previously unselected package libtinfo5:arm64.
2023-12-29T13:23:22.9471885Z (Reading database ... 
2023-12-29T13:23:22.9472850Z (Reading database ... 5%
2023-12-29T13:23:22.9473806Z (Reading database ... 10%
2023-12-29T13:23:22.9474595Z (Reading database ... 15%
2023-12-29T13:23:22.9475379Z (Reading database ... 20%
2023-12-29T13:23:22.9476163Z (Reading database ... 25%
2023-12-29T13:23:22.9476945Z (Reading database ... 30%
2023-12-29T13:23:22.9477722Z (Reading database ... 35%
2023-12-29T13:23:22.9478517Z (Reading database ... 40%
2023-12-29T13:23:22.9479412Z (Reading database ... 45%
2023-12-29T13:23:22.9480391Z (Reading database ... 50%
2023-12-29T13:23:22.9556145Z (Reading database ... 55%
2023-12-29T13:23:22.9707321Z (Reading database ... 60%
2023-12-29T13:23:22.9817194Z (Reading database ... 65%
2023-12-29T13:23:22.9974969Z (Reading database ... 70%
2023-12-29T13:23:23.0201704Z (Reading database ... 75%
2023-12-29T13:23:23.0491712Z (Reading database ... 80%
2023-12-29T13:23:23.0757680Z (Reading database ... 85%
2023-12-29T13:23:23.1211103Z (Reading database ... 90%
2023-12-29T13:23:23.1458562Z (Reading database ... 95%
2023-12-29T13:23:23.1459142Z (Reading database ... 100%
2023-12-29T13:23:23.1459874Z (Reading database ... 206445 files and directories currently installed.)
2023-12-29T13:23:23.1509792Z Preparing to unpack .../libtinfo5_6.3-2ubuntu0.1_arm64.deb ...
2023-12-29T13:23:23.1546174Z Unpacking libtinfo5:arm64 (6.3-2ubuntu0.1) ...
2023-12-29T13:23:23.1791432Z Selecting previously unselected package libncurses5:arm64.
2023-12-29T13:23:23.1927979Z Preparing to unpack .../libncurses5_6.3-2ubuntu0.1_arm64.deb ...
2023-12-29T13:23:23.1934303Z Unpacking libncurses5:arm64 (6.3-2ubuntu0.1) ...
2023-12-29T13:23:23.2335629Z Setting up libtinfo5:arm64 (6.3-2ubuntu0.1) ...
2023-12-29T13:23:23.2356552Z Setting up libncurses5:arm64 (6.3-2ubuntu0.1) ...
2023-12-29T13:23:23.2379350Z Processing triggers for libc-bin (2.35-0ubuntu3.3) ...
2023-12-29T13:23:23.4925836Z NEEDRESTART-VER: 3.5
2023-12-29T13:23:25.1834190Z NEEDRESTART-KCUR: 5.15.0-84-generic
2023-12-29T13:23:25.1834961Z NEEDRESTART-KEXP: 5.15.0-84-generic
2023-12-29T13:23:25.1835585Z NEEDRESTART-KSTA: 1
2023-12-29T13:23:27.9164506Z Attempting to install ghc 9.8.1 using ghcup
2023-12-29T13:23:28.1313700Z [command]/opt/hostedtoolcache/ghcup/0.1.19.5/arm64/ghcup install ghc 9.8.1
2023-12-29T13:23:28.1396300Z /opt/hostedtoolcache/ghcup/0.1.19.5/arm64/ghcup: 1: Syntax error: "(" unexpected
2023-12-29T13:23:28.3427189Z [command]/opt/hostedtoolcache/ghcup/0.1.19.5/arm64/ghcup whereis ghc 9.8.1
2023-12-29T13:23:28.3494163Z /opt/hostedtoolcache/ghcup/0.1.19.5/arm64/ghcup: 1: Syntax error: "(" unexpected
2023-12-29T13:23:28.3495200Z 
2023-12-29T13:23:28.3495207Z 
2023-12-29T13:23:28.3495954Z Attempting to access tool ghc at location /opt/ghc/9.8.1/bin
2023-12-29T13:23:28.3496807Z Failed to access tool ghc at location /opt/ghc/9.8.1/bin
2023-12-29T13:23:28.3497715Z Attempting to access tool ghc at location /home/runner/.ghcup/bin
2023-12-29T13:23:28.3500792Z Failed to access tool ghc at location /home/runner/.ghcup/bin
2023-12-29T13:23:28.3504690Z Attempting to install ghc 9.8.1 using apt-get
2023-12-29T13:23:28.3520832Z [command]/usr/bin/sudo -- sh -c add-apt-repository -y ppa:hvr/ghc && apt-get update && apt-get -y install ghc-9.8.1
2023-12-29T13:23:30.0516336Z Hit:1 http://ports.ubuntu.com/ubuntu-ports jammy InRelease
2023-12-29T13:23:30.0601156Z Hit:2 http://ports.ubuntu.com/ubuntu-ports jammy-updates InRelease
2023-12-29T13:23:30.0730230Z Hit:3 https://packages.microsoft.com/ubuntu/22.04/prod jammy InRelease
2023-12-29T13:23:30.0788998Z Hit:4 http://ports.ubuntu.com/ubuntu-ports jammy-backports InRelease
2023-12-29T13:23:30.1013107Z Hit:5 http://ports.ubuntu.com/ubuntu-ports jammy-security InRelease
2023-12-29T13:23:30.1432549Z Ign:6 https://ppa.launchpadcontent.net/hvr/ghc/ubuntu jammy InRelease
2023-12-29T13:23:30.1819437Z Hit:7 https://ppa.launchpadcontent.net/ubuntu-toolchain-r/test/ubuntu jammy InRelease
2023-12-29T13:23:30.2039259Z Err:8 https://ppa.launchpadcontent.net/hvr/ghc/ubuntu jammy Release
2023-12-29T13:23:30.2040125Z   404  Not Found [IP: 185.125.190.80 443]
2023-12-29T13:23:34.9352592Z Reading package lists...
2023-12-29T13:23:34.9518558Z E: The repository 'https://ppa.launchpadcontent.net/hvr/ghc/ubuntu jammy Release' does not have a Release file.
2023-12-29T13:23:34.9577952Z Repository: 'deb https://ppa.launchpadcontent.net/hvr/ghc/ubuntu/ jammy main'
2023-12-29T13:23:34.9579253Z Description:
2023-12-29T13:23:34.9581482Z Convenient packages for GHC releases from http://www.haskell.org/ghc/ (plus cabal-install packages) which can be installed side by side for working/testing with multiple/older GHCs and/or with http://travis-ci.org
2023-12-29T13:23:34.9583204Z 
2023-12-29T13:23:34.9583705Z This PPA usually provides packages for all non-EOL'ed Ubuntu releases
2023-12-29T13:23:34.9588026Z (packages for EOL-ed Ubuntu LTS releases will be moved into  https://launchpad.net/~hvr/+archive/ubuntu/ghc-eol and eventually removed); see https://wiki.ubuntu.com/Releases for a list of current Ubuntu releases and their EOL status.
2023-12-29T13:23:34.9590694Z 
2023-12-29T13:23:34.9590923Z GHC is split into 4 packages,
2023-12-29T13:23:34.9591400Z 
2023-12-29T13:23:34.9592714Z  ghc-$VER           (core package, contains ghc and executables such as haddock)
2023-12-29T13:23:34.9594218Z  ghc-$VER-dyn       (contains dynamic libraries for version prior to GHC 7.8)
2023-12-29T13:23:34.9595236Z  ghc-$VER-prof      (contains profiling libs)
2023-12-29T13:23:34.9596088Z  ghc-$VER-htmldocs  (contains generated HTML Haddock output)
2023-12-29T13:23:34.9596632Z 
2023-12-29T13:23:34.9598087Z The GHC packages install into `/opt/ghc/$VER/` so in order to use them, one way is to bring a particular GHC version into scope by placing the respective `/opt/ghc/$VER/bin` folder early in the PATH environment variable.
2023-12-29T13:23:34.9599705Z 
2023-12-29T13:23:34.9601742Z There's also a `/opt/ghc/bin` (& `/opt/cabal/bin`) folder which contains version-suffixed symlinks to installed GHC versions for convenient use with cabal (e.g. "cabal new-build -w ghc-7.8.4"), as well as symlinks managed by update-alternatives(1) which can be configured via
2023-12-29T13:23:34.9603750Z 
2023-12-29T13:23:34.9604051Z   sudo update-alternatives --config opt-ghc
2023-12-29T13:23:34.9604918Z   sudo update-alternatives --config opt-cabal
2023-12-29T13:23:34.9605361Z 
2023-12-29T13:23:34.9606529Z Note that `/opt/ghc/bin` also contains a default symlink for `cabal`, so it's enough to include `/opt/ghc/bin` in your PATH to get access to both `cabal` and `ghc`.
2023-12-29T13:23:34.9607757Z 
2023-12-29T13:23:34.9608174Z *NEW* You can find packages built specifically for Debian 9 (Stretch) at
2023-12-29T13:23:34.9609010Z http://downloads.haskell.org/debian/
2023-12-29T13:23:34.9609403Z 
2023-12-29T13:23:34.9610344Z *NEW* If you're using macOS, you can find a GHC distribution in the same spirit as this PPA over at https://haskell.futurice.com/
2023-12-29T13:23:34.9611368Z 
2023-12-29T13:23:34.9612295Z *NEW* Packages optimised for Windows Subsystem for Linux (WSL) can be found at https://launchpad.net/~hvr/+archive/ubuntu/ghc-wsl
2023-12-29T13:23:34.9613305Z 
2023-12-29T13:23:34.9613779Z *NEW* A GHCJS PPA is available at https://launchpad.net/~hvr/+archive/ubuntu/ghcjs
2023-12-29T13:23:34.9614472Z 
2023-12-29T13:23:34.9615366Z See also https://github.com/hvr/multi-ghc-travis for reporting bugs/issues as well as for more information about this PPA
2023-12-29T13:23:34.9616667Z More info: https://launchpad.net/~hvr/+archive/ubuntu/ghc
2023-12-29T13:23:34.9617343Z Adding repository.
2023-12-29T13:23:34.9632516Z Adding deb entry to /etc/apt/sources.list.d/hvr-ubuntu-ghc-jammy.list
2023-12-29T13:23:34.9633871Z Adding disabled deb-src entry to /etc/apt/sources.list.d/hvr-ubuntu-ghc-jammy.list
2023-12-29T13:23:34.9635466Z Adding key to /etc/apt/trusted.gpg.d/hvr-ubuntu-ghc.gpg with fingerprint 063DAB2BDC0B3F9FCEBC378BFF3AEACEF6F88286
2023-12-29T13:23:35.1689584Z Hit:1 http://ports.ubuntu.com/ubuntu-ports jammy InRelease
2023-12-29T13:23:35.1799967Z Hit:2 http://ports.ubuntu.com/ubuntu-ports jammy-updates InRelease
2023-12-29T13:23:35.1977528Z Hit:3 http://ports.ubuntu.com/ubuntu-ports jammy-backports InRelease
2023-12-29T13:23:35.2088261Z Hit:4 https://packages.microsoft.com/ubuntu/22.04/prod jammy InRelease
2023-12-29T13:23:35.2154661Z Hit:5 http://ports.ubuntu.com/ubuntu-ports jammy-security InRelease
2023-12-29T13:23:35.2681435Z Ign:6 https://ppa.launchpadcontent.net/hvr/ghc/ubuntu jammy InRelease
2023-12-29T13:23:35.2969109Z Hit:7 https://ppa.launchpadcontent.net/ubuntu-toolchain-r/test/ubuntu jammy InRelease
2023-12-29T13:23:35.3180861Z Err:8 https://ppa.launchpadcontent.net/hvr/ghc/ubuntu jammy Release
2023-12-29T13:23:35.3181722Z   404  Not Found [IP: 185.125.190.80 443]
2023-12-29T13:23:36.5555066Z Reading package lists...
2023-12-29T13:23:36.5726783Z E: The repository 'https://ppa.launchpadcontent.net/hvr/ghc/ubuntu jammy Release' does not have a Release file.
2023-12-29T13:23:36.6309827Z Reading package lists...
2023-12-29T13:23:36.8171594Z Building dependency tree...
2023-12-29T13:23:36.8182795Z Reading state information...
2023-12-29T13:23:36.9248817Z E: Unable to locate package ghc-9.8.1
2023-12-29T13:23:36.9249584Z E: Couldn't find any package by glob 'ghc-9.8.1'
2023-12-29T13:23:36.9250370Z E: Couldn't find any package by regex 'ghc-9.8.1'
2023-12-29T13:23:37.1332807Z [command]/opt/hostedtoolcache/ghcup/0.1.19.5/arm64/ghcup whereis ghc 9.8.1
2023-12-29T13:23:37.1389336Z /opt/hostedtoolcache/ghcup/0.1.19.5/arm64/ghcup: 1: Syntax error: "(" unexpected
2023-12-29T13:23:37.1394135Z 
2023-12-29T13:23:37.1394278Z 
2023-12-29T13:23:37.1395281Z Attempting to access tool ghc at location /opt/ghc/9.8.1/bin
2023-12-29T13:23:37.1396127Z Failed to access tool ghc at location /opt/ghc/9.8.1/bin
2023-12-29T13:23:37.1396998Z Attempting to access tool ghc at location /home/runner/.ghcup/bin
2023-12-29T13:23:37.1397930Z Failed to access tool ghc at location /home/runner/.ghcup/bin
2023-12-29T13:23:37.1398963Z ##[endgroup]
2023-12-29T13:23:37.1454829Z ##[error]All install methods for ghc 9.8.1 failed

I think the issue is that the runner is trying to run ghcup with dash, not bash (based on https://unix.stackexchange.com/questions/45781/shell-script-fails-syntax-error-unexpected):

2023-12-29T13:23:12.0835002Z /opt/hostedtoolcache/ghcup/0.1.19.5/arm64/ghcup: 1: Syntax error: "(" unexpected

I'm not sure why this should be the case. Using

defaults:
  run:
    shell: bash

at the top level of my workflow did not change anything. I can run this by the BuildJet support as well. I'll report here if I get anything back.

@andreasabel
Copy link
Member

@wolverian :

I have this issue.

Mmh, it looks more like the following issue:

@wolverian
Copy link

@wolverian :

I have this issue.

Mmh, it looks more like the following issue:

But I don't think we should be falling back to the PPA at all here; ghcup should work.

@andreasabel
Copy link
Member

andreasabel commented Dec 30, 2023

But I don't think we should be falling back to the PPA at all here; ghcup should work.

Not sure why you then pasted the whole debug log for the PPA step...

Anyhow, could you link to the original CI run where it failed?

@wolverian
Copy link

But I don't think we should be falling back to the PPA at all here; ghcup should work.

Not sure why you then pasted the whole debug log for the PPA step...

I pasted the whole Run haskell-actions/setup@v2 debug log. Sorry if that was confusing.

Anyhow, could you link to the original CI run where it failed?

The repo was private originally, but I've made it public: https://github.com/typeverity/cis/actions/runs/7357027683/job/20027991094

@andreasabel
Copy link
Member

@wolverian , thanks for the link to the workflow!

https://github.com/typeverity/cis/actions/runs/7357027683/workflow#L24

runs-on: buildjet-8vcpu-ubuntu-2204-arm

I am afraid we do not test this VM, as it is not free.

/opt/hostedtoolcache/ghcup/0.1.19.5/arm64/ghcup unset ghc
/opt/hostedtoolcache/ghcup/0.1.19.5/arm64/ghcup: 1: Syntax error: "(" unexpected

To find out whether this is a a problem of the setup action or a bare ghcup issue, could you prepare a workflow running on buildjet-8vcpu-ubuntu-2204-arm that tries to communicate the respective commands to ghcup directly, rather than going via this action?

@wolverian
Copy link

Looks like https://github.com/haskell-actions/setup/releases/tag/v2.6.1 fixed this issue, probably due to the ghcup bump. Thank you!

@andreasabel
Copy link
Member

Excellent news!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants