mirror of https://github.com/vacp2p/zerokit.git
feat(ci): benchmark compare (#171)
This commit is contained in:
parent
72a3ce1770
commit
75d760c179
|
@ -28,18 +28,18 @@ on:
|
||||||
name: Tests
|
name: Tests
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
test:
|
||||||
multiplier:
|
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
platform: [ubuntu-latest, macos-latest]
|
platform: [ubuntu-latest, macos-latest]
|
||||||
|
crate: [multiplier, semaphore, rln, utils]
|
||||||
runs-on: ${{ matrix.platform }}
|
runs-on: ${{ matrix.platform }}
|
||||||
timeout-minutes: 60
|
timeout-minutes: 60
|
||||||
|
|
||||||
name: multiplier - ${{ matrix.platform }}
|
name: test - ${{ matrix.crate }} - ${{ matrix.platform }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v3
|
||||||
- name: Install stable toolchain
|
- name: Install stable toolchain
|
||||||
uses: actions-rs/toolchain@v1
|
uses: actions-rs/toolchain@v1
|
||||||
with:
|
with:
|
||||||
|
@ -52,32 +52,7 @@ jobs:
|
||||||
- name: cargo-make test
|
- name: cargo-make test
|
||||||
run: |
|
run: |
|
||||||
cargo make test --release
|
cargo make test --release
|
||||||
working-directory: multiplier
|
working-directory: ${{ matrix.crate }}
|
||||||
|
|
||||||
semaphore:
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
platform: [ubuntu-latest, macos-latest]
|
|
||||||
runs-on: ${{ matrix.platform }}
|
|
||||||
timeout-minutes: 60
|
|
||||||
|
|
||||||
name: semaphore - ${{ matrix.platform }}
|
|
||||||
steps:
|
|
||||||
- name: Checkout sources
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
- name: Install stable toolchain
|
|
||||||
uses: actions-rs/toolchain@v1
|
|
||||||
with:
|
|
||||||
profile: minimal
|
|
||||||
toolchain: stable
|
|
||||||
override: true
|
|
||||||
- uses: Swatinem/rust-cache@v2
|
|
||||||
- name: Install Dependencies
|
|
||||||
run: make installdeps
|
|
||||||
- name: cargo-make test
|
|
||||||
run: |
|
|
||||||
cargo make test --release
|
|
||||||
working-directory: semaphore
|
|
||||||
|
|
||||||
rln-wasm:
|
rln-wasm:
|
||||||
strategy:
|
strategy:
|
||||||
|
@ -86,9 +61,9 @@ jobs:
|
||||||
runs-on: ${{ matrix.platform }}
|
runs-on: ${{ matrix.platform }}
|
||||||
timeout-minutes: 60
|
timeout-minutes: 60
|
||||||
|
|
||||||
name: rln-wasm - ${{ matrix.platform }}
|
name: test - rln-wasm - ${{ matrix.platform }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v3
|
||||||
- name: Install stable toolchain
|
- name: Install stable toolchain
|
||||||
uses: actions-rs/toolchain@v1
|
uses: actions-rs/toolchain@v1
|
||||||
with:
|
with:
|
||||||
|
@ -105,68 +80,19 @@ jobs:
|
||||||
- run: cargo make test --release
|
- run: cargo make test --release
|
||||||
working-directory: rln-wasm
|
working-directory: rln-wasm
|
||||||
|
|
||||||
rln:
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
platform: [ubuntu-latest, macos-latest]
|
|
||||||
runs-on: ${{ matrix.platform }}
|
|
||||||
timeout-minutes: 60
|
|
||||||
|
|
||||||
name: rln - ${{ matrix.platform }}
|
|
||||||
steps:
|
|
||||||
- name: Checkout sources
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
- name: Install stable toolchain
|
|
||||||
uses: actions-rs/toolchain@v1
|
|
||||||
with:
|
|
||||||
profile: minimal
|
|
||||||
toolchain: stable
|
|
||||||
override: true
|
|
||||||
- uses: Swatinem/rust-cache@v2
|
|
||||||
- name: Install Dependencies
|
|
||||||
run: make installdeps
|
|
||||||
- name: cargo-make test
|
|
||||||
run: |
|
|
||||||
cargo make test --release
|
|
||||||
working-directory: rln
|
|
||||||
|
|
||||||
utils:
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
platform: [ubuntu-latest, macos-latest]
|
|
||||||
runs-on: ${{ matrix.platform }}
|
|
||||||
timeout-minutes: 60
|
|
||||||
|
|
||||||
name: utils - ${{ matrix.platform }}
|
|
||||||
steps:
|
|
||||||
- name: Checkout sources
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
- name: Install stable toolchain
|
|
||||||
uses: actions-rs/toolchain@v1
|
|
||||||
with:
|
|
||||||
profile: minimal
|
|
||||||
toolchain: stable
|
|
||||||
override: true
|
|
||||||
- uses: Swatinem/rust-cache@v2
|
|
||||||
- name: Install Dependencies
|
|
||||||
run: make installdeps
|
|
||||||
- name: cargo-make test
|
|
||||||
run: |
|
|
||||||
cargo make test --release
|
|
||||||
working-directory: utils
|
|
||||||
|
|
||||||
lint:
|
lint:
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
# we run lint tests only on ubuntu
|
# we run lint tests only on ubuntu
|
||||||
platform: [ubuntu-latest]
|
platform: [ubuntu-latest]
|
||||||
|
crate: [multiplier, semaphore, rln, utils]
|
||||||
runs-on: ${{ matrix.platform }}
|
runs-on: ${{ matrix.platform }}
|
||||||
timeout-minutes: 60
|
timeout-minutes: 60
|
||||||
|
|
||||||
name: lint - ${{ matrix.platform }}
|
name: lint - ${{ matrix.crate }} - ${{ matrix.platform }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v3
|
||||||
- name: Install stable toolchain
|
- name: Install stable toolchain
|
||||||
uses: actions-rs/toolchain@v1
|
uses: actions-rs/toolchain@v1
|
||||||
with:
|
with:
|
||||||
|
@ -179,27 +105,31 @@ jobs:
|
||||||
run: make installdeps
|
run: make installdeps
|
||||||
- name: cargo fmt
|
- name: cargo fmt
|
||||||
if: success() || failure()
|
if: success() || failure()
|
||||||
run: cargo fmt --all -- --check
|
run: cargo fmt -- --check
|
||||||
- name: multiplier - cargo clippy
|
working-directory: ${{ matrix.crate }}
|
||||||
|
- name: cargo clippy
|
||||||
if: success() || failure()
|
if: success() || failure()
|
||||||
run: |
|
run: |
|
||||||
cargo clippy --release -- -D warnings
|
cargo clippy --release -- -D warnings
|
||||||
working-directory: multiplier
|
working-directory: ${{ matrix.crate }}
|
||||||
- name: semaphore - cargo clippy
|
|
||||||
if: success() || failure()
|
|
||||||
run: |
|
|
||||||
cargo clippy --release -- -D warnings
|
|
||||||
working-directory: semaphore
|
|
||||||
- name: rln - cargo clippy
|
|
||||||
if: success() || failure()
|
|
||||||
run: |
|
|
||||||
cargo clippy --release -- -D warnings
|
|
||||||
working-directory: rln
|
|
||||||
- name: utils - cargo clippy
|
|
||||||
if: success() || failure()
|
|
||||||
run: |
|
|
||||||
cargo clippy --release -- -D warnings
|
|
||||||
working-directory: utils
|
|
||||||
# We skip clippy on rln-wasm, since wasm target is managed by cargo make
|
# We skip clippy on rln-wasm, since wasm target is managed by cargo make
|
||||||
# Currently not treating warnings as error, too noisy
|
# Currently not treating warnings as error, too noisy
|
||||||
# -- -D warnings
|
# -- -D warnings
|
||||||
|
benchmark:
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
# we run benchmark tests only on ubuntu
|
||||||
|
platform: [ubuntu-latest]
|
||||||
|
crate: [rln, utils]
|
||||||
|
runs-on: ${{ matrix.platform }}
|
||||||
|
timeout-minutes: 60
|
||||||
|
|
||||||
|
name: benchmark - ${{ matrix.platform }} - ${{ matrix.crate }}
|
||||||
|
steps:
|
||||||
|
- name: Checkout sources
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
- uses: Swatinem/rust-cache@v2
|
||||||
|
- uses: boa-dev/criterion-compare-action@v3
|
||||||
|
with:
|
||||||
|
branchName: ${{ github.base_ref }}
|
||||||
|
cwd: ${{ matrix.crate }}
|
|
@ -16,7 +16,7 @@ jobs:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v3
|
||||||
- name: Install stable toolchain
|
- name: Install stable toolchain
|
||||||
uses: actions-rs/toolchain@v1
|
uses: actions-rs/toolchain@v1
|
||||||
with:
|
with:
|
||||||
|
@ -51,7 +51,7 @@ jobs:
|
||||||
- aarch64-apple-darwin
|
- aarch64-apple-darwin
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v3
|
||||||
- name: Install stable toolchain
|
- name: Install stable toolchain
|
||||||
uses: actions-rs/toolchain@v1
|
uses: actions-rs/toolchain@v1
|
||||||
with:
|
with:
|
||||||
|
@ -81,7 +81,7 @@ jobs:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v3
|
||||||
- name: Install stable toolchain
|
- name: Install stable toolchain
|
||||||
uses: actions-rs/toolchain@v1
|
uses: actions-rs/toolchain@v1
|
||||||
with:
|
with:
|
||||||
|
@ -115,7 +115,7 @@ jobs:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v3
|
||||||
with:
|
with:
|
||||||
ref: master
|
ref: master
|
||||||
- name: Download artifacts
|
- name: Download artifacts
|
||||||
|
|
|
@ -9,7 +9,7 @@ jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v3
|
||||||
- uses: micnncim/action-label-syncer@v1
|
- uses: micnncim/action-label-syncer@v1
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
Loading…
Reference in New Issue