Skip to content

Commit

Permalink
ci: fix ci yml
Browse files Browse the repository at this point in the history
  • Loading branch information
fkrause98 committed Aug 16, 2024
1 parent 975fac9 commit 8fc124e
Showing 1 changed file with 28 additions and 55 deletions.
83 changes: 28 additions & 55 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ env:
BRANCH_NAME: ${{ github.head_ref || github.ref_name }}

jobs:
era_tests:
runs-on: ubuntu-latest
compile:
name: Compile
runs-on: ubuntu-latest
Expand Down Expand Up @@ -441,60 +443,31 @@ jobs:
encoding: ${{ matrix.encoding == 'test' && '--use-test-encoding' || '' }}
run: ./target/release/compiler-tester --load-system-contracts ${{ env.system-contracts}} ${{ env.encoding }} --target EraVM ${{ matrix.mode }} --path ${{ matrix.testgroup }}

name: Run zksync-era tests

zksync_era_tests:
runs-on: ubuntu-latest
steps:
- name: System Dependencies
uses: awalsh128/cache-apt-pkgs-action@latest
with:
packages: llvm clang clang-tools build-essential lld ninja-build librocksdb-dev libsnappy-dev nodejs yarn
version: 1.0

- name: Checkout vm sources
uses: actions/checkout@v4
with:
path: ${{ github.workspace }}/era_vm

- name: Setup compiler-tester submodule
working-directory: ${{ github.workspace }}/era_vm
run: make submodules

- 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: pre-download compiilers
run: |
# Download needed versions of vyper compiler
# Not sanitized due to unconventional path and tags
mkdir -p ./hardhat-nodejs/compilers-v2/vyper/linux
wget -nv -O ./hardhat-nodejs/compilers-v2/vyper/linux/0.3.10 https://github.com/vyperlang/vyper/releases/download/v0.3.10/vyper.0.3.10+commit.91361694.linux
wget -nv -O ./hardhat-nodejs/compilers-v2/vyper/linux/0.3.3 https://github.com/vyperlang/vyper/releases/download/v0.3.3/vyper.0.3.3+commit.48e326f0.linux
chmod +x ./hardhat-nodejs/compilers-v2/vyper/linux/0.3.10
chmod +x ./hardhat-nodejs/compilers-v2/vyper/linux/0.3.3
COMPILERS_JSON='${{ inputs.compilers }}'
echo "$COMPILERS_JSON" | jq -r '.[] | to_entries[] | .key as $compiler | .value[] | "\(.),\($compiler)"' | while IFS=, read -r version compiler; do
mkdir -p "./hardhat-nodejs/compilers-v2/$compiler"
wget -nv -O "./hardhat-nodejs/compilers-v2/$compiler/${compiler}-v${version}" "https://github.com/matter-labs/${compiler}-bin/releases/download/v${version}/${compiler}-linux-amd64-musl-v${version}"
chmod +x "./hardhat-nodejs/compilers-v2/$compiler/${compiler}-v${version}"
done
- name: start-services
run: |
mkdir -p ./volumes/postgres
run_retried docker compose pull zk postgres
docker compose up -d zk postgres
- name: init
run: |
ci_run zk
ci_run zk compiler all
ci_run zk contract build
- name: Run era tests
run: make era-test
- uses: actions/checkout@v4
with:
submodules: "recursive"
- name: Setup environment
run: |
echo ZKSYNC_HOME=$(pwd) >> $GITHUB_ENV
echo $(pwd)/bin >> $GITHUB_PATH
echo IN_DOCKER=1 >> .env
- name: Start services
run: |
run_retried docker-compose -f ${RUNNER_COMPOSE_FILE} pull
mkdir -p ./volumes/postgres
docker-compose -f ${RUNNER_COMPOSE_FILE} up --build -d zk postgres
ci_run sccache --start-server
- name: Init
run: |
ci_run zk
ci_run run_retried rustup show
ci_run zk db setup
- name: Run tests
run: make era-test

0 comments on commit 8fc124e

Please sign in to comment.