2021-03-23 01:46:50 +01:00
|
|
|
name: Build and check
|
|
|
|
|
|
|
|
on: [push, pull_request]
|
|
|
|
|
|
|
|
env:
|
|
|
|
CARGO_TERM_COLOR: always
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
with:
|
|
|
|
submodules: true
|
|
|
|
- uses: actions/cache@v2
|
|
|
|
with:
|
|
|
|
path: |
|
|
|
|
~/.cargo/registry
|
|
|
|
~/.cargo/git
|
|
|
|
target
|
|
|
|
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
|
2021-03-25 01:28:03 +01:00
|
|
|
- name: Generate key pair
|
2021-03-25 01:12:21 +01:00
|
|
|
run: |
|
|
|
|
openssl genpkey -algorithm x25519 -out x25519_private_key.pem
|
|
|
|
openssl pkey -in x25519_private_key.pem -pubout -out x25519_public_key.pem
|
2021-03-23 01:46:50 +01:00
|
|
|
- name: Build
|
|
|
|
run: cargo check --verbose --release
|
|
|
|
- name: Run tests
|
|
|
|
run: cargo test --verbose
|
|
|
|
- name: Check formatting
|
2021-03-25 01:28:03 +01:00
|
|
|
run: |
|
|
|
|
rustup install nightly
|
|
|
|
cargo +nightly fmt -- --check
|