Skip to content

Commit

Permalink
fix: split the ci into blocking and non_blocking parts
Browse files Browse the repository at this point in the history
  • Loading branch information
Yael-Starkware committed Oct 9, 2023
1 parent ab79bd4 commit e854161
Show file tree
Hide file tree
Showing 4 changed files with 66 additions and 30 deletions.
29 changes: 1 addition & 28 deletions .github/workflows/ci.yml → .github/workflows/ci_blocking.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: CI
name: CI_blocking

on:
push:
Expand Down Expand Up @@ -163,33 +163,6 @@ jobs:
- uses: Swatinem/rust-cache@v2
- run: cargo check --all-features

codecov:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- name: Set-Up
run: |
sudo apt-get update
sudo apt-get install -y clang llvm libudev-dev protobuf-compiler
- name: Install cargo-llvm-cov
uses: taiki-e/install-action@cargo-llvm-cov
- uses: Swatinem/rust-cache@v2
- run: npm install -g [email protected]
- name: Coverage
run: cargo llvm-cov --codecov --output-path codecov.json
env:
SEED: 0
- name: Codecov
uses: codecov/codecov-action@v3
with:
verbose: true
fail_ci_if_error: true
version: "v0.1.15"

check-starknet_api-dependency:
runs-on: ubuntu-latest
if: github.base_ref == 'main' # this step is only run if the pr is to the main branch
Expand Down
62 changes: 62 additions & 0 deletions .github/workflows/ci_non_blocking.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: CI_non_blocking

on:
push:
branches: [main]
pull_request:
types:
- opened
- reopened
- synchronize
- auto_merge_enabled
- edited # for when the PR title is edited
merge_group:
types: [checks_requested]

jobs:
free-disk-space:
runs-on: ubuntu-latest
steps:

- name: Free Disk Space (Ubuntu)
uses: jlumbroso/free-disk-space@main
with:
# this might remove tools that are actually needed,
# if set to "true" but frees about 6 GB
tool-cache: false

# all of these default to true, but feel free to set to
# "false" if necessary for your workflow
android: true
dotnet: true
haskell: true
large-packages: true
docker-images: true
swap-storage: true

codecov:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- name: Set-Up
run: |
sudo apt-get update
sudo apt-get install -y clang llvm libudev-dev protobuf-compiler
- name: Install cargo-llvm-cov
uses: taiki-e/install-action@cargo-llvm-cov
- uses: Swatinem/rust-cache@v2
- run: npm install -g [email protected]
- name: Coverage
run: cargo llvm-cov --codecov --output-path codecov.json
env:
SEED: 0
- name: Codecov
uses: codecov/codecov-action@v3
with:
verbose: true
fail_ci_if_error: true
version: "v0.1.15"
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
<div align="center">
<br />

![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/starkware-libs/papyrus/ci.yml?branch=main)
![GitHub Workflow Blocking Status](https://img.shields.io/github/actions/workflow/status/starkware-libs/papyrus/ci_blocking.yml?branch=main)
![GitHub Workflow Non Blocking Status](https://img.shields.io/github/actions/workflow/status/starkware-libs/papyrus/ci_non_blocking.yml?branch=main)
[![Project license](https://img.shields.io/github/license/starkware-libs/papyrus.svg?style=flat-square)](LICENSE)
[![Pull Requests welcome](https://img.shields.io/badge/PRs-welcome-ff69b4.svg?style=flat-square)](https://github.com/starkware-libs/papyrus/issues?q=is%3Aissue+is%3Aopen+label%3A%22help+wanted%22)
[![codecov](https://codecov.io/gh/starkware-libs/papyrus/branch/main/graph/badge.svg?token=YZA9IPDHRM)](https://codecov.io/gh/starkware-libs/papyrus)
Expand Down
2 changes: 1 addition & 1 deletion docs/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ Then, you will need to install
- You'll need Ganache only for the tests of the [papyrus_base_layer](../crates/papyrus_base_layer/) crate.

### CI
Your code will need to pass [CI](../.github/workflows/ci.yml) before it can be merged. This means your code will need to:
Your code will need to pass [CI](../.github/workflows/ci_blocking.yml) before it can be merged. This means your code will need to:
- Pass all local tests and all integration tests.
- Be formatted according to [rustfmt](https://github.com/rust-lang/rustfmt).
- Be linted according to [clippy](https://github.com/rust-lang/rust-clippy)
Expand Down

0 comments on commit e854161

Please sign in to comment.