-
Notifications
You must be signed in to change notification settings - Fork 75
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
Scripts to enable local build from github actions workflow using nektos/act #762
base: main
Are you sure you want to change the base?
Conversation
My 2cents: the solution to mismatch between CI and local is not to make local more like CI but to make CI more like local. Going down the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Quite useful!
Probably we should also run this from... GitHub CI :-) to check it gives consistent results.
@@ -0,0 +1,6 @@ | |||
FROM ubuntu:20.04 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any motivated reason not to go directly to 22.04 instead of adding 2 more years of technical debt ?
ENV TZ=Etc/UTC | ||
RUN apt-get -qq update && \ | ||
apt-get -qq install -y git nodejs pip ninja-build clang lld zstd && \ | ||
pip install cmake numpy psutil pybind11 rich |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing EOL.
ARG DEBIAN_FRONTEND=noninteractive | ||
ENV TZ=Etc/UTC | ||
RUN apt-get -qq update && \ | ||
apt-get -qq install -y git nodejs pip ninja-build clang lld zstd && \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good opportunity to sort the package list.
|
||
# make a temporary file and fix up the Build and Test | ||
|
||
# the local container if it doesn't exist |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have the feeling that the 3 comments around are out of context, even if I love comments in projects. :-)
@@ -0,0 +1,62 @@ | |||
ROOT_DIR:=$(shell dirname $(realpath $(firstword $(MAKEFILE_LIST)))) | |||
|
|||
LOCAL_LLVM_REPO:=$(realpath ${ROOT_DIR}/../../)/llvm-central-repo |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LOCAL_LLVM_REPO:=$(realpath ${ROOT_DIR}/../../)/llvm-central-repo | |
LOCAL_LLVM_REPO:=$(realpath ${ROOT_DIR}/../..)/llvm-central-repo |
-v ${GITHUB_WORKSPACE}:${WORKSPACE} \ | ||
amd/acdcbuild:1.1 \ | ||
bash |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
-v ${GITHUB_WORKSPACE}:${WORKSPACE} \ | |
amd/acdcbuild:1.1 \ | |
bash | |
-v ${GITHUB_WORKSPACE}:${WORKSPACE} \ | |
amd/acdcbuild:1.1 \ | |
bash |
@@ -0,0 +1,3 @@ | |||
#!/bin/bash | |||
|
|||
docker build -t amd/acdcbuild:1.1 . |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing EOL.
|
||
# Dependencies | ||
|
||
Docker ( configured with unprivileged access using 'docker' group) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any reason to have a space after all these (
?
These script enable a containerized build locally using nektos/act. If these are widely adopted we can have many people able to replicate the CI flow exactly in their local machine ( with an environment controlled using the same mechanisms as the CI).
These scripts contain some additions to make this go fast.