Skip to content
Merged
Show file tree
Hide file tree
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
4 changes: 2 additions & 2 deletions .github/actions/setup-equilibrium/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
os: [ubuntu-latest, macos-latest]

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5

- name: Setup Equilibrium
uses: tschk/equilibrium/.github/actions/setup-equilibrium@main
Expand Down Expand Up @@ -52,7 +52,7 @@ jobs:

## Supported Compilers

- **Zig**: Installed via goto-bus-stop/setup-zig@v2
- **Zig**: Installed via mlugg/setup-zig@v2
- **Nim**: Installed via apt (Ubuntu) or brew (macOS)
- **D (LDC)**: Installed via apt (Ubuntu) or brew (macOS)
- **C/C++**: Already available on all platforms
Expand Down
14 changes: 4 additions & 10 deletions .github/actions/setup-equilibrium/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,20 +33,14 @@ runs:
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ inputs.rust-version }}

- name: Cache cargo
if: inputs.cache == 'true'
uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-equilibrium-${{ hashFiles('**/Cargo.lock') }}

uses: Swatinem/rust-cache@v2

- name: Install Zig
if: inputs.install-zig == 'true'
uses: goto-bus-stop/setup-zig@v2
uses: mlugg/setup-zig@v2
with:
version: 0.13.0

Expand Down
77 changes: 41 additions & 36 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,100 +6,105 @@ on:
pull_request:
branches: [ main ]

permissions:
contents: read

env:
CARGO_TERM_COLOR: always
RUSTFLAGS: -D warnings

jobs:
test:
name: Test Suite
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
rust: [stable]

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5

- name: Install Rust
uses: dtolnay/rust-toolchain@master
uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{ matrix.rust }}

- name: Cache cargo registry
uses: actions/cache@v4
with:
path: ~/.cargo/registry
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}

- name: Cache cargo build
uses: actions/cache@v4
with:
path: target
key: ${{ runner.os }}-cargo-build-${{ hashFiles('**/Cargo.lock') }}

components: clippy, rustfmt

- name: Cache cargo
uses: Swatinem/rust-cache@v2

- name: Check formatting
run: cargo fmt --all -- --check
if: matrix.os == 'ubuntu-latest'

- name: Run tests
run: cargo test --all-features

- name: Run clippy
run: cargo clippy --all-features -- -D warnings
run: cargo clippy --all-targets --all-features -- -D warnings
if: matrix.os == 'ubuntu-latest'

compiler-detection:
name: Compiler Detection
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5

- name: Install Rust
uses: dtolnay/rust-toolchain@stable


- name: Cache cargo
uses: Swatinem/rust-cache@v2

- name: Install Zig
uses: goto-bus-stop/setup-zig@v2
uses: mlugg/setup-zig@v2
with:
version: 0.13.0

- name: Install Nim (Ubuntu)
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install -y nim

- name: Install Nim (macOS)
if: runner.os == 'macOS'
run: brew install nim

- name: Install D compiler (Ubuntu)
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install -y ldc

- name: Install D compiler (macOS)
if: runner.os == 'macOS'
run: brew install ldc

- name: Run tests with multiple compilers
run: cargo test --all-features

docs:
name: Documentation
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5

- name: Install Rust
uses: dtolnay/rust-toolchain@stable


- name: Cache cargo
uses: Swatinem/rust-cache@v2

- name: Build docs
run: cargo doc --all-features --no-deps

- name: Check docs links
run: cargo doc --all-features --no-deps
env:
RUSTDOCFLAGS: -D warnings
Loading