Skip to content

Commit

Permalink
feat: dependencies.sh script for dev onboarding (#1116)
Browse files Browse the repository at this point in the history
* feat: dependencies.sh script for dev onboarding

Co-Authored-By: alon.dotan <[email protected]>
  • Loading branch information
1 parent 618fafe commit 7427d48
Show file tree
Hide file tree
Showing 12 changed files with 16 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .github/actions/setup_native_deps/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ runs:
id: set-runtime-deps
shell: bash
run: |
sudo ./scripts/setup_native_deps.sh
sudo ./scripts/dependencies.sh
1 change: 1 addition & 0 deletions .github/workflows/blockifier_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ on:
- 'crates/blockifier/**'
- 'crates/native_blockifier/**'
- 'scripts/build_native_blockifier.sh'
- 'scripts/dependencies.sh'
- 'scripts/install_build_tools.sh'
- 'scripts/sequencer-ci.Dockerfile'

Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/blockifier_compiled_cairo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ on:
- 'crates/blockifier/src/test_utils/cairo_compile.rs'
- 'crates/blockifier/tests/feature_contracts_compatibility_test.rs'
- 'crates/blockifier/tests/requirements.txt'
- 'scripts/dependencies.sh'
pull_request:
types:
- opened
Expand All @@ -24,6 +25,7 @@ on:
- 'crates/blockifier/src/test_utils/cairo_compile.rs'
- 'crates/blockifier/tests/feature_contracts_compatibility_test.rs'
- 'crates/blockifier/tests/requirements.txt'
- 'scripts/dependencies.sh'

# On PR events, cancel existing CI runs on this same PR for this workflow.
concurrency:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/blockifier_post-merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ on:
- '.github/workflows/blockifier_post-merge.yml'
- 'crates/blockifier/**'
- 'crates/native_blockifier/**'
- 'scripts/dependencies.sh'

jobs:
if_merged:
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/committer_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ on:
- 'crates/starknet_api/**'
- 'crates/starknet_committer/**'
- 'crates/starknet_patricia/**'
- 'scripts/dependencies.sh'

pull_request:
types:
Expand All @@ -31,6 +32,7 @@ on:
- 'crates/starknet_api/**'
- 'crates/starknet_committer/**'
- 'crates/starknet_patricia/**'
- 'scripts/dependencies.sh'

# On PR events, cancel existing CI runs on this same PR for this workflow.
concurrency:
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/merge_paths_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ on:
- v[0-9].**
paths:
- '.github/workflows/merge_paths_ci.yml'
- 'scripts/dependencies.sh'
- 'scripts/merge_branches.py'
- 'scripts/merge_paths.json'
- 'scripts/merge_paths_test.py'
Expand All @@ -23,6 +24,7 @@ on:
- edited
paths:
- '.github/workflows/merge_paths_ci.yml'
- 'scripts/dependencies.sh'
- 'scripts/merge_branches.py'
- 'scripts/merge_paths.json'
- 'scripts/merge_paths_test.py'
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/papyrus_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ on:
- 'crates/papyrus**/**'
- 'crates/sequencing/**'
- 'crates/starknet_client/**'
- 'scripts/dependencies.sh'

pull_request:
types:
Expand All @@ -29,6 +30,7 @@ on:
- 'crates/papyrus**/**'
- 'crates/sequencing/**'
- 'crates/starknet_client/**'
- 'scripts/dependencies.sh'

merge_group:
types: [ checks_requested ]
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/papyrus_docker-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,13 @@ on:
paths:
- '.github/workflows/papyrus_docker-publish.yml'
- 'crates/papyrus**/**'
- 'scripts/dependencies.sh'

pull_request:
paths:
- '.github/workflows/papyrus_docker-publish.yml'
- 'crates/papyrus**/**'
- 'scripts/dependencies.sh'

# On PR events, cancel existing CI runs on this same PR for this workflow.
concurrency:
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ FROM ubuntu:22.04 AS base
WORKDIR /app

COPY scripts/install_build_tools.sh .
COPY scripts/setup_native_deps.sh .
COPY scripts/dependencies.sh .
RUN apt update && apt -y install curl bzip2


Expand Down
5 changes: 0 additions & 5 deletions scripts/setup_native_deps.sh → scripts/dependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,6 @@ function setup_llvm_deps() {
Darwin)
brew update
brew install llvm@18

export LIBRARY_PATH=/opt/homebrew/lib
export MLIR_SYS_180_PREFIX="$(brew --prefix llvm@18)"
export LLVM_SYS_181_PREFIX="$MLIR_SYS_180_PREFIX"
export TABLEGEN_180_PREFIX="$MLIR_SYS_180_PREFIX"
;;
Linux)
$SUDO bash -c 'curl https://apt.llvm.org/llvm.sh -Lo llvm.sh
Expand Down
2 changes: 1 addition & 1 deletion scripts/install_build_tools.sh
Original file line number Diff line number Diff line change
Expand Up @@ -52,4 +52,4 @@ install_common_packages
install_pypy &
install_rust &
wait
./setup_native_deps.sh
./dependencies.sh
2 changes: 1 addition & 1 deletion scripts/sequencer-ci.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@ ENV CARGO_HOME=${RUSTUP_HOME}
ENV PATH=$PATH:${RUSTUP_HOME}/bin

COPY install_build_tools.sh .
COPY setup_native_deps.sh .
COPY dependencies.sh .

RUN ./install_build_tools.sh

0 comments on commit 7427d48

Please sign in to comment.