diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2de28c23d15..1afb539d0d9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -2,11 +2,6 @@ name: CI on: pull_request: - paths-ignore: - - ".github/workflows/zk-environment.publish.yml" - - "docker/zk-environment/Dockerfile" - - "docker/zk-environment-cuda-12-0/Dockerfile" - - "docker/zk-rust-nightly-environment/Dockerfile" merge_group: push: branches: @@ -46,6 +41,9 @@ jobs: all: - '!core/**' - '!prover/**' + - '!.github/workflows/zk-environment.publish.yml' + - '!docker/zk-environment/Dockerfile' + - '!docker/zk-environment-cuda-12-0/Dockerfile' ci-for-core: name: CI for Core Components needs: changed_files diff --git a/.github/workflows/zk-environment.publish.yml b/.github/workflows/zk-environment.publish.yml index 2fb5c1d8813..b733fab9b17 100644 --- a/.github/workflows/zk-environment.publish.yml +++ b/.github/workflows/zk-environment.publish.yml @@ -10,8 +10,6 @@ on: - ".github/workflows/zk-environment.publish.yml" - "docker/zk-environment-cuda-12-0/Dockerfile" - ".github/workflows/zk-environment-cuda-12-0.publish.yml" - - "docker/zk-rust-nightly-environment/Dockerfile" - - ".github/workflows/rust-nightly-environment.publish.yml" workflow_dispatch: branches: - "main" @@ -22,7 +20,6 @@ jobs: outputs: zk_environment: ${{ steps.changed-files-yaml.outputs.zk_env_any_changed }} zk_environment_cuda_12: ${{ steps.changed-files-yaml.outputs.zk_env_cuda_12_any_changed }} - rust_nightly: ${{ steps.changed-files-yaml.outputs.rust_nightly_any_changed }} runs-on: ubuntu-latest steps: - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3 @@ -40,9 +37,6 @@ jobs: zk_env_cuda_12: - docker/zk-environment-cuda-12-0/Dockerfile - .github/workflows/zk-environment-cuda-12-0.publish.yml - rust_nightly: - - docker/zk-rust-nightly-environment/Dockerfile - - .github/workflows/rust-nightly-environment.publish.yml zk_environment: if: needs.changed_files.outputs.zk_environment == 'true' && github.event.pull_request.merged == true || github.event_name == 'workflow_dispatch' @@ -85,7 +79,7 @@ jobs: no-cache: true rust_nightly: - if: needs.changed_files.outputs.rust_nightly == 'true' && github.event.pull_request.merged == true || github.event_name == 'workflow_dispatch' + if: needs.changed_files.outputs.zk_environment == 'true' && github.event.pull_request.merged == true || github.event_name == 'workflow_dispatch' name: Push rust nightly docker image to Docker Hub needs: changed_files runs-on: ubuntu-latest @@ -108,8 +102,9 @@ jobs: with: context: . push: true + target: rust-nightly tags: "matterlabs/zksync_rust:nightly" - file: docker/zk-rust-nightly-environment/Dockerfile + file: docker/zk-environment/Dockerfile no-cache: true diff --git a/docker/zk-environment/Dockerfile b/docker/zk-environment/Dockerfile index 573d42b79ea..c9871f98afb 100644 --- a/docker/zk-environment/Dockerfile +++ b/docker/zk-environment/Dockerfile @@ -193,3 +193,8 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ && rm -rf /var/lib/apt/lists/* ENV LIBRARY_PATH /usr/local/cuda/lib64/stubs + + +FROM base as rust-nightly + +RUN rustup default nightly-2023-07-21 diff --git a/docker/zk-rust-nightly-environment/Dockerfile b/docker/zk-rust-nightly-environment/Dockerfile deleted file mode 100644 index db3c8515c36..00000000000 --- a/docker/zk-rust-nightly-environment/Dockerfile +++ /dev/null @@ -1,19 +0,0 @@ -FROM debian:bookworm-slim - -ARG DEBIAN_FRONTEND=noninteractive - -RUN apt update && apt install git curl clang openssl libssl-dev gcc g++ pkg-config build-essential libclang-dev -y - -ENV RUSTUP_HOME=/usr/local/rustup \ - CARGO_HOME=/usr/local/cargo \ - PATH=/usr/local/cargo/bin:$PATH - -# Setup rust nightly -RUN curl https://sh.rustup.rs -sSf | bash -s -- -y && \ - rustup install nightly-2023-07-21 && \ - rustup default nightly-2023-07-21 - -# Setup cmake -RUN curl -Lo cmake-3.24.2-linux-x86_64.sh https://github.com/Kitware/CMake/releases/download/v3.24.2/cmake-3.24.2-linux-x86_64.sh && \ - chmod +x cmake-3.24.2-linux-x86_64.sh && \ - ./cmake-3.24.2-linux-x86_64.sh --skip-license --prefix=/usr/local