Skip to content

Commit

Permalink
ci: deduplicate jobs when push to main and remove codecov
Browse files Browse the repository at this point in the history
  • Loading branch information
han0110 committed Sep 4, 2023
1 parent 615a13b commit 6eed6a2
Show file tree
Hide file tree
Showing 2 changed files with 71 additions and 108 deletions.
73 changes: 71 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
name: CI checks

on: [pull_request, push]
on:
merge_group:
pull_request:
push:
branches:
- main

jobs:
test:
Expand All @@ -9,6 +14,9 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macOS-latest]
include:
- features: batch,dev-graph,gadget-traces
- features: batch,dev-graph,gadget-traces,multicore,test-dev-graph,thread-safe-region,sanity-checks,circuit-params

steps:
- uses: actions/checkout@v3
Expand All @@ -19,7 +27,67 @@ jobs:
uses: actions-rs/cargo@v1
with:
command: test
args: --verbose --release --all --all-features
args: --verbose --release --workspace --no-default-features --features "${{ matrix.features }}"

build:
name: Build target ${{ matrix.target }}
runs-on: ubuntu-latest
strategy:
matrix:
target:
- wasm32-unknown-unknown
- wasm32-wasi

steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
with:
override: false
- name: Add target
run: rustup target add ${{ matrix.target }}
- name: cargo build
uses: actions-rs/cargo@v1
with:
command: build
args: --no-default-features --features batch,dev-graph,gadget-traces --target ${{ matrix.target }}

bitrot:
name: Bitrot check
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
with:
override: false
# Build benchmarks to prevent bitrot
- name: Build benchmarks
uses: actions-rs/cargo@v1
with:
command: build
args: --benches --examples --all-features

doc-links:
name: Intra-doc links
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
with:
override: false
- name: cargo fetch
uses: actions-rs/cargo@v1
with:
command: fetch

# Ensure intra-documentation links all resolve correctly
# Requires #![deny(intra_doc_link_resolution_failure)] in crates.
- name: Check intra-doc links
uses: actions-rs/cargo@v1
with:
command: doc
args: --all --document-private-items

fmt:
name: Rustfmt
Expand All @@ -35,3 +103,4 @@ jobs:
with:
command: fmt
args: --all -- --check

106 changes: 0 additions & 106 deletions .github/workflows/ci_main.yml

This file was deleted.

0 comments on commit 6eed6a2

Please sign in to comment.