Skip to content

Commit

Permalink
Merge pull request #3 from matter-labs/fix-workflows
Browse files Browse the repository at this point in the history
fix: checkout action
  • Loading branch information
StanislavBreadless authored Nov 12, 2024
2 parents 7109821 + e18017c commit 0e1eec5
Show file tree
Hide file tree
Showing 19 changed files with 111 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/build-contract-verifier-template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ on:
DOCKERHUB_TOKEN:
description: "DOCKERHUB_TOKEN"
required: true
ZKSYNC_ADMIN_BOT_ORG_REPO_WRITE:
description: "Token which will be provided to checkout action to be able to clone private submodules"
required: true
inputs:
image_tag_suffix:
description: "Optional suffix to override tag name generation"
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/build-core-template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ on:
DOCKERHUB_TOKEN:
description: "DOCKERHUB_TOKEN"
required: true
ZKSYNC_ADMIN_BOT_ORG_REPO_WRITE:
description: "Token which will be provided to checkout action to be able to clone private submodules"
required: true
inputs:
image_tag_suffix:
description: "Optional suffix to override tag name generation"
Expand Down Expand Up @@ -182,6 +185,8 @@ jobs:
IMAGE_TAG_SUFFIX: ${{ inputs.image_tag_suffix }}${{ (inputs.en_alpha_release && matrix.component.name == 'external-node') && '-alpha' || '' }}
steps:
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4
with:
token: ${{ secrets.ZKSYNC_ADMIN_BOT_ORG_REPO_WRITE }}

- name: login to Docker registries
run: |
Expand Down
17 changes: 17 additions & 0 deletions .github/workflows/build-docker-from-tag.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
name: Build Image from tag
on:
workflow_call:
secrets:
ZKSYNC_ADMIN_BOT_ORG_REPO_WRITE:
description: "Token which will be provided to checkout action to be able to clone private submodules"
required: true
inputs:
tag_name:
description: "Tag of an image to built"
Expand All @@ -12,6 +16,10 @@ on:
description: "Tag of an image to built"
type: string
required: true
secrets:
ZKSYNC_ADMIN_BOT_ORG_REPO_WRITE:
description: "Token which will be provided to checkout action to be able to clone private submodules"
required: true
push:
tags:
- core-v**
Expand All @@ -29,6 +37,8 @@ jobs:
prover_fri_gpu_key_id: ${{ steps.extract-prover-fri-setup-key-ids.outputs.gpu_short_commit_sha }}
steps:
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4
with:
token: ${{ secrets.ZKSYNC_ADMIN_BOT_ORG_REPO_WRITE }}
- name: Generate output with git tag
id: set
run: |
Expand All @@ -54,6 +64,7 @@ jobs:
secrets:
DOCKERHUB_USER: ${{ secrets.DOCKERHUB_USER }}
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}
ZKSYNC_ADMIN_BOT_ORG_REPO_WRITE: ${{ secrets.ZKSYNC_ADMIN_BOT_ORG_REPO_WRITE }}
with:
image_tag_suffix: ${{ needs.setup.outputs.image_tag_suffix }}
en_alpha_release: true
Expand All @@ -67,6 +78,7 @@ jobs:
DOCKERHUB_USER: ${{ secrets.DOCKERHUB_USER }}
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}
ATTIC_TOKEN: ${{ secrets.ATTIC_TOKEN }}
ZKSYNC_ADMIN_BOT_ORG_REPO_WRITE: ${{ secrets.ZKSYNC_ADMIN_BOT_ORG_REPO_WRITE }}
with:
image_tag_suffix: ${{ needs.setup.outputs.image_tag_suffix }}

Expand All @@ -78,6 +90,7 @@ jobs:
secrets:
DOCKERHUB_USER: ${{ secrets.DOCKERHUB_USER }}
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}
ZKSYNC_ADMIN_BOT_ORG_REPO_WRITE: ${{ secrets.ZKSYNC_ADMIN_BOT_ORG_REPO_WRITE }}
with:
image_tag_suffix: ${{ needs.setup.outputs.image_tag_suffix }}

Expand All @@ -93,6 +106,7 @@ jobs:
secrets:
DOCKERHUB_USER: ${{ secrets.DOCKERHUB_USER }}
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}
ZKSYNC_ADMIN_BOT_ORG_REPO_WRITE: ${{ secrets.ZKSYNC_ADMIN_BOT_ORG_REPO_WRITE }}

