Skip to content

Add config option for line endings. #118

Add config option for line endings.

Add config option for line endings. #118

Workflow file for this run

name: Build
on:
push:
branches:
- master
tags:
- 'v[0-9]+.[0-9]+.[0-9]+'
pull_request:
jobs:
format:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
submodules: true
- name: Setup Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
components: rustfmt
default: true
override: true
- name: Cargo cache
uses: actions/cache@v2
with:
path: |
~/.cargo/registry
~/.cargo/git
key: ${{ runner.os }}-cargo-rust_stable-${{ hashFiles('**/Cargo.toml') }}
- name: Format
uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check
doc:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
submodules: true
- name: Setup Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
components: rust-docs
default: true
override: true
- name: Cargo cache
uses: actions/cache@v2
with:
path: |
~/.cargo/registry
~/.cargo/git
key: ${{ runner.os }}-cargo-rust_stable-${{ hashFiles('**/Cargo.toml') }}
- name: Documentation
uses: actions-rs/cargo@v1
env:
DOCS_RS: 1
with:
command: doc
args: --all-features
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
with:
submodules: true
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
components: clippy
default: true
override: true
- name: Cargo cache
uses: actions/cache@v2
with:
path: |
~/.cargo/registry
~/.cargo/git
key: ${{ runner.os }}-cargo-rust_stable-${{ hashFiles('**/Cargo.toml') }}
- name: Build cache
uses: actions/cache@v2
with:
path: target
key: ${{ runner.os }}-build-rust_stable-check-${{ hashFiles('**/Cargo.toml') }}
- uses: actions-rs/clippy-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
args: --all --all-features
check-minimal:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
with:
submodules: true
- uses: actions-rs/toolchain@v1
with:
toolchain: nightly
profile: minimal
default: true
override: true
- name: Cargo cache
uses: actions/cache@v2
with:
path: |
~/.cargo/registry
~/.cargo/git
key: ${{ runner.os }}-cargo-rust_nightly-${{ hashFiles('**/Cargo.toml') }}
- name: Build cache
uses: actions/cache@v2
with:
path: target
key: ${{ runner.os }}-build-rust_nightly-check-minimal-${{ hashFiles('**/Cargo.toml') }}
- uses: actions-rs/cargo@v1
with:
command: check
args: --all --all-features -Z minimal-versions
test:
needs:
- format
- doc
- check
- check-minimal
strategy:
fail-fast: ${{ startsWith(github.ref, 'refs/tags/') }}
matrix:
rust: [stable, beta, nightly]
features:
- --no-default-features
- --no-default-features --features "test"
- --no-default-features --features "termcolor"
- '' # default
- --all-features
include:
- rust: stable
- rust: beta
- rust: nightly
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
submodules: true
- uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.rust }}
profile: minimal
default: true
override: true
- name: Cargo cache
uses: actions/cache@v2
with:
path: |
~/.cargo/registry
~/.cargo/git
key: ${{ runner.os }}-cargo-rust_stable-${{ hashFiles('**/Cargo.toml') }}
- name: Build cache
uses: actions/cache@v2
with:
path: target
key: ${{ runner.os }}-build-rust_stable-check-${{ hashFiles('**/Cargo.toml') }}
- name: Update deps
uses: actions-rs/cargo@v1
with:
command: update
- name: Test
uses: actions-rs/cargo@v1
env:
RUST_BACKTRACE: full
with:
command: test
args: --all ${{ matrix.features }}
tarpaulin:
needs:
- format
- doc
- check
- check-minimal
- test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
submodules: true
- name: Setup Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- name: Run cargo-tarpaulin
uses: actions-rs/tarpaulin@v0.1
with:
args: '--all-features --out Lcov'
- name: upload to Coveralls
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-lcov: './lcov.info'
publish:
if: github.repository == 'Drakulix/simplelog.rs' && startsWith(github.ref, 'refs/tags/')
needs:
- format
- doc
- check
- check-minimal
- test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
submodules: true
- name: Setup Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- name: Publish crates
uses: katyo/publish-crates@v1
with:
registry-token: ${{ secrets.CRATES_TOKEN }}