-
Notifications
You must be signed in to change notification settings - Fork 27
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
fix(builder): replace manual cmake commands with cmake crate to support all archs. #73
base: development
Are you sure you want to change the base?
Conversation
I made a test repo: https://github.com/humb1t/randomxtest Using it, I tested that new version compiles fine: docker build .
[+] Building 20.0s (15/15) FINISHED docker:desktop-linux
=> [internal] load build definition from Dockerfile 0.0s
=> => transferring dockerfile: 1.68kB 0.0s
=> [internal] load metadata for docker.io/library/debian:unstable-slim 0.6s
=> [internal] load metadata for docker.io/library/ubuntu:22.04 0.6s
=> [internal] load .dockerignore 0.0s
=> => transferring context: 2B 0.0s
=> [builder 1/6] FROM docker.io/library/ubuntu:22.04@sha256:0e5e4a57c2499249aafc3b40fcd541e9a456aab7296681a3994d631587203f97 0.0s
=> [internal] load build context 0.1s
=> => transferring context: 90.11kB 0.0s
=> CACHED [stage-1 1/3] FROM docker.io/library/debian:unstable-slim@sha256:1c6547721f3b1f43654a2b5f23c5d95342d8e92f84f69ad1c6675eb35e8ce42c 0.0s
=> CACHED [builder 2/6] WORKDIR /app 0.0s
=> CACHED [builder 3/6] COPY ./rust-toolchain.toml . 0.0s
=> CACHED [builder 4/6] RUN set -eux; apt-get update; apt-get install -y --no-install-recommends ca-certificates gcc libc6-dev curl git pkg-config libssl-dev llvm libclang-dev clang make 0.0s
=> [builder 5/6] COPY . . 0.3s
=> [builder 6/6] RUN --mount=type=cache,target=/usr/local/cargo/git --mount=type=cache,target=/usr/local/cargo/registry --mount=type=cache,target=/root/.cargo --mount=type=cache,target=/app/target cargo build --release && find ./target/release/ -maxdepth 1 -type f 7.5s
=> [stage-1 2/3] COPY --from=builder /usr/local/bin /usr/local/bin 0.0s
=> [stage-1 3/3] RUN apt-get update && apt-get -y upgrade && apt-get install -y libssl-dev ca-certificates && chmod -R a+x /usr/local/bin 9.2s
=> exporting to image 0.2s
=> => exporting layers 0.2s
=> => writing image sha256:ed7578d8ffbe3b2d769ba343daf07934e1025a0646a23caeab2650f7c96c8ccb So Unfortunately, I'm not using randomx-rs directly. Only as transitive dependency. So additional testing is 100% needed before this PR being merged. |
PR breaks Windows builds
We need to get a matrix build for all supported platforms to test better. |
Description
This PR attempts to solve #49 by using cmake crate.
Motivation and Context
I have an issue building a project that depends on randomx-rs with a setup of Mac M1 as host machine and docker builder that uses Linux ARM architecture.
How Has This Been Tested?
What process can a PR reviewer use to test or verify this change?
Breaking Changes