Skip to content

Commit

Permalink
ci: sync from upstream, and deduplicate jobs when
Browse files Browse the repository at this point in the history
push to `main`, and remove always failing job `codecov`.
  • Loading branch information
han0110 committed Sep 5, 2023
1 parent 4ead175 commit bceeea1
Show file tree
Hide file tree
Showing 2 changed files with 75 additions and 109 deletions.
78 changes: 75 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,25 @@
name: CI checks

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

jobs:
test:
name: Test on ${{ matrix.os }}
name: Test on ${{ matrix.os }} with ${{ matrix.feature_set }} features
runs-on: ${{ matrix.os }}
strategy:
matrix:
feature_set: [basic, all]
os: [ubuntu-latest, windows-latest, macOS-latest]
include:
- feature_set: basic
features: batch,dev-graph,gadget-traces
- feature_set: all
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 +30,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 +106,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 bceeea1

Please sign in to comment.