Skip to content

Commit

Permalink
wip - testing
Browse files Browse the repository at this point in the history
  • Loading branch information
PearsonWhite committed Oct 15, 2024
1 parent 91092b1 commit 91c2b17
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 4 deletions.
2 changes: 1 addition & 1 deletion build_native_in_docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ docker run \
-e CARGO_HOME=${HOME}/.cargo \
-u $UID \
-v /tmp:/tmp \
-v "${HOME}:${HOME}" \
-v "${HOME}:${HOME}:z" \
--workdir ${PWD} \
${docker_image_name} \
"$@"
13 changes: 12 additions & 1 deletion scripts/boostrap.sh → scripts/bootstrap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# Set SEQUENCER_DIR as first argument.
[ "$#" -gt 0 ] || (echo "Path to sequencer repo required as an argument, $# arguments provided" ; exit 1)
SEQUENCER_DIR="$1"
remaining_args=("${all_args[@]:1}")
remaining_args=${@:2}

# Building the docker image builds libcairo_native_runtime.a, but the sequencer repo may not exist (on the docker image).
# When running the github actions CI, `build_native_in_docker.sh` is called and mounts home.
Expand All @@ -23,6 +23,17 @@ function copy_cairo_native_lib() {
{ set +x; } 2>/dev/null
}

echo "asdf lib: "
ls -lsah /cairo_native/libcairo_native_runtime.a # asdf
echo "asdf dir: "
ls -lsah ${SEQUENCER_DIR} # asdf
echo "asdf dir2: "
ls -lsah ${SEQUENCER_DIR}/crates # asdf
echo "asdf dir3: "
ls -lsah ${SEQUENCER_DIR}/crates/blockifier # asdf
whoami # asdf
echo "remaining: $remaining_args" # asdf

copy_cairo_native_lib "${SEQUENCER_DIR}"

# Run the passed in command using remaining arguments
Expand Down
2 changes: 2 additions & 0 deletions scripts/dependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,8 @@ function compile_cairo_native_runtime() {

mv ./cairo_native/target/release/libcairo_native_runtime.a ${LIBCAIRO_NATIVE_DIR}/libcairo_native_runtime.a
rm -rf ./cairo_native

ls -lsah ${LIBCAIRO_NATIVE_DIR}/libcairo_native_runtime.a # asdf
}

function main() {
Expand Down
4 changes: 2 additions & 2 deletions scripts/sequencer-ci.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ ENV PATH=$PATH:${RUSTUP_HOME}/bin

COPY install_build_tools.sh .
COPY dependencies.sh .
COPY boostrap.sh .
COPY bootstrap.sh .

RUN ./install_build_tools.sh /cairo_native

ENTRYPOINT [ "sh", "-c", "/cairo_native/boostrap.sh ${SEQUENCER_DIR} $0 $@" ]
ENTRYPOINT [ "sh", "-c", "/cairo_native/bootstrap.sh ${SEQUENCER_DIR} $0 $@" ]

0 comments on commit 91c2b17

Please sign in to comment.