Skip to content

Clean up CI workflow #8

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Apr 21, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 33 additions & 6 deletions .github/workflows/test-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ on:

env:
CARGO_TERM_COLOR: always
CARGO_NET_RETRY: 10
RUSTC_WRAPPER: sccache
RUST_BACKTRACE: 1
# Enable parallel compilation
RUSTC_PARALLEL_COMPILER: true

jobs:
build:
Expand All @@ -15,11 +20,11 @@ jobs:
os: [macos-14, macos-latest, windows-latest]
include:
- os: macos-14
name: "macOS ARM"
name: 'macOS ARM'
- os: macos-latest
name: "macOS x86"
name: 'macOS x86'
- os: windows-latest
name: "Windows"
name: 'Windows'

runs-on: ${{ matrix.os }}

Expand All @@ -28,8 +33,30 @@ jobs:
with:
submodules: recursive

- name: Build
run: cargo build
# Install and setup sccache
- name: Install sccache
uses: mozilla-actions/[email protected]

# Setup Rust toolchain with caching
- name: Setup Rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable

# Cache dependencies and build outputs
- name: Cache cargo registry
uses: actions/cache@v3
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-

- name: Run tests
run: cargo test
uses: actions-rs/cargo@v1
with:
command: test
Loading