From 585eebf92a9944241c59bdd018680efacbed09c9 Mon Sep 17 00:00:00 2001 From: Ivan Shumkov Date: Fri, 22 Nov 2024 16:43:13 +0700 Subject: [PATCH 1/9] ci: switch release workflow to github runners --- .github/workflows/release-docker-image.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release-docker-image.yml b/.github/workflows/release-docker-image.yml index 54e4cb465a3..8a2e2f4dc72 100644 --- a/.github/workflows/release-docker-image.yml +++ b/.github/workflows/release-docker-image.yml @@ -37,9 +37,9 @@ jobs: strategy: matrix: include: - - runner: ["self-hosted", "linux", "x64", "ubuntu-platform"] + - runner: ubuntu-24.04 platform: linux/amd64 - - runner: ["self-hosted", "linux", "arm64", "ubuntu-platform"] + - runner: macos-14 platform: linux/arm64 steps: - name: Check out repo @@ -134,6 +134,7 @@ jobs: with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} + - name: Create manifest list and push working-directory: ${{ env.DIGEST_DIR_PATH }} run: | From dcf1b9785db6e42c78ce655601d37f07d83cd8ed Mon Sep 17 00:00:00 2001 From: Ivan Shumkov Date: Fri, 22 Nov 2024 17:20:36 +0700 Subject: [PATCH 2/9] ci: switch to ubuntu-24.04 + QEMU --- .github/workflows/release-docker-image.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release-docker-image.yml b/.github/workflows/release-docker-image.yml index 8a2e2f4dc72..bde2cafabb4 100644 --- a/.github/workflows/release-docker-image.yml +++ b/.github/workflows/release-docker-image.yml @@ -39,7 +39,7 @@ jobs: include: - runner: ubuntu-24.04 platform: linux/amd64 - - runner: macos-14 + - runner: ubuntu-24.04 platform: linux/arm64 steps: - name: Check out repo @@ -54,6 +54,10 @@ jobs: aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} aws-region: ${{ secrets.AWS_REGION }} + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + if: ${{ matrix.platform == 'linux/arm64' }} + - name: Build and push by digest uses: ./.github/actions/docker id: docker_build From 655e5fb171bef54cc0f6d0400e6a6d1e1974dc4f Mon Sep 17 00:00:00 2001 From: Ivan Shumkov Date: Fri, 22 Nov 2024 18:20:18 +0700 Subject: [PATCH 3/9] build: pass ``--release` to cook --- Dockerfile | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index cdd72119184..431ec44a114 100644 --- a/Dockerfile +++ b/Dockerfile @@ -318,10 +318,7 @@ COPY --parents \ packages/check-features \ /platform/ -RUN if [[ "${CARGO_BUILD_PROFILE}" == "release" ]] ; then \ - export RELEASE="--release" ; \ - fi && \ - source $HOME/.cargo/env && \ +RUN source $HOME/.cargo/env && \ source /root/env && \ cargo chef prepare $RELEASE --recipe-path recipe.json @@ -344,6 +341,7 @@ RUN --mount=type=cache,sharing=shared,id=cargo_registry_index,target=${CARGO_HOM set -ex; \ if [[ "${CARGO_BUILD_PROFILE}" == "release" ]] ; then \ mv .cargo/config-release.toml .cargo/config.toml; \ + export RELEASE="--release" ; \ else \ export FEATURES_FLAG="--features=console,grovedbg" ; \ fi && \ @@ -353,6 +351,7 @@ RUN --mount=type=cache,sharing=shared,id=cargo_registry_index,target=${CARGO_HOM --recipe-path recipe.json \ --profile "$CARGO_BUILD_PROFILE" \ --package drive-abci \ + ${RELEASE} \ ${FEATURES_FLAG} \ --locked && \ if [[ -x /usr/bin/sccache ]]; then sccache --show-stats; fi From 751fda0f59bcbda5e6ef3f3e6ee2abe20cc28ad5 Mon Sep 17 00:00:00 2001 From: Ivan Shumkov Date: Fri, 22 Nov 2024 18:27:42 +0700 Subject: [PATCH 4/9] build: no need for ``--release` --- Dockerfile | 2 -- 1 file changed, 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 431ec44a114..09817e583b1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -341,7 +341,6 @@ RUN --mount=type=cache,sharing=shared,id=cargo_registry_index,target=${CARGO_HOM set -ex; \ if [[ "${CARGO_BUILD_PROFILE}" == "release" ]] ; then \ mv .cargo/config-release.toml .cargo/config.toml; \ - export RELEASE="--release" ; \ else \ export FEATURES_FLAG="--features=console,grovedbg" ; \ fi && \ @@ -351,7 +350,6 @@ RUN --mount=type=cache,sharing=shared,id=cargo_registry_index,target=${CARGO_HOM --recipe-path recipe.json \ --profile "$CARGO_BUILD_PROFILE" \ --package drive-abci \ - ${RELEASE} \ ${FEATURES_FLAG} \ --locked && \ if [[ -x /usr/bin/sccache ]]; then sccache --show-stats; fi From f6c3b9039008c4a9ecd2c752ffe1df48a34523cf Mon Sep 17 00:00:00 2001 From: Ivan Shumkov Date: Fri, 22 Nov 2024 19:19:32 +0700 Subject: [PATCH 5/9] build: copy .cargo --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 09817e583b1..047592a2e47 100644 --- a/Dockerfile +++ b/Dockerfile @@ -332,7 +332,7 @@ SHELL ["/bin/bash", "-o", "pipefail","-e", "-x", "-c"] WORKDIR /platform -COPY --from=build-planner /platform/recipe.json /platform/.cargo /platform/ +COPY --from=build-planner --parents /platform/recipe.json /platform/.cargo /platform/ # Build dependencies - this is the caching Docker layer! RUN --mount=type=cache,sharing=shared,id=cargo_registry_index,target=${CARGO_HOME}/registry/index \ @@ -424,7 +424,7 @@ FROM deps AS build-js WORKDIR /platform -COPY --from=build-planner /platform/recipe.json recipe.json +COPY --from=build-planner --parents /platform/recipe.json recipe.json # Build dependencies - this is the caching Docker layer! RUN --mount=type=cache,sharing=shared,id=cargo_registry_index,target=${CARGO_HOME}/registry/index \ From 9ab1452ad192e9e600893ca87b40234513c4c70c Mon Sep 17 00:00:00 2001 From: Ivan Shumkov Date: Fri, 22 Nov 2024 19:42:24 +0700 Subject: [PATCH 6/9] build: fix .cargo copy --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 047592a2e47..b10664e8cc9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -332,7 +332,7 @@ SHELL ["/bin/bash", "-o", "pipefail","-e", "-x", "-c"] WORKDIR /platform -COPY --from=build-planner --parents /platform/recipe.json /platform/.cargo /platform/ +COPY --from=build-planner --parents /platform/recipe.json /platform/.cargo / # Build dependencies - this is the caching Docker layer! RUN --mount=type=cache,sharing=shared,id=cargo_registry_index,target=${CARGO_HOME}/registry/index \ @@ -424,7 +424,7 @@ FROM deps AS build-js WORKDIR /platform -COPY --from=build-planner --parents /platform/recipe.json recipe.json +COPY --from=build-planner /platform/recipe.json recipe.json # Build dependencies - this is the caching Docker layer! RUN --mount=type=cache,sharing=shared,id=cargo_registry_index,target=${CARGO_HOME}/registry/index \ From 5298a3b805e60b009c1e873ff54845250bd1064e Mon Sep 17 00:00:00 2001 From: Ivan Shumkov Date: Fri, 22 Nov 2024 20:20:35 +0700 Subject: [PATCH 7/9] ci: increase timeout --- .github/workflows/release-docker-image.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release-docker-image.yml b/.github/workflows/release-docker-image.yml index bde2cafabb4..101720c00df 100644 --- a/.github/workflows/release-docker-image.yml +++ b/.github/workflows/release-docker-image.yml @@ -33,7 +33,7 @@ jobs: build-image: name: Build ${{ matrix.platform }} image runs-on: ${{ matrix.runner }} - timeout-minutes: 25 + timeout-minutes: 45 strategy: matrix: include: From e508fdc8bb449206a752586d2352bee86f13321c Mon Sep 17 00:00:00 2001 From: Ivan Shumkov Date: Fri, 22 Nov 2024 22:52:55 +0700 Subject: [PATCH 8/9] ci: increase timeout --- .github/workflows/release-docker-image.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release-docker-image.yml b/.github/workflows/release-docker-image.yml index 101720c00df..7dac7c11ec2 100644 --- a/.github/workflows/release-docker-image.yml +++ b/.github/workflows/release-docker-image.yml @@ -33,7 +33,7 @@ jobs: build-image: name: Build ${{ matrix.platform }} image runs-on: ${{ matrix.runner }} - timeout-minutes: 45 + timeout-minutes: 120 strategy: matrix: include: From 40564d15339aea7856a9dad7ffca46723da74195 Mon Sep 17 00:00:00 2001 From: Ivan Shumkov Date: Mon, 25 Nov 2024 14:00:53 +0700 Subject: [PATCH 9/9] ci: increase timeout to 3h --- .github/workflows/release-docker-image.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release-docker-image.yml b/.github/workflows/release-docker-image.yml index 7dac7c11ec2..425b8a5f449 100644 --- a/.github/workflows/release-docker-image.yml +++ b/.github/workflows/release-docker-image.yml @@ -33,7 +33,7 @@ jobs: build-image: name: Build ${{ matrix.platform }} image runs-on: ${{ matrix.runner }} - timeout-minutes: 120 + timeout-minutes: 180 strategy: matrix: include: