This repository has been archived by the owner on Aug 21, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 107
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: publish native blockifier artifacts via CI (#2001)
* chore: publish native blockifier artifacts via CI Signed-off-by: Dori Medini <[email protected]> * chore: build_native_blockifier.sh to allow local builds Co-Authored-By: alon.dotan <[email protected]>
- Loading branch information
1 parent
7f08fad
commit 98012e6
Showing
7 changed files
with
124 additions
and
2 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,2 @@ | ||
# Export the built artifact to allow local builds. | ||
exports_files(["target/release/libnative_blockifier.so"]) |
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,14 @@ | ||
FROM ubuntu:20.04 | ||
|
||
RUN apt update && apt -y install \ | ||
build-essential \ | ||
clang \ | ||
curl \ | ||
python3-dev | ||
|
||
ENV RUSTUP_HOME=/opt/rust | ||
ENV CARGO_HOME=/opt/rust | ||
ENV PATH=$PATH:/opt/rust/bin | ||
|
||
COPY scripts/install_build_tools.sh . | ||
RUN bash install_build_tools.sh |
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,16 @@ | ||
#!/bin/env bash | ||
set -e | ||
|
||
docker_image_name=blockifier-ci | ||
docker build . -t ${docker_image_name} | ||
|
||
docker run \ | ||
--rm \ | ||
--net host \ | ||
-e CARGO_HOME=${HOME}/.cargo \ | ||
-u $UID \ | ||
-v /tmp:/tmp \ | ||
-v "${HOME}:${HOME}" \ | ||
--workdir ${PWD} \ | ||
${docker_image_name} \ | ||
cargo build --release -p native_blockifier --features "testing" |
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,36 @@ | ||
#!/bin/env bash | ||
|
||
set -e | ||
|
||
function install_pypy() { | ||
pushd /opt | ||
$USE_SUDO bash -c ' | ||
curl -Lo pypy3.9-v7.3.11-linux64.tar.bz2 https://downloads.python.org/pypy/pypy3.9-v7.3.11-linux64.tar.bz2 | ||
tar -xf pypy3.9-v7.3.11-linux64.tar.bz2 | ||
rm pypy3.9-v7.3.11-linux64.tar.bz2 | ||
chmod +x pypy3.9-v7.3.11-linux64/bin/pypy3 | ||
if [ -L /usr/local/bin/pypy3.9 ]; then | ||
unlink /usr/local/bin/pypy3.9 | ||
fi | ||
ln -s /opt/pypy3.9-v7.3.11-linux64/bin/pypy3 /usr/local/bin/pypy3.9 | ||
if [ -L /opt/pypy3.9 ]; then | ||
unlink /opt/pypy3.9 | ||
fi | ||
ln -s /opt/pypy3.9-v7.3.11-linux64 /opt/pypy3.9 | ||
pypy3.9 -m ensurepip | ||
pypy3.9 -m pip install wheel | ||
' | ||
popd | ||
} | ||
|
||
function install_rust () { | ||
curl https://sh.rustup.rs -sSf | sh -s -- -y --no-modify-path | ||
} | ||
|
||
install_pypy & | ||
install_rust & | ||
wait |