github/ci: Enable Rust cache for faster rebuilds.

This commit is contained in:
parazyd
2022-01-14 13:21:56 +01:00
parent 127efd4571
commit 183e104987
2 changed files with 23 additions and 11 deletions

View File

@@ -3,12 +3,11 @@ name: CI Checks
on: [push, pull_request]
jobs:
test:
name: Test on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
test-units:
strategy:
matrix:
os: [ubuntu-latest]
os: [ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
@@ -17,12 +16,20 @@ jobs:
toolchain: stable
override: true
- name: Install dependencies
- uses: Swatinem/rust-cache@v1
- name: Install dependencies (Linux)
run: |
sudo apt update
sudo apt -y install build-essential clang libclang-dev llvm-dev libudev-dev pkg-config
if: matrix.os == 'ubuntu-latest'
- name: Run tests
- name: Install dependencies (macOS)
run: |
brew install llvm
if: matrix.os == 'macos-latest'
- name: Run test units
run: |
make test
@@ -31,7 +38,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
os: [ubuntu-latest, macos-latest]
steps:
- uses: actions/checkout@v2
@@ -40,11 +47,18 @@ jobs:
toolchain: stable
override: true
- uses: taiki-e/install-action@cargo-hack
- uses: Swatinem/rust-cache@v1
- name: Install dependencies
- name: Install dependencies (Linux)
run: |
sudo apt update
sudo apt -y install build-essential clang libclang-dev llvm-dev libudev-dev pkg-config
if: matrix.os == 'ubuntu-latest'
- name: Install dependencies (macOS)
run: |
brew install llvm
if: matrix.os == 'macos-latest'
- name: Run feature powerset builds
run: |
@@ -63,5 +77,3 @@ jobs:
- run: |
rustup component add rustfmt
cargo fmt -- --check