Bump image from 0.24.9 to 0.25.0 #85
Workflow file for this run
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
name: CI | |
on: | |
pull_request: | |
branches-ignore: | |
- gh-pages | |
- dependabot/* | |
push: | |
branches-ignore: | |
- gh-pages | |
- dependabot/* | |
env: | |
CARGO_TERM_COLOR: always | |
RUST_BACKTRACE: full | |
jobs: | |
tests: | |
name: Check code (${{ matrix.os }}, rust-${{ matrix.rust }}) | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest, macos-latest, windows-latest] | |
rust: [stable, beta] | |
include: | |
- os: ubuntu-latest | |
sccache-path: /home/runner/.cache/sccache | |
- os: macos-latest | |
sccache-path: /Users/runner/Library/Caches/Mozilla.sccache | |
- os: windows-latest | |
sccache-path: "C:\\Users\\runner\\AppData\\Local\\Mozilla\\sccache\\cache" | |
env: | |
CARGO_INCREMENTAL: false | |
RUSTC_WRAPPER: sccache | |
RUSTV: ${{ matrix.rust }} | |
SCCACHE_CACHE_SIZE: 5G | |
SCCACHE_DIR: ${{ matrix.sccache-path }} | |
# SCCACHE_RECACHE: 1 # Uncomment this to clear cache, then comment it back out | |
steps: | |
- name: Install sccache (ubuntu-latest) | |
if: matrix.os == 'ubuntu-latest' | |
env: | |
LINK: https://github.com/mozilla/sccache/releases/download | |
SCCACHE_VERSION: v0.2.15 | |
run: | | |
SCCACHE_FILE=sccache-$SCCACHE_VERSION-x86_64-unknown-linux-musl | |
mkdir -p $HOME/.local/bin | |
curl -L "$LINK/$SCCACHE_VERSION/$SCCACHE_FILE.tar.gz" | tar xz | |
mv -f $SCCACHE_FILE/sccache $HOME/.local/bin/sccache | |
chmod +x $HOME/.local/bin/sccache | |
echo "$HOME/.local/bin" >> $GITHUB_PATH | |
- name: Install sccache (macos-latest) | |
if: matrix.os == 'macos-latest' | |
run: | | |
brew update | |
brew install sccache | |
- name: Install sccache (windows-latest) | |
if: matrix.os == 'windows-latest' | |
env: | |
LINK: https://github.com/mozilla/sccache/releases/download | |
SCCACHE_VERSION: v0.2.15 | |
run: | | |
$SCCACHE_FILE = "sccache-$env:SCCACHE_VERSION-x86_64-pc-windows-msvc" | |
New-Item -ItemType Directory -Force $HOME/.local/bin | |
$TEMP_FILE = New-TemporaryFile | |
curl -L "$env:LINK/$env:SCCACHE_VERSION/$SCCACHE_FILE.tar.gz" --output $TEMP_FILE | |
Start-Process -FilePath tar -ArgumentList "-xOzvf", "$TEMP_FILE", "*/sccache.exe" -RedirectStandardOutput "$HOME/.local/bin/sccache.exe" | |
echo "$HOME/.local/bin" >> $env:GITHUB_PATH | |
- name: Install Rust ${{ matrix.rust }} | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: ${{ matrix.rust }} | |
profile: minimal | |
override: true | |
components: rustfmt, clippy | |
- name: Checkout repo | |
uses: actions/checkout@v2 | |
- name: Cache cargo registry | |
uses: actions/cache@v2 | |
continue-on-error: false | |
with: | |
path: | | |
~/.cargo/registry | |
~/.cargo/git | |
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} | |
restore-keys: | | |
${{ runner.os }}-cargo- | |
- name: Save sccache | |
uses: actions/cache@v2 | |
continue-on-error: false | |
with: | |
path: ${{ matrix.sccache-path }} | |
key: ${{ runner.os }}-sccache-${{ hashFiles('**/Cargo.lock') }} | |
restore-keys: | | |
${{ runner.os }}-sccache- | |
- name: Start sccache server | |
run: sccache --start-server | |
- name: Build the crate | |
uses: actions-rs/cargo@v1 | |
with: | |
command: build | |
- name: Test the crate | |
uses: actions-rs/cargo@v1 | |
with: | |
command: test | |
- name: Print sccache stats | |
run: sccache --show-stats | |
- name: Stop sccache server | |
run: sccache --stop-server || true | |
clippy: | |
name: Lint code with clippy | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
steps: | |
- name: Install Rust | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
profile: minimal | |
override: true | |
components: clippy | |
- name: Checkout repo | |
uses: actions/checkout@v2 | |
- name: Cache cargo registry | |
uses: actions/cache@v2 | |
continue-on-error: false | |
with: | |
path: | | |
~/.cargo/registry | |
~/.cargo/git | |
key: clippy-cargo-${{ hashFiles('**/Cargo.lock') }} | |
restore-keys: | | |
clippy-cargo- | |
- name: Run clippy with annotations | |
if: (github.event.pull_request.head.repo.full_name == github.repository && github.actor != 'dependabot[bot]') || github.event_name == 'push' | |
uses: actions-rs/clippy-check@v1 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
args: --all-features | |
- name: Run clippy manually without annotations | |
if: (github.event.pull_request.head.repo.full_name != github.repository || github.actor == 'dependabot[bot]') && github.event_name != 'push' | |
uses: actions-rs/cargo@v1 | |
with: | |
command: clippy | |
args: --all-features | |
format: | |
name: Check correct code formatting | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
steps: | |
- name: Install Rust | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
profile: minimal | |
override: true | |
components: rustfmt | |
- name: Checkout repo | |
uses: actions/checkout@v2 | |
- name: Cache cargo registry | |
uses: actions/cache@v2 | |
continue-on-error: false | |
with: | |
path: | | |
~/.cargo/registry | |
~/.cargo/git | |
key: rustfmt-cargo-${{ hashFiles('**/Cargo.lock') }} | |
restore-keys: | | |
clippy-cargo- | |
- name: Run format check | |
uses: actions-rs/cargo@v1 | |
with: | |
command: fmt | |
args: --all --check | |