From 2f3d9733388f129eadddb708b879ac0b000ea5b3 Mon Sep 17 00:00:00 2001 From: asonix Date: Wed, 17 Apr 2024 13:09:29 -0500 Subject: [PATCH] Add loom to CI --- .forgejo/workflows/check.yaml | 24 ++++++++++++++++++++++++ .forgejo/workflows/publish.yaml | 24 ++++++++++++++++++++++++ 2 files changed, 48 insertions(+) diff --git a/.forgejo/workflows/check.yaml b/.forgejo/workflows/check.yaml index a6f93bd..b229321 100644 --- a/.forgejo/workflows/check.yaml +++ b/.forgejo/workflows/check.yaml @@ -38,6 +38,30 @@ jobs: name: Test run: cargo test + loom: + strategy: + fail-fast: false + matrix: + suite: + - queue + - notify + runs-on: docker + container: + image: docker.io/asonix/actions-base-image:0.1 + steps: + - + name: Checkout async-cpupool + uses: https://github.com/actions/checkout@v4 + - + name: Cargo Cache + uses: https://git.asonix.dog/asonix/actions/cache-rust-dependencies@main + - + name: Loom + run: cargo test --release --test ${{ matrix.suite }} + env: + RUSTFLAGS: '--cfg loom' + LOOM_MAX_PREEMPTIONS: '2' + check: strategy: fail-fast: false diff --git a/.forgejo/workflows/publish.yaml b/.forgejo/workflows/publish.yaml index 14ea44c..e939536 100644 --- a/.forgejo/workflows/publish.yaml +++ b/.forgejo/workflows/publish.yaml @@ -35,6 +35,30 @@ jobs: name: Test run: cargo test + loom: + strategy: + fail-fast: false + matrix: + suite: + - queue + - notify + runs-on: docker + container: + image: docker.io/asonix/actions-base-image:0.1 + steps: + - + name: Checkout async-cpupool + uses: https://github.com/actions/checkout@v4 + - + name: Cargo Cache + uses: https://git.asonix.dog/asonix/actions/cache-rust-dependencies@main + - + name: Loom + run: cargo test --release --test ${{ matrix.suite }} + env: + RUSTFLAGS: '--cfg loom' + LOOM_MAX_PREEMPTIONS: '2' + build: needs: - clippy