uraimo / run-on-arch-action

A Github Action that executes jobs/commands on non-x86 cpu architectures (ARMv6, ARMv7, aarch64, s390x, ppc64le, riscv64) via QEMU
BSD 3-Clause "New" or "Revised" License
679 stars 150 forks source link

Where to find gnu compiler? #15

Closed peterzheng98 closed 4 years ago

peterzheng98 commented 4 years ago

Where to find gcc in the image?

uraimo commented 4 years ago

Hi, the barebones base image doesn't have a compiler, you'll have to install it (build-essential on Ubuntu) by yourself as first step of your run section, e.g.:

on: [push]

jobs:
  armv7_job:
    runs-on: ubuntu-18.04
    name: Build on ARMv7 
    steps:
      - uses: actions/checkout@v2.1.0
      - uses: uraimo/run-on-arch-action@v1.0.9
        id: runcmd
        with:
          architecture: armv7
          distribution: ubuntu18.04
          run: |
            apt install build-essential
            uname -a
jzmaddock commented 3 years ago

I'm also trying and failing to get this to work, see for example test script run here: https://github.com/jzmaddock/math/runs/1844979258?check_suite_focus=true

Fails with

E: Unable to locate package build-essential

similar failure trying to install git as well.

jzmaddock commented 3 years ago

Never mind, for the benefit of future googlers this seems to get it:

            apt update
            apt -y install gcc g++ git python
uraimo commented 3 years ago

Yes, thanks for commenting on this, these base images are usually stripped and the apt cache has been cleared. You'll always need to do a "apt update" to be able to find anything.