Skip to content

Commit 4e84a3f

Browse files
authored
fix: [ci-full] fix ci issues (#2029)
- run docs/website on pr - use bash by default on windows - build website with nightly - increase test timeout to 45m - run docs with nightly - make rustfmt use native line endings instead of unix - fix compile-fail nightly stderr outputs - add the ability to include [ci-full] into the body/title of a PR to get it to run the full stable/nightly linux/windows test matrix.
1 parent 92adacc commit 4e84a3f

10 files changed

Lines changed: 75 additions & 29 deletions

File tree

.github/workflows/build-website.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ on:
77
- feature/**
88
schedule:
99
- cron: "35 03 * * *" # Daily at 8:35 PM PDT, 7:35 PM PST.
10+
pull_request:
1011
workflow_dispatch:
1112
inputs:
1213
should_bench:

.github/workflows/ci.yml

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@ env:
1717
CARGO_PROFILE_TEST_STRIP: "debuginfo"
1818
CARGO_PROFILE_RELEASE_STRIP: "debuginfo"
1919

20+
defaults:
21+
run:
22+
shell: bash # default shell on windows is pwsh
23+
2024
jobs:
2125
pre_job:
2226
runs-on: ubuntu-latest
@@ -31,7 +35,7 @@ jobs:
3135
test:
3236
name: All tests, lints, and checks
3337
if: ${{ needs.pre_job.outputs.should_skip != 'true' }}
34-
timeout-minutes: 20
38+
timeout-minutes: 45
3539
needs: pre_job
3640
runs-on: ${{ matrix.os }}
3741
strategy:
@@ -43,8 +47,8 @@ jobs:
4347
# For non-pull requests, event_name != 'pull_request' will be true, and 'nothing' is
4448
# truthy, so the entire && operator will resolve to 'nothing'. Then the || operator will
4549
# resolve to 'nothing' so we will exclude 'nothing'. https://stackoverflow.com/a/73822998
46-
- rust_release: ${{ (github.event_name != 'pull_request' && github.event_name != 'push' && 'nothing') || 'latest-nightly' }}
47-
- os: ${{ (github.event_name != 'pull_request' && github.event_name != 'push' && 'nothing') || 'windows-latest' }}
50+
- rust_release: ${{ (((github.event_name != 'pull_request' && github.event_name != 'push') || (github.event_name == 'pull_request' && (contains(github.event.pull_request.title, '[ci-full]') || contains(github.event.pull_request.body, '[ci-full]')))) && 'nothing') || 'latest-nightly' }}
51+
- os: ${{ (((github.event_name != 'pull_request' && github.event_name != 'push') || (github.event_name == 'pull_request' && (contains(github.event.pull_request.title, '[ci-full]') || contains(github.event.pull_request.body, '[ci-full]')))) && 'nothing') || 'windows-latest' }}
4852

4953
steps:
5054
- name: Checkout sources
@@ -54,10 +58,7 @@ jobs:
5458
if: ${{ matrix.rust_release == 'latest-nightly' }}
5559
run: |
5660
rustup toolchain add nightly && \
57-
rustup default nightly && \
58-
rustup component add clippy && \
59-
rustup component add rustfmt && \
60-
rustup component add rust-src
61+
rustup default nightly
6162
6263
- if: matrix.rust_release == 'latest-stable' && matrix.os == 'ubuntu-latest'
6364
uses: ./.github/actions/use-sccache
@@ -77,8 +78,7 @@ jobs:
7778
- run: cargo check --all-targets
7879
- run: cargo check --all-targets --no-default-features
7980

80-
- if: ${{ matrix.rust_release == 'latest-stable' }}
81-
run: cargo fmt --all -- --check
81+
- run: cargo fmt --all -- --check
8282

8383
test-wasm:
8484
name: Test Suite (WebAssembly)
@@ -93,7 +93,7 @@ jobs:
9393
# # For non-pull requests, event_name != 'pull_request' will be true, and 'nothing' is
9494
# # truthy, so the entire && operator will resolve to 'nothing'. Then the || operator will
9595
# # resolve to 'nothing' so we will exclude 'nothing'. https://stackoverflow.com/a/73822998
96-
- rust_release: ${{ (github.event_name != 'pull_request' && github.event_name != 'push' && 'nothing') || 'latest-nightly' }}
96+
- rust_release: ${{ (((github.event_name != 'pull_request' && github.event_name != 'push') || (github.event_name == 'pull_request' && (contains(github.event.pull_request.title, '[ci-full]') || contains(github.event.pull_request.body, '[ci-full]')))) && 'nothing') || 'latest-nightly' }}
9797

9898
env:
9999
RUSTUP_TOOLCHAIN: ${{ matrix.rust_release == 'latest-nightly' && 'nightly' || '' }}
@@ -106,10 +106,7 @@ jobs:
106106
if: ${{ matrix.rust_release == 'latest-nightly' }}
107107
run: |
108108
rustup toolchain add nightly && \
109-
rustup default nightly && \
110-
rustup component add clippy && \
111-
rustup component add rustfmt && \
112-
rustup component add rust-src
109+
rustup default nightly
113110
114111
- name: Install wasm target
115112
run: rustup target add wasm32-unknown-unknown

.github/workflows/docs.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ on:
55
branches:
66
- main
77
- feature/**
8+
pull_request:
89
schedule:
910
- cron: "35 03 * * *" # Daily at 8:35 PM PDT, 7:35 PM PST.
1011
workflow_dispatch:
@@ -32,6 +33,11 @@ jobs:
3233
- name: Checkout sources
3334
uses: actions/checkout@v4
3435

36+
- name: Install rust channel and set it as default
37+
run: |
38+
rustup toolchain add nightly && \
39+
rustup default nightly
40+
3541
- env:
3642
RUSTDOCFLAGS: --cfg docsrs -Dwarnings
3743
run: cargo doc --no-deps --all-features
@@ -42,6 +48,7 @@ jobs:
4248
mv design_docs "$WWW_DIR/"
4349
4450
- name: Push to gh-pages
51+
if: ${{ github.event_name != 'pull_request' }}
4552
shell: bash
4653
run: |
4754
git -C "$WWW_DIR" init -q

build_docs.bash

100644100755
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,15 @@ curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
77
source "$HOME/.cargo/env"
88

99
curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
10-
rustup toolchain install
10+
rustup toolchain install nightly
1111

1212
cd website_playground
1313

14-
RUSTFLAGS="--cfg procmacro2_semver_exempt --cfg super_unstable" CC="$PWD/../LLVM-19.1.0-Linux-X64/bin/clang" wasm-pack build
14+
RUSTUP_TOOLCHAIN="nightly" RUSTFLAGS="--cfg procmacro2_semver_exempt --cfg super_unstable" CC="$PWD/../LLVM-19.1.0-Linux-X64/bin/clang" wasm-pack build
1515

1616
cd ..
1717

18-
RUSTDOCFLAGS="--cfg docsrs -Dwarnings" cargo doc --no-deps --all-features
18+
RUSTUP_TOOLCHAIN="nightly" RUSTDOCFLAGS="--cfg docsrs -Dwarnings" cargo doc --no-deps --all-features
1919

2020
cp -r target/doc docs/static/rustdoc
2121

dfir_rs/tests/compile-fail/surface_demuxenum_notenum.stderr

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,13 @@ error[E0277]: the trait bound `Shape: DemuxEnumBase` is not satisfied
22
--> tests/compile-fail/surface_demuxenum_notenum.rs:12:28
33
|
44
12 | ]) -> demux_enum::<Shape>();
5-
| ^^^^^ the trait `DemuxEnumBase` is not implemented for `Shape`
5+
| ^^^^^ unsatisfied trait bound
66
|
7+
help: the trait `DemuxEnumBase` is not implemented for `Shape`
8+
--> tests/compile-fail/surface_demuxenum_notenum.rs:4:5
9+
|
10+
4 | struct Shape {
11+
| ^^^^^^^^^^^^
712
= note: use `#[derive(dfir_rs::DemuxEnum)]`
813
note: required by a bound in `check_impl_demux_enum`
914
--> tests/compile-fail/surface_demuxenum_notenum.rs:12:28
@@ -59,7 +64,12 @@ error[E0277]: the trait bound `Shape: DemuxEnum<_>` is not satisfied
5964
--> tests/compile-fail/surface_demuxenum_notenum.rs:12:15
6065
|
6166
12 | ]) -> demux_enum::<Shape>();
62-
| ^^^^^^^^^^^^^^^^^^^^^ the trait `DemuxEnum<_>` is not implemented for `Shape`
67+
| ^^^^^^^^^^^^^^^^^^^^^ unsatisfied trait bound
68+
|
69+
help: the trait `DemuxEnum<_>` is not implemented for `Shape`
70+
--> tests/compile-fail/surface_demuxenum_notenum.rs:4:5
6371
|
72+
4 | struct Shape {
73+
| ^^^^^^^^^^^^
6474
= note: ensure there is exactly one output for each enum variant.
6575
= note: ensure that the type for each output is a tuple of the field for the variant: `()`, `(a,)`, or `(a, b, ...)`.

dfir_rs/tests/compile-fail/surface_demuxenum_port_extra_zero.stderr

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,17 +11,27 @@ error[E0277]: the trait bound `Shape: SingleVariant` is not satisfied
1111
--> tests/compile-fail/surface_demuxenum_port_extra_zero.rs:10:52
1212
|
1313
10 | my_demux = source_iter([]) -> demux_enum::<Shape>();
14-
| ^^^^^ the trait `SingleVariant` is not implemented for `Shape`
14+
| ^^^^^ unsatisfied trait bound
1515
|
16+
help: the trait `SingleVariant` is not implemented for `Shape`
17+
--> tests/compile-fail/surface_demuxenum_port_extra_zero.rs:6:5
18+
|
19+
6 | enum Shape {
20+
| ^^^^^^^^^^
1621
= note: requires that the enum have only one variant.
1722
= note: ensure there are no missing outputs; there must be exactly one output for each enum variant.
1823

1924
error[E0277]: the trait bound `Shape: SingleVariant` is not satisfied
2025
--> tests/compile-fail/surface_demuxenum_port_extra_zero.rs:10:39
2126
|
2227
10 | my_demux = source_iter([]) -> demux_enum::<Shape>();
23-
| ^^^^^^^^^^^^^^^^^^^^^ the trait `SingleVariant` is not implemented for `Shape`
28+
| ^^^^^^^^^^^^^^^^^^^^^ unsatisfied trait bound
29+
|
30+
help: the trait `SingleVariant` is not implemented for `Shape`
31+
--> tests/compile-fail/surface_demuxenum_port_extra_zero.rs:6:5
2432
|
33+
6 | enum Shape {
34+
| ^^^^^^^^^^
2535
= note: requires that the enum have only one variant.
2636
= note: ensure there are no missing outputs; there must be exactly one output for each enum variant.
2737

@@ -31,7 +41,12 @@ error[E0277]: the trait bound `Shape: SingleVariant` is not satisfied
3141
10 | my_demux = source_iter([]) -> demux_enum::<Shape>();
3242
| _______________________________________^
3343
11 | | my_demux[Square] -> for_each(std::mem::drop);
34-
| |____________________________________________________^ the trait `SingleVariant` is not implemented for `Shape`
44+
| |____________________________________________________^ unsatisfied trait bound
45+
|
46+
help: the trait `SingleVariant` is not implemented for `Shape`
47+
--> tests/compile-fail/surface_demuxenum_port_extra_zero.rs:6:5
3548
|
49+
6 | enum Shape {
50+
| ^^^^^^^^^^
3651
= note: requires that the enum have only one variant.
3752
= note: ensure there are no missing outputs; there must be exactly one output for each enum variant.

dfir_rs/tests/compile-fail/surface_demuxenum_port_missing_one.stderr

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,27 @@ error[E0277]: the trait bound `Shape: SingleVariant` is not satisfied
22
--> tests/compile-fail/surface_demuxenum_port_missing_one.rs:15:28
33
|
44
15 | ]) -> demux_enum::<Shape>();
5-
| ^^^^^ the trait `SingleVariant` is not implemented for `Shape`
5+
| ^^^^^ unsatisfied trait bound
66
|
7+
help: the trait `SingleVariant` is not implemented for `Shape`
8+
--> tests/compile-fail/surface_demuxenum_port_missing_one.rs:6:5
9+
|
10+
6 | enum Shape {
11+
| ^^^^^^^^^^
712
= note: requires that the enum have only one variant.
813
= note: ensure there are no missing outputs; there must be exactly one output for each enum variant.
914

1015
error[E0277]: the trait bound `Shape: SingleVariant` is not satisfied
1116
--> tests/compile-fail/surface_demuxenum_port_missing_one.rs:15:15
1217
|
1318
15 | ]) -> demux_enum::<Shape>();
14-
| ^^^^^^^^^^^^^^^^^^^^^ the trait `SingleVariant` is not implemented for `Shape`
19+
| ^^^^^^^^^^^^^^^^^^^^^ unsatisfied trait bound
20+
|
21+
help: the trait `SingleVariant` is not implemented for `Shape`
22+
--> tests/compile-fail/surface_demuxenum_port_missing_one.rs:6:5
1523
|
24+
6 | enum Shape {
25+
| ^^^^^^^^^^
1626
= note: requires that the enum have only one variant.
1727
= note: ensure there are no missing outputs; there must be exactly one output for each enum variant.
1828

@@ -22,7 +32,12 @@ error[E0277]: the trait bound `Shape: SingleVariant` is not satisfied
2232
15 | ]) -> demux_enum::<Shape>();
2333
| _______________^
2434
16 | | my_demux[Rectangle] -> for_each(std::mem::drop);
25-
| |_______________________________________________________^ the trait `SingleVariant` is not implemented for `Shape`
35+
| |_______________________________________________________^ unsatisfied trait bound
36+
|
37+
help: the trait `SingleVariant` is not implemented for `Shape`
38+
--> tests/compile-fail/surface_demuxenum_port_missing_one.rs:6:5
2639
|
40+
6 | enum Shape {
41+
| ^^^^^^^^^^
2742
= note: requires that the enum have only one variant.
2843
= note: ensure there are no missing outputs; there must be exactly one output for each enum variant.

hydro_deploy/hydro_deploy_integration/src/lib.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -896,11 +896,13 @@ where
896896

897897
#[cfg(test)]
898898
mod tests {
899-
use super::*;
900-
use futures::stream;
901899
use std::sync::Arc;
902900
use std::task::{Context, Poll};
903901

902+
use futures::stream;
903+
904+
use super::*;
905+
904906
struct TestWaker;
905907
impl std::task::Wake for TestWaker {
906908
fn wake(self: Arc<Self>) {}

rust-toolchain.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
[toolchain]
2-
channel = "stable"
32
components = [
43
"rustfmt",
54
"clippy",

rustfmt.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ format_macro_matchers = true
33
group_imports = "StdExternalCrate"
44
hex_literal_case = "Lower"
55
imports_granularity = "Module"
6-
newline_style = "Unix"
6+
newline_style = "Native"
77
normalize_comments = true
88
normalize_doc_attributes = true
99
use_field_init_shorthand = true

0 commit comments

Comments
 (0)