Skip to content

Commit

Permalink
ci: add scheduled workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
antonbaliasnikov committed Jan 20, 2025
1 parent 52773fa commit 9a8c1ba
Show file tree
Hide file tree
Showing 4 changed files with 85 additions and 7 deletions.
79 changes: 79 additions & 0 deletions .github/workflows/scheduled.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
name: Scheduled

# This workflow is triggered by a schedule or manually
# It allows to run integration tests
# for all supported platforms by user's choice

on:
schedule:
- cron: '0 0 * * 0' # every week
workflow_dispatch:
inputs:
run_macos_amd64:
description: "Run MacOS amd64?"
required: false
type: boolean
default: true
run_macos_arm64:
description: "Run MacOS arm64?"
required: false
type: boolean
default: true
run_linux_amd64:
description: "Run Linux amd64?"
required: false
type: boolean
default: true
run_linux_arm64:
description: "Run Linux arm64?"
required: false
type: boolean
default: true
run_windows_amd64:
description: "Run Windows amd64?"
required: false
type: boolean
default: true


jobs:

prepare-matrix:
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.prepare-matrix.outputs.matrix }}
steps:
- name: Prepare matrix
id: prepare-matrix
run: |
# Define general matrix parameters
# Windows is not supported yet on era-compiler-tester side
WINDOWS='{"name":"Windows-x86","runner":"windows-2019-github-hosted-64core"}'
MACOS_AMD64='{"name":"MacOS-x86","runner":"macos-12-large"}'
MACOS_ARM64='{"name":"MacOS-arm64","runner":["self-hosted","macOS","ARM64"]}'
LINUX_AMD64='{"name":"Linux-AMD64","runner":"matterlabs-ci-runner-high-performance","image":"ghcr.io/matter-labs/zksync-llvm-runner:latest"}'
LINUX_ARM64='{"name":"Linux-ARM64","runner":"matterlabs-ci-runner-arm","image":"ghcr.io/matter-labs/zksync-llvm-runner:latest"}'
# Disable platforms for non-tag builds if user requested
if [ ${GITHUB_EVENT_NAME} = workflow_dispatch ]; then
[ ${{ github.event.inputs.run_windows_amd64 }} != true ] && WINDOWS=
[ ${{ github.event.inputs.run_macos_amd64 }} != true ] && MACOS_AMD64=
[ ${{ github.event.inputs.run_macos_arm64 }} != true ] && MACOS_ARM64=
[ ${{ github.event.inputs.run_linux_amd64 }} != true ] && LINUX_AMD64=
[ ${{ github.event.inputs.run_linux_arm64 }} != true ] && LINUX_ARM64=
fi
PLATFORMS=(${WINDOWS} ${MACOS_AMD64} ${MACOS_ARM64} ${LINUX_AMD64} ${LINUX_ARM64})
echo "matrix={ \"include\": [ $(IFS=, ; echo "${PLATFORMS[*]}") ] }" | tee -a "${GITHUB_OUTPUT}"
integration-tests:
needs: prepare-matrix
uses: matter-labs/era-compiler-ci/.github/workflows/integration-tests.yaml@v1
secrets: inherit
strategy:
fail-fast: false
matrix:
target: [ 'eravm' ]
with:
ccache-key-type: 'static' # rotate ccache key every month
target-machine: ${{ matrix.target }}
platforms-matrix: ${{ needs.prepare-matrix.outputs.matrix }}
3 changes: 1 addition & 2 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ jobs:
# If you would like to make a change to the integration tests workflow, please do it in the era-compiler-ci repository
integration-tests:
needs: target-machine
uses: matter-labs/era-compiler-ci/.github/workflows/integration-tests.yaml@aba-windows-support
uses: matter-labs/era-compiler-ci/.github/workflows/integration-tests.yaml@v1
secrets: inherit
strategy:
fail-fast: false
Expand All @@ -99,7 +99,6 @@ jobs:
compiler-tester-repo: ${{ github.event.pull_request.head.repo.full_name }} # required to properly test forks
ccache-key-type: static
target-machine: ${{ matrix.target }}
platforms-matrix: '{ "include": [ {"name":"Windows","runner":"windows-2022-github-hosted-64core"} ] }'

# Benchmarks workflow call from the era-compiler-ci repository
# This is a common part of the benchmarks workflow for all repositories
Expand Down
6 changes: 3 additions & 3 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions compiler_tester/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ vm2 = { git = "https://github.com/matter-labs/vm2", optional = true, package = "
era-compiler-common = { git = "https://github.com/matter-labs/era-compiler-common", branch = "main" }
era-compiler-downloader = { git = "https://github.com/matter-labs/era-compiler-common", branch = "main" }
era-compiler-llvm-context = { git = "https://github.com/matter-labs/era-compiler-llvm-context", branch = "main" }
era-compiler-solidity = { git = "https://github.com/matter-labs/era-compiler-solidity", branch = "az-fix-windows-yul-string-literals" }
era-solc = { git = "https://github.com/matter-labs/era-compiler-solidity", branch = "az-fix-windows-yul-string-literals" }
era-compiler-solidity = { git = "https://github.com/matter-labs/era-compiler-solidity", branch = "main" }
era-solc = { git = "https://github.com/matter-labs/era-compiler-solidity", branch = "main" }
era-compiler-vyper = { git = "https://github.com/matter-labs/era-compiler-vyper", branch = "main" }

solidity-adapter = { path = "../solidity_adapter" }
Expand Down

0 comments on commit 9a8c1ba

Please sign in to comment.