Skip to content

Commit

Permalink
do dah doo
Browse files Browse the repository at this point in the history
  • Loading branch information
ahdinosaur committed Sep 28, 2023
1 parent ac406be commit 2066505
Show file tree
Hide file tree
Showing 10 changed files with 41 additions and 85 deletions.
117 changes: 32 additions & 85 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,104 +10,51 @@ on:

env:
RUSTFLAGS: -Dwarnings
CARGO_TERM_COLOR: always

jobs:
fmt_and_doc:
name: Cargo fmt & doc
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1

- name: Cache docs cargo dependencies
uses: actions/cache@v3
with:
path: |
~/.cargo/crates.toml
~/.cargo/crates2.json
~/.package-cache
~/.cargo/bin/
~/.cargo/binstall/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-docs-cargo-${{ hashFiles('**/Cargo.lock') }}

- name: Install Rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
components: rustfmt
override: true
- name: rustfmt
run: cargo fmt --all -- --check
- name: docs
run: cargo doc --no-deps

build_and_test:
name: Build & Test
runs-on: ${{ matrix.os }}
strategy:
matrix:
rust: [stable]
# os: [ubuntu-latest, macOS-latest, windows-latest]
os: [ubuntu-latest]
toolchain:
- stable
- 1.70.0 # msrv

steps:
- uses: actions/checkout@v1

- name: Cache build cargo dependencies on ${{ matrix.os }}
uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-build-cargo-${{ hashFiles('**/Cargo.lock') }}

- name: Install Rust
uses: actions-rs/toolchain@v1
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
profile: minimal
toolchain: ${{ matrix.rust }}
target: wasm32-unknown-unknown
components: clippy
override: true
- name: Clippy
run: cargo clippy --all -- -D warnings
- name: Run tests
run: cargo test --all --verbose
toolchain: ${{ matrix.toolchain }}
- run: cargo check

minimal_versions:
name: Minimal versions check
runs-on: ${{ matrix.os }}
strategy:
matrix:
# os: [ubuntu-latest, macOS-latest, windows-latest]
os: [ubuntu-latest]
test:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- run: cargo test --all-features

fmt:
runs-on: ubuntu-latest

- name: Cache minimal-versions cargo dependencies on ${{ matrix.os }}
uses: actions/cache@v3
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-minimal-versions-cargo-${{ hashFiles('**/Cargo.lock') }}
toolchain: stable
components: rustfmt
- run: cargo fmt --all -- --check

clippy:
runs-on: ubuntu-latest

- name: Install Rust
uses: actions-rs/toolchain@v1
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
profile: minimal
toolchain: nightly
override: true
- name: Run minimal version build
run: cargo build --all -Z minimal-versions --all-features
toolchain: stable
components: clippy
- run: cargo clippy -- -D warnings
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ members = [
version = "0.1.0"
edition = "2021"

rust-version = "1.70.0"
description = "A data structure template system."
readme = "README.md"
homepage = "https://rimu.dev"
Expand Down
1 change: 1 addition & 0 deletions ast/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
[package]
name = "rimu-ast"
version.workspace = true
rust-version.workspace = true
edition.workspace = true
description.workspace = true
readme.workspace = true
Expand Down
1 change: 1 addition & 0 deletions cli/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
[package]
name = "rimu-cli"
version.workspace = true
rust-version.workspace = true
edition.workspace = true
description.workspace = true
readme.workspace = true
Expand Down
1 change: 1 addition & 0 deletions eval/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
[package]
name = "rimu-eval"
version.workspace = true
rust-version.workspace = true
edition.workspace = true
description.workspace = true
readme.workspace = true
Expand Down
1 change: 1 addition & 0 deletions meta/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
[package]
name = "rimu-meta"
version.workspace = true
rust-version.workspace = true
edition.workspace = true
description.workspace = true
readme.workspace = true
Expand Down
1 change: 1 addition & 0 deletions parse/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
[package]
name = "rimu-parse"
version.workspace = true
rust-version.workspace = true
edition.workspace = true
description.workspace = true
readme.workspace = true
Expand Down
1 change: 1 addition & 0 deletions repl/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
[package]
name = "rimu-repl"
version.workspace = true
rust-version.workspace = true
edition.workspace = true
description.workspace = true
readme.workspace = true
Expand Down
1 change: 1 addition & 0 deletions rimu/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
[package]
name = "rimu"
version.workspace = true
rust-version.workspace = true
edition.workspace = true
description.workspace = true
readme.workspace = true
Expand Down
1 change: 1 addition & 0 deletions value/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
[package]
name = "rimu-value"
version.workspace = true
rust-version.workspace = true
edition.workspace = true
description.workspace = true
readme.workspace = true
Expand Down

0 comments on commit 2066505

Please sign in to comment.