Files
RustCrypto-signatures/.github/workflows/ed25519.yml
T
Tony Arcieri a1ae696733 Switch to GitHub Actions
Uses Rust actions from https://github.com/actions-rs
2020-03-16 10:42:18 -07:00

112 lines
2.9 KiB
YAML

name: ed25519
on:
pull_request:
paths:
- "ed25519/**"
- "Cargo.*"
push:
branches: master
paths:
- "ed25519/**"
- "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: ed25519
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: ed25519
env:
CARGO_INCREMENTAL: 0
RUSTFLAGS: -D warnings
run: cargo test --lib --release
- name: Run cargo test --all-features
working-directory: ed25519
env:
CARGO_INCREMENTAL: 0
RUSTFLAGS: -D warnings
run: cargo test --all-features --release