From 9b5456d92a4aad6c91efd208029828b63238df46 Mon Sep 17 00:00:00 2001 From: Itay Tsabary Date: Thu, 12 Dec 2024 11:12:09 +0200 Subject: [PATCH] chore(ci): move codecov to nightly commit-id:1c01182b --- .github/workflows/main.yml | 57 ------------------------------ .github/workflows/main_nightly.yml | 57 ++++++++++++++++++++++++++++++ 2 files changed, 57 insertions(+), 57 deletions(-) create mode 100644 .github/workflows/main_nightly.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index b878a01408..ed65bae32e 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -137,60 +137,3 @@ jobs: env: SEED: 0 - codecov: - runs-on: starkware-ubuntu-latest-large - steps: - - uses: actions/checkout@v4 - with: - # Fetch the entire history. - fetch-depth: 0 - - uses: ./.github/actions/bootstrap - - - name: Install cargo-llvm-cov - uses: taiki-e/install-action@cargo-llvm-cov - - run: npm install -g ganache@7.4.3 - - # Setup pypy and link to the location expected by .cargo/config.toml. - - uses: actions/setup-python@v5 - id: setup-pypy - with: - python-version: "pypy3.9" - - run: ln -s '${{ steps.setup-pypy.outputs.python-path }}' /usr/local/bin/pypy3.9 - - env: - LD_LIBRARY_PATH: ${{ env.Python3_ROOT_DIR }}/bin - run: echo "LD_LIBRARY_PATH=${LD_LIBRARY_PATH}" >> $GITHUB_ENV - - - name: "Run codecov on pull request" - id: run_codecov_pr - if: github.event_name == 'pull_request' - run: | - python3 -m venv ci - ci/bin/pip install -r scripts/requirements.txt - ci/bin/python scripts/run_tests.py --command codecov --changes_only --commit_id ${{ github.event.pull_request.base.sha }} - if [ -f codecov.json ]; then - echo "codecov_output=true" >> $GITHUB_OUTPUT - else - echo "codecov_output=false" >> $GITHUB_OUTPUT - fi - env: - SEED: 0 - - - name: "Run codecov on push" - if: github.event_name == 'push' - # TODO: Better support for running tests on push. - run: | - python3 -m venv ci - ci/bin/pip install -r scripts/requirements.txt - ci/bin/python scripts/run_tests.py --command codecov - echo "codecov_output=true" >> $GITHUB_OUTPUT - env: - SEED: 0 - - - name: Codecov - if: steps.run_codecov_pr.outputs.codecov_output == 'true' - uses: codecov/codecov-action@v3 - with: - token: ${{ secrets.CODECOV_TOKEN }} - verbose: true - fail_ci_if_error: true - version: "v0.1.15" diff --git a/.github/workflows/main_nightly.yml b/.github/workflows/main_nightly.yml new file mode 100644 index 0000000000..f514ef7400 --- /dev/null +++ b/.github/workflows/main_nightly.yml @@ -0,0 +1,57 @@ +name: Main-CI-Nightly +on: + schedule: + - cron: '30 23 * * *' # Uses ubuntu runner. + workflow_dispatch: # Uses ubuntu runner. + +env: + RUSTFLAGS: "-D warnings -C link-arg=-fuse-ld=lld" + +jobs: + codecov: + runs-on: starkware-ubuntu-latest-large + steps: + - uses: actions/checkout@v4 + with: + # Fetch the entire history. + fetch-depth: 0 + - uses: ./.github/actions/bootstrap + + - name: Install cargo-llvm-cov + uses: taiki-e/install-action@cargo-llvm-cov + - run: npm install -g ganache@7.4.3 + + # Setup pypy and link to the location expected by .cargo/config.toml. + - uses: actions/setup-python@v5 + id: setup-pypy + with: + python-version: "pypy3.9" + - run: ln -s '${{ steps.setup-pypy.outputs.python-path }}' /usr/local/bin/pypy3.9 + - env: + LD_LIBRARY_PATH: ${{ env.Python3_ROOT_DIR }}/bin + run: echo "LD_LIBRARY_PATH=${LD_LIBRARY_PATH}" >> $GITHUB_ENV + + - name: "Run codecov on pull request" + id: run_codecov_pr + run: | + python3 -m venv ci + ci/bin/pip install -r scripts/requirements.txt + ci/bin/python scripts/run_tests.py --command codecov --changes_only --commit_id ${{ github.event.pull_request.base.sha }} + if [ -f codecov.json ]; then + echo "codecov_output=true" >> $GITHUB_OUTPUT + else + echo "codecov_output=false" >> $GITHUB_OUTPUT + fi + env: + SEED: 0 + + - name: Codecov + if: steps.run_codecov_pr.outputs.codecov_output == 'true' + uses: codecov/codecov-action@v3 + with: + token: ${{ secrets.CODECOV_TOKEN }} + verbose: true + fail_ci_if_error: true + version: "v0.1.15" + +