Skip to content

Implemented Github Actions for Mac and Added Mac Compatibility #10

Implemented Github Actions for Mac and Added Mac Compatibility

Implemented Github Actions for Mac and Added Mac Compatibility #10

Workflow file for this run

name: Rust CI on Mac
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
workflow_dispatch:
env:
CARGO_TERM_COLOR: always
jobs:
build:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- name: Cache Cargo registry and build artifacts
uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-
- name: Set up Rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- name: Build
run: cargo build --verbose
- name: Run tests
run: cargo test --verbose
- name: Build examples
run: |
for example in $(ls examples/*.rs); do
name=$(basename "$example" .rs)
echo "Building example: $name"
cargo build --example "$name" --verbose
done