Project is able to build locally without errors, but fails on GitHub workflow

Here is my workflow Actions · srikanth100/ion · GitHub

Any idea what could be the issue ?

Hi! Sorry for missing this message in the scuffle. I wonder if this has to do with using an M1 chip? I cloned your directory and it seems to work fine up until the last step:

Step 10/10 : COPY --from=builder /repo/fuzz/target/aarch64-apple-darwin/release/parser /
COPY failed: stat repo/fuzz/target/aarch64-apple-darwin/release/parser: file does not exist

This makes sense since I am not using an M1 machine. Changing the path and updating the base image seems to work better:

FROM --platform=linux/amd64 ubuntu:20.04 as builder

## Install build dependencies.
RUN apt-get update && \
    DEBIAN_FRONTEND=noninteractive apt-get install -y cmake clang curl
RUN curl --proto "=https" --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
RUN ${HOME}/.cargo/bin/rustup default nightly
RUN ${HOME}/.cargo/bin/cargo install -f cargo-fuzz

ADD . /repo
WORKDIR /repo

RUN cd fuzz && ${HOME}/.cargo/bin/cargo fuzz build

# Package Stage
FROM --platform=linux/amd64 ubuntu:20.04

COPY --from=builder /repo/fuzz/target/x86_64-unknown-linux-gnu/release/parser /