Skip to content

⬆️ Update 🦀 Rust Crate rustversion to 1.0.14 #549

⬆️ Update 🦀 Rust Crate rustversion to 1.0.14

⬆️ Update 🦀 Rust Crate rustversion to 1.0.14 #549

Workflow file for this run

name: Pull Request
on:
pull_request:
types: [opened, edited, synchronize]
paths-ignore:
- LICENSE.md
- .gitignore
- Justfile
jobs:
format:
name: Formatting
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3
- name: Setup Rust Toolchain
uses: dtolnay/rust-toolchain@master
with:
components: rustfmt
toolchain: stable
override: true
profile: minimal
- name: Check Formatting
run: cargo fmt -- --check
lint:
name: Lint Source
runs-on: ubuntu-latest
strategy:
matrix:
features:
- name: Default
args: ''
- name: No Standard
args: --no-default-features
- name: All Features
args: --all-features
- name: Report
args: --features report
- name: Unstable
args: --features unstable
- name: Nightly
args: --features nightly
steps:
- name: Checkout
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3
- name: Setup Rust Toolchain
uses: dtolnay/rust-toolchain@master # renovate: tag=v1
with:
components: clippy
toolchain: stable
- name: Clippy
uses: giraffate/clippy-action@13b9d32482f25d29ead141b79e7e04e7900281e0 # v1
test:
name: Test Suite
runs-on: ${{matrix.os}}-latest
needs: [lint, format]
defaults:
run:
shell: bash
strategy:
matrix:
toolchain: [stable, beta, nightly]
profile: [release, dev]
# One day we'll be able to just use `--profile`, but until then we need
# to do this workaround to simplify the build steps
os: [ubuntu, windows, macos]
env:
SCCACHE_CACHE_SIZE: 5G
steps:
- name: Checkout
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3
- name: Authenticate GitHub CLI
run: echo ${{github.token}} | gh auth login --with-token
- name: Setup Rust Toolchain
uses: dtolnay/rust-toolchain@master # renovate: tag=v1
with:
toolchain: ${{matrix.toolchain}}
override: true
profile: minimal
- name: Setup Shared Compilation Cache
uses: baptiste0928/cargo-install@30f432979e99f3ea66a8fa2eede53c07063995d8 # v2
with:
crate: sccache
- name: Setup Cargo Hack
uses: bruxisma/setup-cargo-hack@1d7117a0b3be8457283a783e4065b7ba649c5d54 # renovate: tag=v1
- name: Setup Shared Cache Directory
run: |
declare path="${HOME}/.cache/sccache"
if test "${RUNNER_OS}" = "Windows"; then
path=$(cygpath --windows "${path}")
fi
echo "SCCACHE_DIR=${path}" >> "${GITHUB_ENV}"
- name: Restore Cargo Cache
uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3
with:
restore-keys: ${{runner.os}}-cargo-
key: ${{runner.os}}-cargo-${{hashFiles('**/Cargo.lock')}}
path: |
${{github.workspace}}/target
~/.cargo/registry/index
~/.cargo/registry/cache
~/.cargo/git
- name: Restore sccache build artifacts
uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3
with:
restore-keys: ${{runner.os}}-${{matrix.toolchain}}-${{matrix.profile}}-
key: ${{runner.os}}-${{matrix.toolchain}}-${{matrix.profile}}-${{hashFiles('**/Cargo.lock')}}
path: ${{env.SCCACHE_DIR}}
- name: Run Tests (${{matrix.profile}})
run: cargo hack test --profile ${{matrix.profile}} --locked --each-feature
env:
RUSTC_WRAPPER: sccache