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

The process '/home/runner/work/_actions/uraimo/run-on-arch-action/v2/src/run-on-arch.sh' failed #114

Open
try-agaaain opened this issue Mar 8, 2023 · 3 comments

Comments

@try-agaaain
Copy link

I want to build the project on the aarch64 platform, but the following error occurs:

image

Weird, the platform I set is aarch64, but it shows x86_64 here?

Below is my workflow:

on: [push, pull_request]

jobs:
  build_job:
    # The host should always be linux
    runs-on: ubuntu-22.04
    name: Build on ${{ matrix.distro }} ${{ matrix.arch }}

    # Run steps on a matrix of 4 arch/distro combinations
    strategy:
      matrix:
        include:
          - arch: aarch64
            distro: ubuntu22.04
    steps:
      - uses: actions/checkout@v3
      - uses: uraimo/run-on-arch-action@v2
        name: Build artifact
        id: build
        with:
          arch: aarch64
          distro: ubuntu22.04

          # Not required, but speeds up builds
          githubToken: ${{ github.token }}

          # Create an artifacts directory
          setup: |
            echo "my info: " `uname -a`

          # Mount the artifacts directory as /artifacts in the container
          dockerRunArgs: |
            -v /usr/bin/:/usr/bin/
          install: |
            echo "my info: " `uname -a`
            apt-get update && \
            apt-get install -y --no-install-recommends libelf1 libelf-dev \
                zlib1g-dev clang llvm libclang-13-dev make cmake git cargo wget tar curl && \
            apt-get install -y --no-install-recommends ca-certificates	&& \
            update-ca-certificates	&& \
            apt-get clean && \
            curl https://sh.rustup.rs -sSf | sh -s -- -y	&& \
            rm -rf /var/lib/apt/lists/*
            mkdir /src && cd /src
            git clone https://github.com/eunomia-bpf/eunomia-bpf.git && cd eunomia-bpf
            git submodule update --init --recursive --remote
            echo "my info: get the whole repo!"
            cd ecli && make build
            cp /src/eunomia-bpf/ecli/build/bin/Release/ecli /usr/bin/

          # Pass some environment variables to the container
          env: | # YAML, but pipe character is necessary
            artifact_name: git-${{ matrix.distro }}_${{ matrix.arch }}

          # The shell to run commands with in the container
          shell: /bin/sh

          # Produce a binary artifact and place it in the mounted volume
          run: |
            ls -af /usr/bin/ecli
@uraimo
Copy link
Owner

uraimo commented Mar 8, 2023

Setup runs on the x86 host, so what you see is correct, that's github CI runner.
I'm not so sure about that mounting of /usr/bin/ that you do in dockerRunArgs, I would use a separate directory for artifacts.
If you are building something run: is the right section to do it.

Other than this I don' seen any obvious errors in that yaml, it should work, please post a link to the job if it's still broken after the modifications above.

@try-agaaain
Copy link
Author

In run-on-arch-action, are run and setup both run in the ci environment (x86_64)? And only install is run in the user-specified environment (e.g. aarch64)?

@martin-g
Copy link
Contributor

Only run is emulated

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