Skip to content

Commit

Permalink
Fix CI sync runs (#2659)
Browse files Browse the repository at this point in the history
* Fix CI sync runs

* Abstract user level installs out

* Fix ci_setup_deps_target

* Remove unused
  • Loading branch information
prasannavl authored Nov 2, 2023
1 parent db3ef97 commit 538abe7
Show file tree
Hide file tree
Showing 10 changed files with 28 additions and 28 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ jobs:
- name: Setup dependencies
run: ./make.sh ci-setup-deps

- name: Setup dependencies for target
run: ./make.sh ci-setup-deps-target
- name: Setup dependencies for user
run: ./make.sh ci-setup-user-deps

- uses: Swatinem/rust-cache@v2
with:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/tests-ethlibs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ jobs:
- name: Setup dependencies
run: ./make.sh ci-setup-deps

- name: Setup dependencies for target
run: ./make.sh ci-setup-deps-target
- name: Setup dependencies for user
run: ./make.sh ci-setup-user-deps

- uses: Swatinem/rust-cache@v2
with:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/tests-frontier.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ jobs:
- name: Setup dependencies
run: sudo ./make.sh ci-setup-deps

- name: Setup dependencies for target
run: ./make.sh ci-setup-deps-target
- name: Setup dependencies for user
run: ./make.sh ci-setup-user-deps

- uses: Swatinem/rust-cache@v2
with:
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/tests-sync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ on:
workflow_dispatch:
inputs:
block_ranges:
description: 'Optionally restrict to specific block ranges. Should be
formatted as multiple start block, such as "350000 50000 750000".
Defaults to all block ranges'
description: 'Block ranges: Format: "<start-block-1> <start-block-2>"
Eg: "350000 50000 750000".
Default: All available ranges when empty'
required: false
name:
description: 'Workflow run custom name'
description: 'Custom name for the workflow run'
required: false
pull_request:
branches:
Expand Down Expand Up @@ -36,8 +36,8 @@ jobs:
- name: Setup dependencies
run: sudo ./make.sh ci-setup-deps

- name: Setup dependencies for target
run: ./make.sh ci-setup-deps-target
- name: Setup dependencies for user
run: ./make.sh ci-setup-user-deps

- uses: Swatinem/rust-cache@v2
with:
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ jobs:
- name: Install dependencies
run: ./make.sh ci-setup-deps

- name: Install dependencies for target
run: ./make.sh ci-setup-deps-target
- name: Setup dependencies for user
run: ./make.sh ci-setup-user-deps

- uses: Swatinem/rust-cache@v2
with:
Expand Down Expand Up @@ -71,9 +71,9 @@ jobs:

- name: Setup dependencies
run: ./make.sh ci-setup-deps

- name: Setup dependencies for target
run: ./make.sh ci-setup-deps-target
- name: Setup dependencies for user
run: ./make.sh ci-setup-user-deps

- uses: Swatinem/rust-cache@v2
with:
Expand Down
2 changes: 1 addition & 1 deletion contrib/dockerfiles/draft/aarch64-linux-gnu.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ COPY ./make.sh .

ENV PATH=/root/.cargo/bin:$PATH
RUN ./make.sh ci-setup-deps
RUN ./make.sh ci-setup-deps-target
RUN ./make.sh ci-setup-user-deps

COPY . .
RUN ./make.sh build-deps
Expand Down
2 changes: 1 addition & 1 deletion contrib/dockerfiles/draft/arm-linux-gnueabihf.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ COPY ./make.sh .

ENV PATH=/root/.cargo/bin:$PATH
RUN ./make.sh ci-setup-deps
RUN ./make.sh ci-setup-deps-target
RUN ./make.sh ci-setup-user-deps

COPY . .
RUN ./make.sh build-deps
Expand Down
2 changes: 1 addition & 1 deletion contrib/dockerfiles/noarch.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ COPY ./make.sh .

ENV PATH=/root/.cargo/bin:$PATH
RUN ./make.sh ci-setup-deps
RUN ./make.sh ci-setup-deps-target
RUN ./make.sh ci-setup-user-deps

COPY . .
RUN ./make.sh build-deps
Expand Down
2 changes: 1 addition & 1 deletion contrib/dockerfiles/x86_64-pc-linux-gnu.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ COPY ./make.sh .

ENV PATH=/root/.cargo/bin:$PATH
RUN ./make.sh ci-setup-deps
RUN ./make.sh ci-setup-deps-target
RUN ./make.sh ci-setup-user-deps

COPY . .
RUN ./make.sh build-deps
Expand Down
14 changes: 7 additions & 7 deletions make.sh
Original file line number Diff line number Diff line change
Expand Up @@ -719,7 +719,7 @@ pkg_install_llvm() {
_fold_end
}

pkg_install_rust() {
pkg_user_install_rust() {
_fold_start "pkg-install-rust"
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- \
--default-toolchain="${RUST_DEFAULT_VERSION}" -y
Expand Down Expand Up @@ -782,7 +782,7 @@ clean_pkg_local_py_deps() {
_safe_rm_rf "${python_venv}"
}

pkg_setup_rust() {
pkg_user_setup_rust() {
local rust_target
# shellcheck disable=SC2119
rust_target=$(get_rust_triplet)
Expand Down Expand Up @@ -1111,10 +1111,10 @@ ci_setup_deps() {
DEBIAN_FRONTEND=noninteractive pkg_install_deps
DEBIAN_FRONTEND=noninteractive pkg_setup_locale
DEBIAN_FRONTEND=noninteractive pkg_install_llvm
DEBIAN_FRONTEND=noninteractive pkg_install_rust
ci_setup_deps_target
}

_ci_setup_deps_target() {
ci_setup_deps_target() {
local target=${TARGET}
case $target in
# Nothing to do on host
Expand All @@ -1134,9 +1134,9 @@ _ci_setup_deps_target() {
esac
}

ci_setup_deps_target() {
_ci_setup_deps_target
pkg_setup_rust
ci_setup_user_deps() {
pkg_user_install_rust
pkg_user_setup_rust
}

# Public helpers
Expand Down

0 comments on commit 538abe7

Please sign in to comment.