build-push-witness-generator-image-avx512:
name: Build and push image
Expand All @@ -107,6 +121,7 @@ jobs:
secrets:
DOCKERHUB_USER: ${{ secrets.DOCKERHUB_USER }}
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}
ZKSYNC_ADMIN_BOT_ORG_REPO_WRITE: ${{ secrets.ZKSYNC_ADMIN_BOT_ORG_REPO_WRITE }}

build-gar-prover-fri-gpu-and-circuit-prover-gpu-gar:
name: Build GAR prover FRI GPU
Expand All @@ -117,3 +132,5 @@ jobs:
setup_keys_id: ${{ needs.setup.outputs.prover_fri_gpu_key_id }}
image_tag_suffix: ${{ needs.setup.outputs.image_tag_suffix }}
protocol_version: ${{ needs.build-push-prover-images.outputs.protocol_version }}
secrets:
ZKSYNC_ADMIN_BOT_ORG_REPO_WRITE: ${{ secrets.ZKSYNC_ADMIN_BOT_ORG_REPO_WRITE }}
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ name: Build Prover FRI GPU & Circuit Prover GPU with builtin setup data

on:
workflow_call:
secrets:
ZKSYNC_ADMIN_BOT_ORG_REPO_WRITE:
description: "Token which will be provided to checkout action to be able to clone private submodules"
required: true
inputs:
image_tag_suffix:
description: "Commit sha or git tag for Docker tag"
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/build-prover-template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ on:
DOCKERHUB_TOKEN:
description: "DOCKERHUB_TOKEN"
required: true
ZKSYNC_ADMIN_BOT_ORG_REPO_WRITE:
description: "Token which will be provided to checkout action to be able to clone private submodules"
required: true
inputs:
ERA_BELLMAN_CUDA_RELEASE:
description: "ERA_BELLMAN_CUDA_RELEASE"
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/build-tee-prover-template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ on:
ATTIC_TOKEN:
description: "ATTIC_TOKEN"
required: false
ZKSYNC_ADMIN_BOT_ORG_REPO_WRITE:
description: "Token which will be provided to checkout action to be able to clone private submodules"
required: true
inputs:
image_tag_suffix:
description: "Optional suffix to override tag name generation"
Expand All @@ -32,9 +35,12 @@ jobs:
if: ${{ github.event_name == 'workflow_dispatch' }}
with:
ref: ${{ github.event.inputs.target_branch }}
token: ${{ secrets.ZKSYNC_ADMIN_BOT_ORG_REPO_WRITE }}

- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4
if: ${{ github.event_name != 'workflow_dispatch' }}
with:
token: ${{ secrets.ZKSYNC_ADMIN_BOT_ORG_REPO_WRITE }}

- uses: cachix/install-nix-action@ba0dd844c9180cbf77aa72a116d6fbc515d0e87b # v27
with:
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/build-witness-generator-template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ on:
DOCKERHUB_TOKEN:
description: "DOCKERHUB_TOKEN"
required: true
ZKSYNC_ADMIN_BOT_ORG_REPO_WRITE:
description: "Token which will be provided to checkout action to be able to clone private submodules"
required: true
inputs:
ERA_BELLMAN_CUDA_RELEASE:
description: "ERA_BELLMAN_CUDA_RELEASE"
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/ci-common-reusable.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
name: Workflow template for CI jobs to be ran on both Prover and Core Components
on:
workflow_call:
secrets:
ZKSYNC_ADMIN_BOT_ORG_REPO_WRITE:
description: "Token which will be provided to checkout action to be able to clone private submodules"
required: true

jobs:
build:
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/ci-core-lint-reusable.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
name: Workflow template for Core Linting CI jobs
on:
workflow_call:
secrets:
ZKSYNC_ADMIN_BOT_ORG_REPO_WRITE:
description: "Token which will be provided to checkout action to be able to clone private submodules"
required: true

jobs:
code_lint:
Expand Down
7 changes: 7 additions & 0 deletions .github/workflows/ci-core-reusable.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
name: Workflow template for CI jobs for Core Components
on:
workflow_call:
secrets:
ZKSYNC_ADMIN_BOT_ORG_REPO_WRITE:
description: "Token which will be provided to checkout action to be able to clone private submodules"
required: true
inputs:
compilers:
description: "JSON of required compilers and their versions"
Expand All @@ -16,6 +20,8 @@ jobs:
lint:
name: lint
uses: ./.github/workflows/ci-core-lint-reusable.yml
secrets:
ZKSYNC_ADMIN_BOT_ORG_REPO_WRITE: ${{ secrets.ZKSYNC_ADMIN_BOT_ORG_REPO_WRITE }}
unit-tests:
runs-on: [ matterlabs-ci-runner-highmem-long ]

