Skip to content

Commit

Permalink
improve ci (#52)
Browse files Browse the repository at this point in the history
  • Loading branch information
EdJoPaTo authored Mar 19, 2022
1 parent 952e774 commit dc97bd4
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 35 deletions.
3 changes: 1 addition & 2 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,8 @@ updates:
open-pull-requests-limit: 30
schedule:
interval: "weekly"
time: "03:37" # UTC
commit-message:
prefix: "chore(cargo):"
prefix: "build(cargo):"

- package-ecosystem: "github-actions"
directory: "/"
Expand Down
75 changes: 44 additions & 31 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,38 +4,39 @@ on:
push:
pull_request:
schedule:
# Check if it works with current dependencies (weekly on Wednesday 2:32 UTC)
- cron: '32 2 * * 3'
# Check if it works with current dependencies
- cron: '32 2 * * 3' # weekly on Wednesday 2:32 UTC

jobs:
test:
name: Test ${{ matrix.os }} ${{ matrix.toolchain }} ${{ matrix.features }}
name: Test ${{ matrix.toolchain }} ${{ matrix.os }} ${{ matrix.features }}
runs-on: ${{ matrix.os }}
continue-on-error: ${{ matrix.toolchain == 'nightly' }}
strategy:
fail-fast: false
matrix:
toolchain:
- stable
os:
- ubuntu-latest
- macos-latest
- windows-latest
toolchain:
- stable
clippyargs:
- -D clippy::pedantic -D warnings
features:
- --no-default-features
- "" # default features
- --all-features
include:
# Check future versions and maybe get some glances on soon to be lints
- os: ubuntu-latest
toolchain: beta
- toolchain: beta
os: ubuntu-latest
features: --all-features
clippyargs: -W clippy::pedantic -W clippy::cargo
- toolchain: nightly
os: ubuntu-latest
features: --all-features
- os: ubuntu-latest
toolchain: nightly
clippyargs: -W clippy::pedantic
features: --all-features

# Check the minimum supported Rust version (MSRV).
# Sometimes old rust versions don't yet have the lints (allow unknown) or don't have fixes in lints (false positives -> don't error, just warn).
Expand All @@ -44,8 +45,6 @@ jobs:
clippyargs: -A unknown-lints
features: --all-features
steps:
- uses: actions/checkout@v3

- name: Setup Rust
uses: actions-rs/toolchain@v1
with:
Expand All @@ -54,6 +53,14 @@ jobs:
profile: minimal
toolchain: ${{ matrix.toolchain }}

- uses: actions/checkout@v3

- name: Fetch dependencies
uses: actions-rs/cargo@v1
with:
command: fetch
args: --verbose

- name: Check clippy
uses: actions-rs/cargo@v1
with:
Expand All @@ -80,28 +87,26 @@ jobs:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
triple: x86_64-unknown-linux-gnu
- os: ubuntu-latest
triple: arm-unknown-linux-gnueabihf
- os: ubuntu-latest
triple: armv7-unknown-linux-gnueabihf
- os: ubuntu-latest
triple: aarch64-unknown-linux-gnu
- triple: x86_64-unknown-linux-gnu
os: ubuntu-latest
- triple: aarch64-unknown-linux-gnu
os: ubuntu-latest
- triple: armv7-unknown-linux-gnueabihf
os: ubuntu-latest
- triple: arm-unknown-linux-gnueabihf
os: ubuntu-latest

- os: macos-11
triple: x86_64-apple-darwin
- os: macos-11
triple: aarch64-apple-darwin
- triple: x86_64-apple-darwin
os: macos-latest
- triple: aarch64-apple-darwin
os: macos-latest

- os: windows-latest
triple: x86_64-pc-windows-msvc
- triple: x86_64-pc-windows-msvc
os: windows-latest
# https://github.com/briansmith/ring/issues/1167
# - os: windows-latest
# triple: aarch64-pc-windows-msvc
# - triple: aarch64-pc-windows-msvc
# os: windows-latest
steps:
- uses: actions/checkout@v3

- name: Setup Rust
uses: actions-rs/toolchain@v1
with:
Expand All @@ -110,7 +115,15 @@ jobs:
target: ${{ matrix.triple }}
toolchain: stable

- name: Build release
- uses: actions/checkout@v3

- name: Fetch dependencies
uses: actions-rs/cargo@v1
with:
command: fetch
args: --verbose

- name: Build
uses: actions-rs/cargo@v1
with:
command: build
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/style.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ jobs:
name: Rustfmt
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Setup Rust
uses: actions-rs/toolchain@v1
with:
Expand All @@ -19,6 +17,8 @@ jobs:
profile: minimal
components: rustfmt

- uses: actions/checkout@v3

- name: Check format
uses: actions-rs/cargo@v1
with:
Expand Down

0 comments on commit dc97bd4

Please sign in to comment.