2021-03-29 17:22:14 +00:00
|
|
|
name: Rust
|
|
|
|
|
2021-05-09 10:57:37 +00:00
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- '*'
|
|
|
|
tags-ignore:
|
|
|
|
- 'v*'
|
|
|
|
pull_request:
|
|
|
|
branches:
|
|
|
|
- '*'
|
2021-03-29 17:22:14 +00:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
test:
|
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
|
|
|
os: [ubuntu-latest, macos-latest]
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- uses: actions-rs/toolchain@v1
|
|
|
|
with:
|
|
|
|
profile: minimal
|
|
|
|
toolchain: stable
|
|
|
|
override: true
|
|
|
|
- name: Install Dependencies (if Ubuntu)
|
|
|
|
env:
|
|
|
|
ACCEPT_EULA: Y
|
|
|
|
run: sudo apt-get -y update && sudo apt-get install -f && sudo apt-get -y install libsqlite3-dev libclang-9-dev
|
|
|
|
if: contains(runner.os, 'Linux')
|
2022-02-01 04:42:26 +00:00
|
|
|
- uses: Swatinem/rust-cache@v1
|
2021-03-29 17:22:14 +00:00
|
|
|
- name: Build
|
|
|
|
uses: actions-rs/cargo@v1
|
|
|
|
with:
|
|
|
|
command: build
|
|
|
|
args: --verbose
|
|
|
|
- name: Test
|
|
|
|
uses: actions-rs/cargo@v1
|
|
|
|
with:
|
|
|
|
command: test
|
|
|
|
args: --verbose
|
2021-09-05 14:44:55 +00:00
|
|
|
- name: Test (IPv6)
|
|
|
|
uses: actions-rs/cargo@v1
|
|
|
|
with:
|
|
|
|
command: test
|
|
|
|
args: --features v6-test --verbose
|
2022-01-07 08:57:43 +00:00
|
|
|
|
2022-12-01 09:14:16 +00:00
|
|
|
fmt:
|
2022-01-07 08:57:43 +00:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- uses: actions-rs/toolchain@v1
|
|
|
|
with:
|
|
|
|
profile: minimal
|
|
|
|
toolchain: nightly
|
|
|
|
override: true
|
2022-12-01 09:14:16 +00:00
|
|
|
components: rustfmt
|
2022-01-07 08:57:43 +00:00
|
|
|
- name: Rustfmt
|
|
|
|
uses: actions-rs/cargo@v1
|
|
|
|
with:
|
|
|
|
command: fmt
|
|
|
|
args: --all -- --check
|
2022-12-01 09:14:16 +00:00
|
|
|
|
|
|
|
clippy:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- uses: actions-rs/toolchain@v1
|
|
|
|
with:
|
|
|
|
profile: minimal
|
|
|
|
toolchain: stable
|
|
|
|
override: true
|
|
|
|
components: clippy
|
2022-09-24 03:55:06 +00:00
|
|
|
- name: Clippy
|
|
|
|
uses: actions-rs/cargo@v1
|
|
|
|
with:
|
|
|
|
command: clippy
|
|
|
|
args: --all-targets -- -D warnings
|