-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Change path for mv libcairo_native
Commit cfe157b in rdr/add-native-runtime added a WORKDIR /app for the ci dockerfile, so the path where libcairo_native_runtime.a is moved to had to be updated - Adds argument to scripts/dependencies.sh to choose where to mv libcairo_native_runtime.a - Updated scripts/install_build_tools.sh and build_native_in_docker.sh to handle new argument and pass it on in subsequent scripts/commands. - Adds scripts/boostrap.sh for scripts/sequencer-ci.Dockerfile to run at its entrypoint to copy the library to sequencer/crates/blockifier/
- Loading branch information
1 parent
fc9b733
commit abdd72e
Showing
6 changed files
with
52 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#!/bin/env bash | ||
|
||
# Script for the entry point of sequencer-ci.Dockerfile. | ||
|
||
# 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=${@: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. | ||
# `-v "${HOME}:${HOME}"` mounts `/home/runner/work/sequencer` | ||
# In `.github/workflows/committer_cli_push.yml`, `actions/checkout@v4` pulls the repo under home. | ||
# Thus, when running docker, we need to grab the lib from the build step and move it under our new mounted directory. | ||
# Final destination for `libcairo_native_runtime.a` committer_cli_push is `/home/runner/work/sequencer/sequencer/crates/blockifier/libcairo_native_runtime.a`. | ||
function copy_cairo_native_lib() { | ||
SEQUENCER_DIR="$1" | ||
# Set TARGET_LIB_DIR as first argument, or by default the pwd. | ||
echo "Copying cairo native runtime library to blockifier crate" | ||
echo "SEQUENCER_DIR: ${SEQUENCER_DIR}" | ||
set -x | ||
cp /cairo_native/libcairo_native_runtime.a "${SEQUENCER_DIR}/crates/blockifier/libcairo_native_runtime.a" | ||
{ set +x; } 2>/dev/null | ||
} | ||
|
||
copy_cairo_native_lib "${SEQUENCER_DIR}" | ||
|
||
# Run the passed in command using remaining arguments | ||
$remaining_args |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters