uraimo/run-on-arch-action

Bun cannot execute: required file not found

lokimckay opened this issue · 2 comments

/root/.bun/bin/bun: cannot execute: required file not found

I am trying to install and use Bun. Here is my attempt:

- uses: uraimo/run-on-arch-action@v2
  with:
    arch: ${{ matrix.arch }}
    distro: ${{ matrix.distro }}
    githubToken: ${{ github.token }}
    setup: |
      mkdir -p "${HOME}/.bun/bin"
    dockerRunArgs: |
      --volume "${PWD}/build:/build"
      --volume "${HOME}/.bun/bin:${HOME}/.bun/bin"
    install: |
      case "${{ matrix.distro }}" in
        ubuntu*|jessie|stretch|buster|bullseye)
          apt-get update -q -y
          apt-get install -q -y curl
          apt-get install -q -y unzip
          ;;
        fedora*)
          dnf -y update
          dnf -y install curl
          dnf -y install unzip
          ;;
        alpine*)
          apk update
          apk add curl
          apk add unzip
          apk add bash
          ;;
      esac

      echo 'curl -fsSL https://bun.sh/install | bash'
      curl -fsSL https://bun.sh/install | bash
    run: |
      echo 'uname -a:'
      uname -a
      echo 'arch:'
      arch
      echo 'pwd:'
      pwd

      echo '~/.bun/bin/bun ci/run-tests.ts ${{ matrix.target }}'
      ~/.bun/bin/bun ci/run-tests.ts ${{ matrix.target }}

I receive this output:

WARNING: The requested image's platform (linux/ppc64le) does not match the detected host platform (linux/amd64/v3) and no specific platform was requested
  uname -a:
  Linux a0016ad87237 6.5.0-1021-azure #22~22.04.1-Ubuntu SMP Tue Apr 30 16:08:18 UTC 2024 ppc64le ppc64le ppc64le GNU/Linux
  arch:
  ppc64le
  pwd
  /home/runner/work/godot-rapier-3d/godot-rapier-3d
  ~/.bun/bin/bun ci/run-tests.ts x86_64-unknown-linux-gnu
  /home/runner/work/_actions/uraimo/run-on-arch-action/v2/src/run-on-arch-commands.sh: line 11: /root/.bun/bin/bun: cannot execute: required file not found
  Error: The process '/home/runner/work/_actions/uraimo/run-on-arch-action/v2/src/run-on-arch.sh' failed with exit code 127

Full output

Is this to do with permissions to the /root folder?
How can I work around this?

Thanks in advance for the great action :)

Hi, the warning is not a problem, you can ignore it. But anyway, if you are really unzipping unzip ./bun-linux-x64.zip for x64 it will not work on that powerpc64le container.

This appeared to be working in an old job you ran on aarch64: https://github.com/deltasiege/godot-rapier-3d/actions/runs/9298606753/job/25590985459#step:6:122

The issue here is with this ppc64le ubuntu container, I would just install bun somewhere else if you can or try to figure out the permission issue doing a "whoami/echo $HOME" to see what the default user/home are. I see from your latest run that from a ls -al / the /root directory seems to exist at least.

Thanks very much for your help, you guided me in the right direction
The error was misleading and was actually caused by the binary being incompatible rather than it being missing

For other readers, make sure the binary you're trying to run is compatible with the arch