From 9a8c1bae6cbecf208c25d9921c8b22248bd3aca8 Mon Sep 17 00:00:00 2001 From: Anton Baliasnikov Date: Mon, 20 Jan 2025 13:18:41 +0000 Subject: [PATCH] ci: add scheduled workflow --- .github/workflows/scheduled.yaml | 79 ++++++++++++++++++++++++++++++++ .github/workflows/tests.yaml | 3 +- Cargo.lock | 6 +-- compiler_tester/Cargo.toml | 4 +- 4 files changed, 85 insertions(+), 7 deletions(-) create mode 100644 .github/workflows/scheduled.yaml diff --git a/.github/workflows/scheduled.yaml b/.github/workflows/scheduled.yaml new file mode 100644 index 00000000..ba0a66e9 --- /dev/null +++ b/.github/workflows/scheduled.yaml @@ -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 }} diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 9efc20c0..310bd15d 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -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 @@ -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 diff --git a/Cargo.lock b/Cargo.lock index f433c78c..068057f0 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1118,7 +1118,7 @@ dependencies = [ [[package]] name = "era-compiler-solidity" version = "1.5.10" -source = "git+https://github.com/matter-labs/era-compiler-solidity?branch=az-fix-windows-yul-string-literals#edac14fdcbfbc6bf9751bde72dd860ec2b505e8a" +source = "git+https://github.com/matter-labs/era-compiler-solidity?branch=main#8eceeacecd12b7e87c2662a3ba0501b36d05f894" dependencies = [ "anyhow", "clap", @@ -1169,7 +1169,7 @@ dependencies = [ [[package]] name = "era-solc" version = "1.5.10" -source = "git+https://github.com/matter-labs/era-compiler-solidity?branch=az-fix-windows-yul-string-literals#edac14fdcbfbc6bf9751bde72dd860ec2b505e8a" +source = "git+https://github.com/matter-labs/era-compiler-solidity?branch=main#8eceeacecd12b7e87c2662a3ba0501b36d05f894" dependencies = [ "anyhow", "boolinator", @@ -1186,7 +1186,7 @@ dependencies = [ [[package]] name = "era-yul" version = "1.5.10" -source = "git+https://github.com/matter-labs/era-compiler-solidity?branch=az-fix-windows-yul-string-literals#edac14fdcbfbc6bf9751bde72dd860ec2b505e8a" +source = "git+https://github.com/matter-labs/era-compiler-solidity?branch=main#8eceeacecd12b7e87c2662a3ba0501b36d05f894" dependencies = [ "anyhow", "regex", diff --git a/compiler_tester/Cargo.toml b/compiler_tester/Cargo.toml index fe10ffb0..092d386e 100644 --- a/compiler_tester/Cargo.toml +++ b/compiler_tester/Cargo.toml @@ -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" }