mirror of
https://github.com/logos-blockchain/logos-blockchain-rust-rapidsnark.git
synced 2026-06-07 11:49:32 +00:00
81 lines
2.5 KiB
YAML
81 lines
2.5 KiB
YAML
name: Build and Test
|
|
|
|
on:
|
|
push:
|
|
pull_request:
|
|
types:
|
|
- opened
|
|
- synchronize
|
|
- reopened
|
|
- ready_for_review
|
|
|
|
env:
|
|
CARGO_TERM_COLOR: always
|
|
|
|
jobs:
|
|
clippy_check:
|
|
runs-on: ubuntu-latest
|
|
env:
|
|
RUSTFLAGS: "-Dwarnings" # Make sure CI fails on all warnings, including Clippy lints
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: Run Clippy
|
|
run: cargo clippy --all-targets --all-features
|
|
lint:
|
|
runs-on: ubuntu-latest
|
|
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Check formatting
|
|
run: cargo fmt --all -- --check
|
|
build-ios:
|
|
runs-on: macos-latest
|
|
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name
|
|
strategy:
|
|
matrix:
|
|
target:
|
|
- aarch64-apple-ios
|
|
- aarch64-apple-ios-sim
|
|
- x86_64-apple-ios
|
|
steps:
|
|
- name: Checkout Repository
|
|
uses: actions/checkout@v4
|
|
- name: Install Rust
|
|
uses: dtolnay/rust-toolchain@stable
|
|
with:
|
|
toolchain: "1.81.0"
|
|
targets: ${{ matrix.target }}
|
|
- name: Install Dependencies
|
|
run: |
|
|
if [[ "${{ matrix.target }}" == "aarch64-apple-ios" || "${{ matrix.target }}" == "aarch64-apple-ios-sim" ]]; then
|
|
rustup target add ${{ matrix.target }}
|
|
sudo apt update && sudo apt install -y libclang-dev
|
|
fi
|
|
- name: Build
|
|
run: cargo build --target ${{ matrix.target }}
|
|
test-linux:
|
|
runs-on: ubuntu-latest
|
|
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: Install Rust toolchain
|
|
uses: actions-rs/toolchain@v1
|
|
with:
|
|
toolchain: "1.81.0"
|
|
override: true
|
|
- name: Run tests
|
|
run: cargo test -vv
|
|
test-macOS:
|
|
runs-on: macos-latest
|
|
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: Install Rust toolchain
|
|
uses: actions-rs/toolchain@v1
|
|
with:
|
|
toolchain: "1.81.0"
|
|
override: true
|
|
- name: Run tests
|
|
run: cargo test
|