-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
18 changed files
with
664 additions
and
76 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: cargo | ||
directory: "/" | ||
schedule: | ||
interval: daily | ||
open-pull-requests-limit: 10 | ||
allow: | ||
- dependency-type: direct | ||
- dependency-type: indirect |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
on: | ||
push: | ||
pull_request: | ||
|
||
jobs: | ||
test: | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: ${{ matrix.target == 'i686-pc-windows-gnu' && format('{0}-i686-pc-windows-gnu', matrix.channel) || matrix.channel }} | ||
target: ${{ matrix.target }} | ||
override: true | ||
components: rustfmt | ||
- uses: actions-rs/cargo@v1 | ||
with: | ||
command: fmt | ||
args: --all -- --check | ||
- name: Run cargo release test | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
command: test | ||
args: --release --all | ||
env: | ||
CHANNEL: ${{ matrix.channel }} | ||
CROSS: ${{ !startsWith(matrix.target, 'x86_64') && contains(matrix.target, 'linux') && '1' || '0' }} | ||
TARGET: ${{ matrix.target }} | ||
NO_RUN: ${{ matrix.no_run }} | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
target: [ | ||
x86_64-unknown-linux-gnu, | ||
i686-unknown-linux-gnu, | ||
aarch64-unknown-linux-gnu, | ||
armv7-unknown-linux-gnueabihf, | ||
riscv64gc-unknown-linux-gnu, | ||
mips64-unknown-linux-muslabi64, | ||
loongarch64-unknown-linux-gnu, | ||
s390x-unknown-linux-gnu, | ||
|
||
x86_64-apple-darwin, | ||
aarch64-apple-darwin, | ||
|
||
x86_64-pc-windows-gnu, | ||
x86_64-pc-windows-msvc, | ||
i686-pc-windows-gnu, | ||
i686-pc-windows-msvc, | ||
] | ||
channel: [stable, nightly] | ||
include: | ||
- target: x86_64-unknown-linux-gnu | ||
os: ubuntu-latest | ||
- target: i686-unknown-linux-gnu | ||
os: ubuntu-latest | ||
- target: aarch64-unknown-linux-gnu | ||
os: ubuntu-latest | ||
- target: armv7-unknown-linux-gnueabihf | ||
os: ubuntu-latest | ||
- target: riscv64gc-unknown-linux-gnu | ||
os: ubuntu-latest | ||
- target: mips64-unknown-linux-muslabi64 | ||
os: ubuntu-latest | ||
- target: loongarch64-unknown-linux-gnu | ||
os: ubuntu-latest | ||
- target: s390x-unknown-linux-gnu | ||
os: ubuntu-latest | ||
|
||
- target: x86_64-apple-darwin | ||
os: macos-latest | ||
- target: aarch64-apple-darwin | ||
os: macos-latest | ||
|
||
- target: x86_64-pc-windows-msvc | ||
os: windows-latest | ||
- target: x86_64-pc-windows-gnu | ||
os: windows-latest | ||
- target: i686-pc-windows-msvc | ||
os: windows-latest | ||
- target: i686-pc-windows-gnu | ||
os: windows-latest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
name: Code Coverage | ||
|
||
on: | ||
push: | ||
paths-ignore: | ||
- '**.md' | ||
- '**.png' | ||
|
||
env: | ||
RUST_TOOLCHAIN: nightly | ||
TOOLCHAIN_PROFILE: minimal | ||
|
||
jobs: | ||
coverage: | ||
name: Run cargo coverage | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout sources | ||
uses: actions/checkout@v2 | ||
- name: Install toolchain | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
profile: ${{ env.TOOLCHAIN_PROFILE }} | ||
toolchain: ${{ env.RUST_TOOLCHAIN }} | ||
override: true | ||
components: llvm-tools-preview | ||
- name: Install grcov | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
command: install | ||
args: grcov | ||
- name: Cache | ||
uses: Swatinem/rust-cache@v1 | ||
- name: Run cargo test | ||
run: sudo bash -c "ulimit -Sl 512 && ulimit -Hl 512 && sudo -u runner RUSTUP_TOOLCHAIN=nightly RUSTFLAGS="-Zinstrument-coverage" LLVM_PROFILE_FILE="coverage-%p-%m.profraw" RUST_BACKTRACE=1 /home/runner/.cargo/bin/cargo test --all-features" | ||
- name: Run grcov | ||
run: grcov . --binary-path ./target/debug/ -s . -t lcov --branch --ignore-not-existing --ignore "*cargo*" -o lcov.info | ||
- name: Upload coverage | ||
run: bash <(curl -s https://codecov.io/bash) -f lcov.info |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
name: Pull Request Security Audit | ||
|
||
on: | ||
push: | ||
paths: | ||
- '**/Cargo.toml' | ||
pull_request: | ||
paths: | ||
- '**/Cargo.toml' | ||
|
||
jobs: | ||
security-audit: | ||
runs-on: ubuntu-latest | ||
if: "!contains(github.event.head_commit.message, 'ci skip')" | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Install cargo-audit | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
command: install | ||
args: cargo-audit | ||
|
||
- name: Generate lockfile | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
command: generate-lockfile | ||
|
||
- name: Audit dependencies | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
command: audit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.