-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enable CI by setting several configs
- Loading branch information
Martijn
committed
May 18, 2022
1 parent
eb2e177
commit b74cdf4
Showing
8 changed files
with
219 additions
and
0 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,16 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: cargo | ||
directory: "/" | ||
schedule: | ||
interval: daily | ||
open-pull-requests-limit: 10 | ||
labels: | ||
- C-dependency-update | ||
- package-ecosystem: github-actions | ||
directory: "/" | ||
schedule: | ||
interval: daily | ||
open-pull-requests-limit: 10 | ||
labels: | ||
- C-dependency-update |
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: "ci-fmt" | ||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- master | ||
- main | ||
- staging # for Bors | ||
- trying # for Bors | ||
jobs: | ||
fmt: | ||
name: fmt | ||
runs-on: ubuntu-18.04 | ||
steps: | ||
- name: checkout_repository | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 1 | ||
|
||
- name: install_rust | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: stable | ||
override: true | ||
profile: minimal | ||
|
||
- name: install_rustfmt | ||
run: rustup component add rustfmt | ||
|
||
- name: check_formatting | ||
run: | | ||
cargo fmt -- --check |
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,23 @@ | ||
name: "ci-licenses_and_advisories" | ||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- master | ||
- main | ||
- staging # for Bors | ||
- trying # for Bors | ||
jobs: | ||
licenses_and_advisories: | ||
name: licenses_and_advisories | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
checks: | ||
- advisories | ||
- bans licenses sources | ||
|
||
continue-on-error: ${{ matrix.checks == 'advisories' }} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: EmbarkStudios/cargo-deny-action@v1 |
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,37 @@ | ||
name: "ci-linter" | ||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- master | ||
- main | ||
- staging # for Bors | ||
- trying # for Bors | ||
jobs: | ||
linter: | ||
name: linter | ||
runs-on: ubuntu-latest | ||
continue-on-error: true | ||
steps: | ||
- name: checkout_repo | ||
uses: actions/checkout@v3 | ||
|
||
- name: install_rust | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: stable | ||
override: true | ||
profile: minimal | ||
components: clippy | ||
|
||
- name: check_clippy | ||
uses: actions-rs/clippy-check@v1 | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
args: --all-features --all-targets --workspace | ||
|
||
- name: check_clippy_no_default_features | ||
uses: actions-rs/clippy-check@v1 | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
args: --no-default-features --all-targets --workspace |
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,31 @@ | ||
name: "ci-msrv" | ||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- master | ||
- main | ||
- staging # for Bors | ||
- trying # for Bors | ||
schedule: | ||
- cron: '00 05 * * *' | ||
jobs: | ||
msrv: | ||
name: msrv | ||
runs-on: ubuntu-latest | ||
continue-on-error: true | ||
steps: | ||
- name: checkout_repo | ||
uses: actions/checkout@v2 | ||
- name: install_rust | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: stable | ||
override: true | ||
profile: minimal | ||
- name: install_cargo_msrv | ||
run: cargo install cargo-msrv --no-default-features | ||
- name: version_of_cargo_msrv | ||
run: cargo msrv --version | ||
- name: run_cargo_msrv | ||
run: cargo msrv --ignore-lockfile --output-format json verify -- cargo check |
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,63 @@ | ||
name: "ci-test" | ||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- master | ||
- main | ||
- staging # for Bors | ||
- trying # for Bors | ||
schedule: | ||
- cron: '00 05 * * *' | ||
jobs: | ||
test: | ||
name: test | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
build: [ubuntu-stable, macos-stable, win-gnu-stable, win-msvc-stable, ubuntu-beta, ubuntu-nightly] | ||
include: | ||
- build: ubuntu-stable | ||
os: ubuntu-latest | ||
rust: stable | ||
|
||
- build: macos-stable | ||
os: macOS-latest | ||
rust: stable | ||
|
||
- build: win-gnu-stable | ||
os: windows-latest | ||
rust: stable-x86_64-gnu | ||
|
||
- build: win-msvc-stable | ||
os: windows-latest | ||
rust: stable | ||
|
||
- build: ubuntu-beta | ||
os: ubuntu-latest | ||
rust: beta | ||
|
||
- build: ubuntu-nightly | ||
os: ubuntu-latest | ||
rust: nightly | ||
steps: | ||
- name: checkout_repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: install_rust | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: ${{ matrix.rust }} | ||
override: true | ||
profile: minimal | ||
|
||
- name: fetch | ||
run: cargo fetch --verbose | ||
|
||
- name: build | ||
run: cargo build --verbose | ||
|
||
- name: test | ||
run: cargo test --verbose | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
[licenses] | ||
unlicensed = "deny" | ||
copyleft = "deny" | ||
confidence-threshold = 0.925 | ||
allow = [ | ||
"Apache-2.0", | ||
"MIT", | ||
] | ||
|
||
[advisories] | ||
vulnerability = "deny" | ||
unmaintained = "deny" | ||
notice = "deny" | ||
ignore = [] |