Skip to content

Prek/encrypted

Prek/encrypted #194

Workflow file for this run

name: CI
on:
push:
branches:
- main
pull_request:
branches:
- main
- release/*
env:
rust_stable: 1.71.1
jobs:
build:
name: Build
env:
RUSTFLAGS: "-D warnings -C opt-level=z -C target-cpu=x86-64 -C debuginfo=1"
X86_64_PC_WINDOWS_MSVC_OPENSSL_DIR: c:/vcpkg/installed/x64-windows
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-latest, windows-latest, ubuntu-latest]
steps:
- name: Checkout
uses: actions/checkout@v1
- name: Install Rust ${{ env.rust_stable }}
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ env.rust_stable }}
components: rustfmt, clippy
- name: Cache cargo registry
uses: actions/cache@v1
if: matrix.os != 'macos-latest'
with:
path: ~/.cargo/registry
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-registry-
- name: Cache cargo index
uses: actions/cache@v1
if: matrix.os != 'macos-latest'
with:
path: ~/.cargo/git
key: ${{ runner.os }}-cargo-index-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-index-
- name: Cache cargo build
uses: actions/cache@v1
if: matrix.os != 'macos-latest'
with:
path: target
key: ${{ runner.os }}-cargo-build-target1-${{ hashFiles('**/Cargo.lock') }}
- name: cargo fmt
uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check
- name: Cache vcpkg's artifacts
uses: actions/cache@v1
if: matrix.os == 'windows-latest'
with:
path: c:/vcpkg/installed
key: vcpkg-${{ runner.os }}-v0
restore-keys: |
vcpkg-${{ runner.os }}-
- name: cargo test
uses: actions-rs/cargo@v1
with:
command: test
args: --workspace
- name: cargo build
uses: actions-rs/cargo@v1
with:
command: build
args: --workspace
- name: cargo build router
uses: actions-rs/cargo@v1
with:
command: build
args: --manifest-path crates/router/Cargo.toml --bin ya-sb-router --features bin