Skip to content

Commit

Permalink
fix matrix
Browse files Browse the repository at this point in the history
  • Loading branch information
hatemosphere committed Oct 24, 2023
1 parent ba0fd01 commit bf84f69
Show file tree
Hide file tree
Showing 2 changed files with 69 additions and 19 deletions.
87 changes: 69 additions & 18 deletions .github/workflows/build-core-template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,28 +25,84 @@ on:

jobs:
build-images:
name: Build and Push Docker Images
runs-on: ${{fromJson(matrix.runner)}}
name: Build and Push amd64 Docker Images
runs-on: matterlabs-ci-runner
strategy:
matrix:
include:
- component: server-v2
runner: '["matterlabs-ci-runner"]'
- component: contract-verifier
runner: '["matterlabs-ci-runner"]'
- component: cross-external-nodes-checker
runner: '["matterlabs-ci-runner"]'
- component: external-node
runner: '["matterlabs-ci-runner", "matterlabs-ci-runner-arm"]'
fail-fast: false
component:
- server-v2
- contract-verifier
- cross-external-nodes-checker
- external-node
env:
image_tag: ${{ inputs.image_tag }}
IMAGE_TAG_SUFFIX: ${{ inputs.image_tag_suffix }}
steps:
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c
with:
submodules: "recursive"
- name: setup-env
run: |
echo ZKSYNC_HOME=$(pwd) >> $GITHUB_ENV
echo CI=1 >> $GITHUB_ENV
echo $(pwd)/bin >> $GITHUB_PATH
echo CI=1 >> .env
echo IN_DOCKER=1 >> .env
- name: start-services
run: |
echo "IMAGE_TAG_SUFFIX=${{ env.IMAGE_TAG_SUFFIX }}" >> .env
docker-compose -f docker-compose-runner.yml up --no-deps -d zk
ci_run sccache --start-server
- name: init
run: |
ci_run git config --global --add safe.directory /usr/src/zksync
ci_run git config --global --add safe.directory /usr/src/zksync/sdk/binaryen
ci_run git config --global --add safe.directory /usr/src/zksync/etc/system-contracts
ci_run git config --global --add safe.directory /usr/src/zksync/contracts
ci_run zk
ci_run zk clean --all
ci_run zk run yarn
ci_run cp etc/tokens/{test,localhost}.json
ci_run zk compiler all
ci_run zk contract build
ci_run zk f yarn run l2-contracts build
ci_run curl -LO https://storage.googleapis.com/matterlabs-setup-keys-us/setup-keys/setup_2\^26.key
- name: login to Docker registries
if: github.event_name != 'pull_request' && (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/'))
run: |
ci_run docker login -u ${{ secrets.DOCKERHUB_USER }} -p ${{ secrets.DOCKERHUB_TOKEN }}
ci_run gcloud auth configure-docker us-docker.pkg.dev,asia-docker.pkg.dev -q
- name: update-images
env:
DOCKER_ACTION: ${{ inputs.action }}
COMPONENT: ${{ matrix.component }}
run: |
ci_run zk docker $DOCKER_ACTION $COMPONENT --platforms "linux/amd64" -- --public
- name: Show sccache stats
if: always()
run: |
ci_run sccache --show-stats
ci_run cat /tmp/sccache_log.txt
build-images-arm:
name: Build and Push arm64 Docker Images
runs-on: matterlabs-ci-runner-arm
strategy:
matrix:
component:
- external-node
env:
image_tag: ${{ inputs.image_tag }}
IMAGE_TAG_SUFFIX: ${{ inputs.image_tag_suffix }}
steps:
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c
with:
submodules: "recursive"
- name: setup-env
run: |
echo ZKSYNC_HOME=$(pwd) >> $GITHUB_ENV
Expand Down Expand Up @@ -87,12 +143,7 @@ jobs:
DOCKER_ACTION: ${{ inputs.action }}
COMPONENT: ${{ matrix.component }}
run: |
if [[ "${{ fromJson(matrix.runner) }}" == "matterlabs-ci-runner-arm" ]]; then
PLATFORMS="linux/arm64,linux/arm64/v8"
else
PLATFORMS="linux/amd64"
fi
ci_run zk docker $DOCKER_ACTION $COMPONENT --platforms "$PLATFORMS" -- --public
ci_run zk docker $DOCKER_ACTION $COMPONENT --platforms "linux/arm64,linux/arm64/v8" -- --public
- name: Show sccache stats
if: always()
Expand Down
1 change: 0 additions & 1 deletion docker/zk-environment/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,6 @@ RUN apt-get update && apt-get install -y --no-install-recommends \

ENV LIBRARY_PATH /usr/local/cuda/lib64/stubs


FROM base as rust-nightly

RUN rustup install nightly-2023-07-21 && \
Expand Down

0 comments on commit bf84f69

Please sign in to comment.