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
81 changes: 53 additions & 28 deletions .github/workflows/dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -144,8 +144,7 @@ jobs:
profile: "debug"
sanitize: ""
instrument: "none"
- &release-build
name: "release"
- name: "release"
profile: "release"
sanitize: "" # TODO: enable cfi and safe-stack when possible
instrument: "none"
Expand Down Expand Up @@ -502,45 +501,71 @@ jobs:
recipe_args: "${{ matrix.recipe.args }}"
- *tmate

features:
concurrency:
if: >-
${{
needs.check_changes.outputs.devfiles == 'true'
|| startsWith(github.event.ref, 'refs/tags/v')
|| github.event_name == 'workflow_dispatch'
}}
name: "features/${{ matrix.build.name }}/${{ matrix.features }}"
name: "concurrency"
runs-on: "lab"
needs:
- check_changes
- check
permissions: *check-perms
env: *check-env
strategy:
fail-fast: false
max-parallel: 1
matrix:
include:
# The `loom` feature flips `concurrency::sync` to loom's
# primitives workspace-wide, which breaks crates that rely on
# `Weak`, `Arc::downgrade`, etc. (those aren't in
# `loom::sync`). Scope the loom build to only the concurrency
# package (which hosts the quiescent tests) so workspace
# feature unification doesn't poison unrelated crates.
- build: *release-build
features: "loom"
test_package: "concurrency"
- build: *release-build
features: "shuttle"
test_package: ""
# This job doesn't use the `*check-env` anchor: that anchor's
# `JUST_VARS` references `matrix.build.*`, and this job has no
# matrix. Each step below sets `JUST_VARS` itself, inlining the
# docker_sock / debug_justfile / oci_repo settings that the
# anchor would have provided.
env:
USER: "runner"
steps:
- *checkout
- *nix-setup
- name: "test/${{ matrix.features }}"
- name: "shuttle"
env:
JUST_VARS: >-
docker_sock=/run/docker/docker.sock
debug_justfile=${{ github.event_name == 'workflow_dispatch' && github.event.inputs.debug_justfile || false }}
profile=release
features=shuttle
oci_repo=ghcr.io
uses: *just
with:
recipe: "test"
- name: "shuttle_pct"
env:
JUST_VARS: >-
docker_sock=/run/docker/docker.sock
debug_justfile=${{ github.event_name == 'workflow_dispatch' && github.event.inputs.debug_justfile || false }}
profile=release
features=shuttle_pct
oci_repo=ghcr.io
uses: *just
with:
recipe: "test"
# The `loom` feature flips `concurrency::sync` to loom's
# primitives workspace-wide, which breaks crates that rely on
# `Weak`, `Arc::downgrade`, etc. (those aren't in
# `loom::sync`). Scope the loom build to only the concurrency
# package (which hosts the core concurrency tests) so workspace
# feature unification doesn't poison unrelated crates.
#
# TODO: gate tests which can't be used with loom
- name: "loom"
env:
JUST_VARS: >-
docker_sock=/run/docker/docker.sock
debug_justfile=${{ github.event_name == 'workflow_dispatch' && github.event.inputs.debug_justfile || false }}
profile=release
features=loom
oci_repo=ghcr.io
uses: *just
with:
recipe: "test"
recipe_args: "${{ matrix.test_package }}"
recipe_args: "concurrency"
- *tmate

vlab:
Expand Down Expand Up @@ -633,7 +658,7 @@ jobs:
needs:
- check
- sanitize
- features
- concurrency
- build
- vlab
- test_each
Expand All @@ -653,10 +678,10 @@ jobs:
run: |
echo '::error:: Some check job(s) failed'
exit 1
- name: "Flag any features matrix failures"
if: ${{ needs.features.result != 'success' && needs.features.result != 'skipped' }}
- name: "Flag any concurrency job failures"
if: ${{ needs.concurrency.result != 'success' && needs.concurrency.result != 'skipped' }}
run: |
echo '::error:: Some features job(s) failed'
echo '::error:: concurrency job failed'
exit 1
- name: "Flag any test_each matrix failures"
if: ${{ needs.test_each.result != 'success' && needs.test_each.result != 'skipped' }}
Expand Down
61 changes: 57 additions & 4 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions concurrency-macros/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,12 @@ shuttle = []
silence_clippy = []

[dependencies]
# `proc-macro-crate` resolves the consumer's actual import name for
# `dataplane-concurrency`. This crate is publishable, so the `test`
# macro cannot assume a fixed `::concurrency` alias -- workspace
# consumers often rename it, external users typically don't. See
# `pub fn test` for how the resolution feeds into the emitted path.
proc-macro-crate = { workspace = true, default-features = true }
proc-macro2 = { workspace = true, default-features = true }
quote = { workspace = true, default-features = true }
syn = { workspace = true, default-features = true, features = ["full"] }
Loading
Loading