Expand Down Expand Up @@ -95,6 +101,7 @@ jobs:
# steps:
# - uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4
# with:
# token: ${{ secrets.ZKSYNC_ADMIN_BOT_ORG_REPO_WRITE }}
# submodules: "recursive"
# fetch-depth: 0
#
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/ci-docs-reusable.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
name: Workflow template for CI jobs against docs
on:
workflow_call:
secrets:
ZKSYNC_ADMIN_BOT_ORG_REPO_WRITE:
description: "Token which will be provided to checkout action to be able to clone private submodules"
required: true

jobs:
lint:
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/ci-prover-e2e.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
name: Workflow for testing prover component end-to-end
on:
workflow_call:
secrets:
ZKSYNC_ADMIN_BOT_ORG_REPO_WRITE:
description: "Token which will be provided to checkout action to be able to clone private submodules"
required: true

jobs:
e2e-test:
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/ci-prover-reusable.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
name: Workflow template for CI jobs for Prover Components
on:
workflow_call:
secrets:
ZKSYNC_ADMIN_BOT_ORG_REPO_WRITE:
description: "Token which will be provided to checkout action to be able to clone private submodules"
required: true

jobs:
lint:
runs-on: [ matterlabs-ci-runner-highmem-long ]
Expand Down
18 changes: 18 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ jobs:
docs: ${{ steps.changed-files.outputs.docs_any_changed }}
all: ${{ steps.changed-files.outputs.all_any_changed }}
steps:

- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4
with:
token: ${{ secrets.ZKSYNC_ADMIN_BOT_ORG_REPO_WRITE }}
Expand Down Expand Up @@ -88,37 +89,49 @@ jobs:
needs: changed_files
if: contains(github.ref_name, 'release-please--branches')
uses: ./.github/workflows/ci-core-lint-reusable.yml
secrets:
ZKSYNC_ADMIN_BOT_ORG_REPO_WRITE: ${{ secrets.ZKSYNC_ADMIN_BOT_ORG_REPO_WRITE }}

ci-for-core:
name: CI for Core Components
needs: changed_files
if: ${{ (needs.changed_files.outputs.core == 'true' || needs.changed_files.outputs.zk_toolbox == 'true' || needs.changed_files.outputs.all == 'true') && !contains(github.ref_name, 'release-please--branches') }}
uses: ./.github/workflows/ci-core-reusable.yml
secrets:
ZKSYNC_ADMIN_BOT_ORG_REPO_WRITE: ${{ secrets.ZKSYNC_ADMIN_BOT_ORG_REPO_WRITE }}

ci-for-prover:
needs: changed_files
if: ${{ (needs.changed_files.outputs.prover == 'true' || needs.changed_files.outputs.all == 'true') && !contains(github.ref_name, 'release-please--branches') }}
name: CI for Prover Components
uses: ./.github/workflows/ci-prover-reusable.yml
secrets:
ZKSYNC_ADMIN_BOT_ORG_REPO_WRITE: ${{ secrets.ZKSYNC_ADMIN_BOT_ORG_REPO_WRITE }}

e2e-for-prover:
name: E2E Test for Prover Components
needs: changed_files
if: ${{(needs.changed_files.outputs.prover == 'true' || needs.changed_files.outputs.all == 'true') && !contains(github.ref_name, 'release-please--branches') }}
uses: ./.github/workflows/ci-prover-e2e.yml
secrets:
ZKSYNC_ADMIN_BOT_ORG_REPO_WRITE: ${{ secrets.ZKSYNC_ADMIN_BOT_ORG_REPO_WRITE }}

ci-for-docs:
needs: changed_files
if: needs.changed_files.outputs.docs == 'true'
name: CI for Docs
uses: ./.github/workflows/ci-docs-reusable.yml
secrets:
ZKSYNC_ADMIN_BOT_ORG_REPO_WRITE: ${{ secrets.ZKSYNC_ADMIN_BOT_ORG_REPO_WRITE }}

# What needs to be ran for both core and prover
ci-for-common:
needs: changed_files
if: ${{ (needs.changed_files.outputs.prover == 'true' || needs.changed_files.outputs.core == 'true' || needs.changed_files.outputs.all == 'true') && !contains(github.ref_name, 'release-please--branches') }}
name: CI for Common Components (prover or core)
uses: ./.github/workflows/ci-common-reusable.yml
secrets:
ZKSYNC_ADMIN_BOT_ORG_REPO_WRITE: ${{ secrets.ZKSYNC_ADMIN_BOT_ORG_REPO_WRITE }}

