mirror of
https://github.com/RustCrypto/signatures
synced 2026-06-21 13:45:42 +00:00
a1ae696733
Uses Rust actions from https://github.com/actions-rs
112 lines
2.9 KiB
YAML
112 lines
2.9 KiB
YAML
name: ecdsa
|
|
on:
|
|
pull_request:
|
|
paths:
|
|
- "ecdsa/**"
|
|
- "Cargo.*"
|
|
push:
|
|
branches: master
|
|
paths:
|
|
- "ecdsa/**"
|
|
- "Cargo.*"
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
matrix:
|
|
target:
|
|
- thumbv7em-none-eabi
|
|
- wasm32-unknown-unknown
|
|
toolchain:
|
|
- 1.40.0 # MSRV
|
|
- stable
|
|
steps:
|
|
- name: Checkout sources
|
|
uses: actions/checkout@v1
|
|
|
|
- name: Cache cargo registry
|
|
uses: actions/cache@v1
|
|
with:
|
|
path: ~/.cargo/registry
|
|
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('Cargo.lock') }}
|
|
|
|
- name: Cache cargo index
|
|
uses: actions/cache@v1
|
|
with:
|
|
path: ~/.cargo/git
|
|
key: ${{ runner.os }}-cargo-index-${{ hashFiles('Cargo.lock') }}
|
|
|
|
- name: Cache cargo build
|
|
uses: actions/cache@v1
|
|
with:
|
|
path: target
|
|
key: ${{ runner.os }}-rust-${{ matrix.toolchain }}-${{ matrix.target }}-cargo-build-target-${{ hashFiles('Cargo.lock') }}
|
|
|
|
- name: Install toolchain
|
|
uses: actions-rs/toolchain@v1
|
|
with:
|
|
target: ${{ matrix.target }}
|
|
toolchain: ${{ matrix.toolchain }}
|
|
override: true
|
|
|
|
- name: Run cargo build --no-default-features
|
|
working-directory: ecdsa
|
|
env:
|
|
CARGO_INCREMENTAL: 0
|
|
RUSTFLAGS: -D warnings
|
|
run: cargo build --no-default-features --release --target ${{ matrix.target }}
|
|
|
|
test:
|
|
strategy:
|
|
matrix:
|
|
platform:
|
|
- ubuntu-latest
|
|
- macos-latest
|
|
- windows-latest
|
|
toolchain:
|
|
- 1.40.0 # MSRV
|
|
- stable
|
|
runs-on: ${{ matrix.platform }}
|
|
steps:
|
|
- name: Checkout sources
|
|
uses: actions/checkout@v1
|
|
|
|
- name: Cache cargo registry
|
|
uses: actions/cache@v1
|
|
with:
|
|
path: ~/.cargo/registry
|
|
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('Cargo.lock') }}
|
|
|
|
- name: Cache cargo index
|
|
uses: actions/cache@v1
|
|
with:
|
|
path: ~/.cargo/git
|
|
key: ${{ runner.os }}-cargo-index-${{ hashFiles('Cargo.lock') }}
|
|
|
|
- name: Cache cargo build
|
|
uses: actions/cache@v1
|
|
with:
|
|
path: target
|
|
key: ${{ runner.os }}-rust-${{ matrix.toolchain }}-cargo-build-target-${{ hashFiles('Cargo.lock') }}
|
|
|
|
- name: Install toolchain
|
|
uses: actions-rs/toolchain@v1
|
|
with:
|
|
toolchain: ${{ matrix.toolchain }}
|
|
override: true
|
|
|
|
- name: Run cargo test --lib
|
|
working-directory: ecdsa
|
|
env:
|
|
CARGO_INCREMENTAL: 0
|
|
RUSTFLAGS: -D warnings
|
|
run: cargo test --lib --release
|
|
|
|
- name: Run cargo test --all-features
|
|
working-directory: ecdsa
|
|
env:
|
|
CARGO_INCREMENTAL: 0
|
|
RUSTFLAGS: -D warnings
|
|
run: cargo test --all-features --release
|