Fix CI and examples

This commit is contained in:
Matthijs Brobbel 2024-06-18 09:52:37 +02:00
parent c7851112a5
commit 5ba40cf36c
No known key found for this signature in database
GPG key ID: 551189F8515034D3
11 changed files with 65 additions and 87 deletions

View file

@ -3,15 +3,15 @@ name: Test
on:
push:
branches:
- master
- staging
- trying
- master
- staging
- trying
pull_request:
paths:
- '**.rs'
- '**/Cargo.*'
- '.github/workflows/**.yml'
- 'salsa-2022-tests/tests/compile-fail/**.stderr'
- "**.rs"
- "**/Cargo.*"
- ".github/workflows/**.yml"
- "tests/compile-fail/**.stderr"
merge_group:
jobs:
@ -20,52 +20,52 @@ jobs:
strategy:
matrix:
rust:
- stable
- beta
- stable
- beta
experimental:
- false
- false
include:
- rust: nightly
experimental: true
- rust: nightly
experimental: true
continue-on-error: ${{ matrix.experimental }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup Rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.rust }}
components: rustfmt, clippy
default: true
- name: Format
uses: actions-rs/cargo@v1
with:
command: fmt
args: -- --check
- name: Clippy
uses: actions-rs/cargo@v1
with:
command: clippy
args: --all-features --all-targets --all
- name: Test
uses: actions-rs/cargo@v1
with:
command: test
args: --all-features --all-targets --all
- name: Test docs
uses: actions-rs/cargo@v1
with:
command: test
args: --doc
- name: Check (without default features)
uses: actions-rs/cargo@v1
with:
command: check
args: --no-default-features
- name: Checkout
uses: actions/checkout@v2
- name: Setup Rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.rust }}
components: rustfmt, clippy
default: true
- name: Format
uses: actions-rs/cargo@v1
with:
command: fmt
args: -- --check
- name: Clippy
uses: actions-rs/cargo@v1
with:
command: clippy
args: --all-features --all-targets --workspace
- name: Test
uses: actions-rs/cargo@v1
with:
command: test
args: --all-features --all-targets --workspace
- name: Test docs
uses: actions-rs/cargo@v1
with:
command: test
args: --doc
- name: Check (without default features)
uses: actions-rs/cargo@v1
with:
command: check
args: --no-default-features
miri:
name: "Miri"
name: Miri
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
@ -75,4 +75,7 @@ jobs:
rustup override set nightly
cargo miri setup
- name: Test with Miri
run: cargo miri test --no-fail-fast -p salsa-2022 -p salsa-2022-tests -p calc -p lazy-input
run: cargo miri test --no-fail-fast
- name: Run examples with Miri
run: |
cargo miri run --example calc

View file

@ -8,25 +8,29 @@ repository = "https://github.com/salsa-rs/salsa"
description = "A generic framework for on-demand, incrementalized computation (experimental)"
[dependencies]
crossbeam = "0.8.1"
dashmap = "5.3.4"
rustc-hash = "1.1.0"
indexmap = "2"
hashlink = "0.8.0"
arc-swap = "1.6.0"
crossbeam = "0.8.1"
crossbeam-utils = { version = "0.8", default-features = false }
dashmap = "5.3.4"
hashlink = "0.8.0"
indexmap = "2"
log = "0.4.5"
parking_lot = "0.12.1"
smallvec = "1.0.0"
rustc-hash = "1.1.0"
salsa-macros = { path = "components/salsa-macros" }
smallvec = "1.0.0"
[dev-dependencies]
expect-test = "1.4.0"
parking_lot = "0.12.1"
test-log = "0.2.11"
derive-new = "0.5.9"
env_logger = "*"
trybuild = "1.0"
expect-test = "1.4.0"
eyre = "0.6.8"
notify-debouncer-mini = "0.2.1"
ordered-float = "3.0"
parking_lot = "0.12.1"
rustversion = "1.0"
test-log = "0.2.11"
trybuild = "1.0"
[workspace]
members = ["components/salsa-macros"]

View file

@ -1,15 +0,0 @@
[package]
name = "calc"
version = "0.1.0"
edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
derive-new = "0.5.9"
salsa = { path = "../../components/salsa-2022", package = "salsa-2022" }
ordered-float = "3.0"
test-log = { version = "0.2.15", features = ["trace"] }
[dev-dependencies]
expect-test = "1.4.0"

View file

@ -1,14 +0,0 @@
[package]
name = "lazy-input"
version = "0.1.0"
edition = "2021"
[dependencies]
crossbeam-channel = "0.5.6"
dashmap = "5.4.0"
eyre = "0.6.8"
notify-debouncer-mini = "0.2.1"
salsa = { path = "../../components/salsa-2022", package = "salsa-2022" }
[dev-dependencies]
expect-test = "1.4.0"

View file

@ -1,6 +1,6 @@
use std::{path::PathBuf, sync::Mutex, time::Duration};
use crossbeam_channel::{unbounded, Sender};
use crossbeam::channel::{unbounded, Sender};
use dashmap::{mapref::entry::Entry, DashMap};
use eyre::{eyre, Context, Report, Result};
use notify_debouncer_mini::{