paritytech / paritytech/revive
Split the `Dockerfile` to allow passing a prebuilt LLVM
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 102
- Forks
- 26
- Avg merge
- 1d 13h
- Merged PRs (30d)
- 6
Description
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
DockerfileDockerfile.resolc(orDockerfile)- Builds resolc + Alpine image with solc
- Pulls LLVM from separate image or a binded prebuilt
Dockerfile.llvm- Builds LLVM
- Add
Makefile.tomltarget- Add a phony target chaining the
docker build -fs
- Add a phony target chaining the
- Update CI MUSL build step
- 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.
- To skip transferring irrelevant files during
- 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
- Should trigger on pushes to
- Add a top-level workflow running the new task from
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with Dockerfile, Makefile.toml, and .github/workflows/reusable-build.yml, then review the referenced get-llvm action and the Build (MUSL) step. Define the Docker build flow for a reusable prebuilt LLVM and add the requested .dockerignore and top-level workflow. Done means the new target builds and sanity-checks the full image, while CI uses Dockerfile.resolc for the MUSL build.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, github-actions, rust
- Domain
- build-system, ci-cd, compilers, devops
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100