Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add GitHub actions for CI #13

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
67 changes: 67 additions & 0 deletions .github/workflows/continuous_integration.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
name: Continuous integration

on:
push:
branches:
- master
pull_request:
branches:
- master

env:
CARGO_TERM_COLOR: always

jobs:
build:
runs-on: ${{ matrix.runner_os }}
strategy:
matrix:
target:
- x86_64-unknown-linux-gnu
- x86_64-apple-darwin
- x86_64-pc-windows-msvc
include:
- target: x86_64-unknown-linux-gnu
runner_os: ubuntu-latest
- target: x86_64-apple-darwin
runner_os: macos-latest
- target: x86_64-pc-windows-msvc
runner_os: windows-latest

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal

- name: Generate Cargo.lock
uses: actions-rs/cargo@v1
with:
command: generate-lockfile

- name: Build tests with all features enabled
uses: actions-rs/cargo@v1
with:
command: test
args: --workspace --locked --all-features --no-run

- name: Run tests with all features enabled
uses: actions-rs/cargo@v1
with:
command: test
args: --workspace --locked --all-features -- --nocapture --quiet

- name: Build workspace documentation with all features enabled
uses: actions-rs/cargo@v1
with:
command: doc
args: --workspace --locked --all-features

- name: Build release with default features
uses: actions-rs/cargo@v1
with:
command: build
args: --locked --profile release
1 change: 1 addition & 0 deletions rust-toolchain
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
stable