# build-core-images:
# name: Build core images
Expand All @@ -131,6 +144,7 @@ jobs:
# secrets:
# DOCKERHUB_USER: ${{ secrets.DOCKERHUB_USER }}
# DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}
# ZKSYNC_ADMIN_BOT_ORG_REPO_WRITE: ${{ secrets.ZKSYNC_ADMIN_BOT_ORG_REPO_WRITE }}

build-tee-prover-images:
name: Build TEE Prover images
Expand All @@ -144,6 +158,7 @@ jobs:
DOCKERHUB_USER: ${{ secrets.DOCKERHUB_USER }}
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}
ATTIC_TOKEN: ${{ secrets.ATTIC_TOKEN }}
ZKSYNC_ADMIN_BOT_ORG_REPO_WRITE: ${{ secrets.ZKSYNC_ADMIN_BOT_ORG_REPO_WRITE }}

build-contract-verifier:
name: Build contract verifier
Expand All @@ -156,6 +171,7 @@ jobs:
secrets:
DOCKERHUB_USER: ${{ secrets.DOCKERHUB_USER }}
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}
ZKSYNC_ADMIN_BOT_ORG_REPO_WRITE: ${{ secrets.ZKSYNC_ADMIN_BOT_ORG_REPO_WRITE }}

build-prover-images:
name: Build prover images
Expand All @@ -170,6 +186,7 @@ jobs:
secrets:
DOCKERHUB_USER: ${{ secrets.DOCKERHUB_USER }}
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}
ZKSYNC_ADMIN_BOT_ORG_REPO_WRITE: ${{ secrets.ZKSYNC_ADMIN_BOT_ORG_REPO_WRITE }}

build-witness-generator-image-avx512:
name: Build prover images with avx512 instructions
Expand All @@ -183,6 +200,7 @@ jobs:
secrets:
DOCKERHUB_USER: ${{ secrets.DOCKERHUB_USER }}
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}
ZKSYNC_ADMIN_BOT_ORG_REPO_WRITE: ${{ secrets.ZKSYNC_ADMIN_BOT_ORG_REPO_WRITE }}

ci-success:
name: Github Status Check
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/new-build-contract-verifier-template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ on:
DOCKERHUB_TOKEN:
description: "DOCKERHUB_TOKEN"
required: true
ZKSYNC_ADMIN_BOT_ORG_REPO_WRITE:
description: "Token which will be provided to checkout action to be able to clone private submodules"
required: true
inputs:
image_tag_suffix:
description: "Optional suffix to override tag name generation"
Expand Down Expand Up @@ -160,6 +163,7 @@ jobs:
# steps:
# - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
# with:
# token: ${{ secrets.ZKSYNC_ADMIN_BOT_ORG_REPO_WRITE }}
# submodules: "recursive"
#
# - name: Set up Docker Buildx
Expand Down Expand Up @@ -250,6 +254,8 @@ jobs:
# IMAGE_TAG_SUFFIX: ${{ inputs.image_tag_suffix }}
# steps:
# - uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4
# with:
# token: ${{ secrets.ZKSYNC_ADMIN_BOT_ORG_REPO_WRITE }}
#
# - name: login to Docker registries
# run: |
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/new-build-core-template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ on:
DOCKERHUB_TOKEN:
description: "DOCKERHUB_TOKEN"
required: true
ZKSYNC_ADMIN_BOT_ORG_REPO_WRITE:
description: "Token which will be provided to checkout action to be able to clone private submodules"
required: true
inputs:
image_tag_suffix:
description: "Optional suffix to override tag name generation"
Expand Down Expand Up @@ -265,6 +268,8 @@ jobs:
IMAGE_TAG_SUFFIX: ${{ inputs.image_tag_suffix }}${{ (inputs.en_alpha_release && matrix.component.name == 'external-node') && '-alpha' || '' }}
steps:
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4
with:
token: ${{ secrets.ZKSYNC_ADMIN_BOT_ORG_REPO_WRITE }}

- name: login to Docker registries
shell: bash
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/new-build-prover-template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ on:
DOCKERHUB_TOKEN:
description: "DOCKERHUB_TOKEN"
required: true
ZKSYNC_ADMIN_BOT_ORG_REPO_WRITE:
description: "Token which will be provided to checkout action to be able to clone private submodules"
required: true
inputs:
ERA_BELLMAN_CUDA_RELEASE:
description: "ERA_BELLMAN_CUDA_RELEASE"
Expand Down
Loading

0 comments on commit 0e1eec5

Please sign in to comment.