Skip to content

Commit abca011

Browse files
committed
ci: enable cross-platform builds with caching
- Add matrix strategy for Ubuntu, Windows, and macOS - Add Cargo cache to speed up subsequent builds - Remove duplicate runs-on configuration
1 parent 63a8ccf commit abca011

1 file changed

Lines changed: 27 additions & 1 deletion

File tree

.github/workflows/ci.yml

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,19 @@
11
name: BMI-Calculator CI
22

3+
# What one CI file can do:
4+
5+
# Run tests on 3 operating systems simultaneously
6+
# Generate code coverage and upload to codecov
7+
# Scan dependencies for security vulnerabilities
8+
# Run performance benchmarks and compare to baseline
9+
# Build binaries for Windows, Mac, Linux
10+
# Create GitHub release with changelog
11+
# Upload binaries as release assets
12+
# Send Slack notification on success/failure
13+
# Deploy to staging environment
14+
# Run integration tests against live environment
15+
# Auto-merge if all checks pass
16+
317
on:
418
push:
519
branches: [main]
@@ -8,11 +22,23 @@ on:
822

923
jobs:
1024
build:
11-
runs-on: "ubuntu-latest"
25+
strategy:
26+
matrix:
27+
os: [ubuntu-latest, windows-latest, macos-latest]
28+
runs-on: ${{ matrix.os }}
1229

1330
steps:
1431
- uses: actions/checkout@v4
1532

33+
- name: Cache
34+
uses: actions/cache@v4
35+
with:
36+
path: |
37+
~/.cargo/registry
38+
~/.cargo/git
39+
target
40+
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
41+
1642
- name: Install Rust
1743
uses: dtolnay/rust-toolchain@stable
1844

0 commit comments

Comments
 (0)