Description
Refactor the current Dockerfile so CI can reuse it to build the resolc musl binary without the overhead of building LLVM from source. Instead, the LLVM binary that we already get from the get-llvm action can be used.
This also makes sure building of the musl build is aligned in CI (the distributed binary) and for users of the plain Dockerfile(s).
Changes
- Split the
Dockerfile
Dockerfile.resolc (or Dockerfile)
- Builds resolc + Alpine image with solc
- Pulls LLVM from separate image or a binded prebuilt
Dockerfile.llvm
- Add
Makefile.toml target
- Add a phony target chaining the
docker build -fs
- Update CI MUSL build step
- Replace the
run command in the Build (MUSL) step (will be moved to the new build-resolc action in PR #536) to build the Dockerfile.resolc
- Add
.dockerignore
- To skip transferring irrelevant files during
docker build, we could add a .dockerignore (more useful if building locally)
- Contains e.g.
.git/, target/, llvm-*, node_modules/, book/, docs/, etc.
- Add a new workflow running the full build
- Add a top-level workflow running the new task from
Makefile.toml
- Once built, include a sanity check step
- Since this will also build LLVM:
- Should trigger on pushes to
main (not PRs, we already build LLVM in PRs if our llvm builder changes)
- Should use runner
parity-large
Description
Refactor the current
Dockerfileso CI can reuse it to build the resolc musl binary without the overhead of building LLVM from source. Instead, the LLVM binary that we already get from theget-llvmaction can be used.This also makes sure building of the musl build is aligned in CI (the distributed binary) and for users of the plain
Dockerfile(s).Changes
DockerfileDockerfile.resolc(orDockerfile)Dockerfile.llvmMakefile.tomltargetdocker build -fsruncommand in theBuild (MUSL)step (will be moved to the newbuild-resolcaction in PR #536) to build theDockerfile.resolc.dockerignoredocker build, we could add a.dockerignore(more useful if building locally).git/,target/,llvm-*,node_modules/,book/,docs/, etc.Makefile.tomlmain(not PRs, we already build LLVM in PRs if our llvm builder changes)parity-large