2022-03-16 13:21:31 +08:00
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- master
|
2022-11-15 16:35:29 +05:30
|
|
|
paths-ignore:
|
2024-04-08 10:45:12 +03:00
|
|
|
- "**.md"
|
|
|
|
- "!.github/workflows/*.yml"
|
|
|
|
- "!rln-wasm/**"
|
|
|
|
- "!rln/src/**"
|
|
|
|
- "!rln/resources/**"
|
|
|
|
- "!utils/src/**"
|
2022-03-16 13:21:31 +08:00
|
|
|
pull_request:
|
2022-11-15 16:35:29 +05:30
|
|
|
paths-ignore:
|
2024-04-08 10:45:12 +03:00
|
|
|
- "**.md"
|
|
|
|
- "!.github/workflows/*.yml"
|
|
|
|
- "!rln-wasm/**"
|
|
|
|
- "!rln/src/**"
|
|
|
|
- "!rln/resources/**"
|
|
|
|
- "!utils/src/**"
|
2022-03-16 13:21:31 +08:00
|
|
|
|
|
|
|
name: Tests
|
|
|
|
|
|
|
|
jobs:
|
2024-09-24 19:18:35 +07:00
|
|
|
utils-test:
|
2022-11-22 15:25:35 +01:00
|
|
|
strategy:
|
|
|
|
matrix:
|
2024-09-24 19:18:35 +07:00
|
|
|
platform: [ ubuntu-latest, macos-latest ]
|
|
|
|
crate: [ utils ]
|
2022-11-22 15:25:35 +01:00
|
|
|
runs-on: ${{ matrix.platform }}
|
|
|
|
timeout-minutes: 60
|
2024-04-08 10:45:12 +03:00
|
|
|
|
2023-05-29 23:42:30 +05:30
|
|
|
name: test - ${{ matrix.crate }} - ${{ matrix.platform }}
|
2022-11-22 15:25:35 +01:00
|
|
|
steps:
|
|
|
|
- name: Checkout sources
|
2023-05-29 23:42:30 +05:30
|
|
|
uses: actions/checkout@v3
|
2022-11-22 15:25:35 +01:00
|
|
|
- name: Install stable toolchain
|
|
|
|
uses: actions-rs/toolchain@v1
|
|
|
|
with:
|
|
|
|
profile: minimal
|
|
|
|
toolchain: stable
|
|
|
|
override: true
|
2023-03-14 17:44:06 +05:30
|
|
|
- uses: Swatinem/rust-cache@v2
|
|
|
|
- name: Install dependencies
|
|
|
|
run: make installdeps
|
2023-01-31 20:46:33 +05:30
|
|
|
- name: cargo-make test
|
2022-11-22 15:25:35 +01:00
|
|
|
run: |
|
2024-04-08 10:45:12 +03:00
|
|
|
cargo make test --release
|
2023-05-29 23:42:30 +05:30
|
|
|
working-directory: ${{ matrix.crate }}
|
2024-04-08 10:45:12 +03:00
|
|
|
|
2024-09-24 19:18:35 +07:00
|
|
|
rln-test:
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
platform: [ ubuntu-latest, macos-latest ]
|
|
|
|
crate: [ rln ]
|
|
|
|
feature: [ "default", "arkzkey", "stateless" ]
|
|
|
|
runs-on: ${{ matrix.platform }}
|
|
|
|
timeout-minutes: 60
|
|
|
|
|
|
|
|
name: test - ${{ matrix.crate }} - ${{ matrix.platform }} - ${{ matrix.feature }}
|
|
|
|
steps:
|
|
|
|
- name: Checkout sources
|
|
|
|
uses: actions/checkout@v3
|
|
|
|
- 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_${{ matrix.feature }} --release
|
|
|
|
working-directory: ${{ matrix.crate }}
|
|
|
|
|
2022-11-22 15:25:35 +01:00
|
|
|
rln-wasm:
|
|
|
|
strategy:
|
|
|
|
matrix:
|
2024-09-24 19:18:35 +07:00
|
|
|
platform: [ ubuntu-latest, macos-latest ]
|
2022-11-22 15:25:35 +01:00
|
|
|
runs-on: ${{ matrix.platform }}
|
|
|
|
timeout-minutes: 60
|
2024-04-08 10:45:12 +03:00
|
|
|
|
2023-05-29 23:42:30 +05:30
|
|
|
name: test - rln-wasm - ${{ matrix.platform }}
|
2022-09-28 01:09:48 +10:00
|
|
|
steps:
|
2023-05-29 23:42:30 +05:30
|
|
|
- uses: actions/checkout@v3
|
2022-09-28 01:09:48 +10:00
|
|
|
- name: Install stable toolchain
|
|
|
|
uses: actions-rs/toolchain@v1
|
|
|
|
with:
|
|
|
|
profile: minimal
|
|
|
|
toolchain: stable
|
|
|
|
override: true
|
2023-03-14 17:44:06 +05:30
|
|
|
- uses: Swatinem/rust-cache@v2
|
|
|
|
- name: Install Dependencies
|
|
|
|
run: make installdeps
|
2022-09-28 01:09:48 +10:00
|
|
|
- name: Install wasm-pack
|
|
|
|
uses: jetli/wasm-pack-action@v0.3.0
|
|
|
|
- run: cargo make build
|
|
|
|
working-directory: rln-wasm
|
2023-05-18 11:33:45 +05:30
|
|
|
- run: cargo make test --release
|
2022-09-28 01:09:48 +10:00
|
|
|
working-directory: rln-wasm
|
2022-11-22 15:25:35 +01:00
|
|
|
|
2022-03-16 13:21:31 +08:00
|
|
|
lint:
|
2022-11-22 15:25:35 +01:00
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
# we run lint tests only on ubuntu
|
2024-09-24 19:18:35 +07:00
|
|
|
platform: [ ubuntu-latest ]
|
|
|
|
crate: [ rln, utils ]
|
2022-11-22 15:25:35 +01:00
|
|
|
runs-on: ${{ matrix.platform }}
|
|
|
|
timeout-minutes: 60
|
|
|
|
|
2024-04-08 10:45:12 +03:00
|
|
|
name: lint - ${{ matrix.crate }} - ${{ matrix.platform }}
|
2022-03-16 13:21:31 +08:00
|
|
|
steps:
|
|
|
|
- name: Checkout sources
|
2023-05-29 23:42:30 +05:30
|
|
|
uses: actions/checkout@v3
|
2022-03-16 13:21:31 +08:00
|
|
|
- name: Install stable toolchain
|
|
|
|
uses: actions-rs/toolchain@v1
|
|
|
|
with:
|
|
|
|
profile: minimal
|
|
|
|
toolchain: stable
|
|
|
|
override: true
|
|
|
|
components: rustfmt, clippy
|
2023-03-14 17:44:06 +05:30
|
|
|
- uses: Swatinem/rust-cache@v2
|
|
|
|
- name: Install Dependencies
|
|
|
|
run: make installdeps
|
2022-03-16 13:21:31 +08:00
|
|
|
- name: cargo fmt
|
2022-11-22 15:25:35 +01:00
|
|
|
if: success() || failure()
|
2023-05-29 23:42:30 +05:30
|
|
|
run: cargo fmt -- --check
|
|
|
|
working-directory: ${{ matrix.crate }}
|
|
|
|
- name: cargo clippy
|
2022-11-22 15:25:35 +01:00
|
|
|
if: success() || failure()
|
2022-09-20 08:22:46 -04:00
|
|
|
run: |
|
2024-04-08 10:45:12 +03:00
|
|
|
cargo clippy --release -- -D warnings
|
2023-05-29 23:42:30 +05:30
|
|
|
working-directory: ${{ matrix.crate }}
|
2022-11-22 15:25:35 +01:00
|
|
|
# We skip clippy on rln-wasm, since wasm target is managed by cargo make
|
2022-03-17 15:45:20 +08:00
|
|
|
# Currently not treating warnings as error, too noisy
|
2023-05-29 23:42:30 +05:30
|
|
|
# -- -D warnings
|
2024-10-01 14:16:03 +07:00
|
|
|
|
|
|
|
benchmark-utils:
|
2023-05-30 12:22:06 +05:30
|
|
|
# run only in pull requests
|
|
|
|
if: github.event_name == 'pull_request'
|
2023-05-29 23:42:30 +05:30
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
# we run benchmark tests only on ubuntu
|
2024-09-24 19:18:35 +07:00
|
|
|
platform: [ ubuntu-latest ]
|
2024-10-01 14:16:03 +07:00
|
|
|
crate: [ utils ]
|
2023-05-29 23:42:30 +05:30
|
|
|
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 }}
|
2024-04-08 10:45:12 +03:00
|
|
|
cwd: ${{ matrix.crate }}
|
2024-10-01 14:16:03 +07:00
|
|
|
|
|
|
|
benchmark-rln:
|
|
|
|
# run only in pull requests
|
|
|
|
if: github.event_name == 'pull_request'
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
# we run benchmark tests only on ubuntu
|
|
|
|
platform: [ ubuntu-latest ]
|
|
|
|
crate: [ rln ]
|
|
|
|
feature: [ "default", "arkzkey" ]
|
|
|
|
runs-on: ${{ matrix.platform }}
|
|
|
|
timeout-minutes: 60
|
|
|
|
|
|
|
|
name: benchmark - ${{ matrix.platform }} - ${{ matrix.crate }} - ${{ matrix.feature }}
|
|
|
|
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 }}
|
|
|
|
features: ${{ matrix.feature }}
|