Skip to content

Commit

Permalink
Merge d5d5c0b into sapling-pr-archive-shadaj
Browse files Browse the repository at this point in the history
  • Loading branch information
shadaj authored Dec 12, 2024
2 parents 1beff83 + d5d5c0b commit 9d9a66c
Show file tree
Hide file tree
Showing 34 changed files with 213 additions and 523 deletions.
4 changes: 0 additions & 4 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
@@ -1,12 +1,8 @@
[build]
rustflags = [
"-Zproc-macro-backtrace",
# Flag to make build.rs scripts generate docs. Should only be used in this repository
# internally, not by dependants.
'--cfg=HYDROFLOW_GENERATE_DOCS',
# https://github.com/rust-lang/rust-clippy/issues/10087
## TODO(mingwei): Need rust-analyzer support:
# "-Aclippy::uninlined-format-args",
]

[target.x86_64-apple-darwin]
Expand Down
49 changes: 26 additions & 23 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,13 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest]
rust_release: [pinned-nightly, latest-nightly]
rust_release: [pinned-nightly, latest-stable]
exclude:
# For non-pull requests, event_name != 'pull_request' will be true, and 'nothing' is
# truthy, so the entire && operator will resolve to 'nothing'. Then the || operator will
# resolve to 'nothing' so we will exclude 'nothing'. https://stackoverflow.com/a/73822998
- rust_release: ${{ (needs.pre_job.outputs.should_skip != 'true' && 'nothing') || 'pinned-nightly' }}
- rust_release: ${{ (github.event_name != 'pull_request' && 'nothing') || 'latest-nightly' }}
- rust_release: ${{ (github.event_name != 'pull_request' && 'nothing') || 'latest-stable' }}

env:
CARGO_TERM_COLOR: always
Expand All @@ -55,12 +55,12 @@ jobs:
- name: Checkout sources
uses: actions/checkout@v3

- name: Install nightly toolchain
- name: Install toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly
override: ${{ matrix.rust_release == 'latest-nightly' }}
toolchain: stable
override: ${{ matrix.rust_release == 'latest-stable' }}
components: rustfmt, clippy

- name: Run sccache-cache
Expand Down Expand Up @@ -96,25 +96,25 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
rust_release: [pinned-nightly, latest-nightly]
rust_release: [pinned-nightly, latest-stable]
exclude:
# For non-pull requests, event_name != 'pull_request' will be true, and 'nothing' is
# truthy, so the entire && operator will resolve to 'nothing'. Then the || operator will
# resolve to 'nothing' so we will exclude 'nothing'. https://stackoverflow.com/a/73822998
- rust_release: ${{ (needs.pre_job.outputs.should_skip != 'true' && 'nothing') || 'pinned-nightly' }}
- rust_release: ${{ (github.event_name != 'pull_request' && 'nothing') || 'latest-nightly' }}
- rust_release: ${{ (github.event_name != 'pull_request' && 'nothing') || 'latest-stable' }}

steps:
- name: Checkout sources
uses: actions/checkout@v3

- name: Install nightly toolchain
- name: Install toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly
toolchain: stable
target: wasm32-unknown-unknown
override: ${{ matrix.rust_release == 'latest-nightly' }}
override: ${{ matrix.rust_release == 'latest-stable' }}

- name: Check hydroflow_lang
uses: actions-rs/cargo@v1
Expand All @@ -132,13 +132,13 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest]
rust_release: [pinned-nightly, latest-nightly]
rust_release: [pinned-nightly, latest-stable]
exclude:
# For non-pull requests, event_name != 'pull_request' will be true, and 'nothing' is
# truthy, so the entire && operator will resolve to 'nothing'. Then the || operator will
# resolve to 'nothing' so we will exclude 'nothing'. https://stackoverflow.com/a/73822998
- rust_release: ${{ (needs.pre_job.outputs.should_skip != 'true' && 'nothing') || 'pinned-nightly' }}
- rust_release: ${{ (github.event_name != 'pull_request' && 'nothing') || 'latest-nightly' }}
- rust_release: ${{ (github.event_name != 'pull_request' && 'nothing') || 'latest-stable' }}
- os: ${{ (github.event_name != 'pull_request' && 'nothing') || 'windows-latest' }}

env:
Expand All @@ -152,12 +152,12 @@ jobs:
- name: Checkout sources
uses: actions/checkout@v3

- name: Install nightly toolchain
- name: Install toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly
override: ${{ matrix.rust_release == 'latest-nightly' }}
toolchain: stable
override: ${{ matrix.rust_release == 'latest-stable' }}

- name: Run sccache-cache
if: matrix.rust_release == 'pinned-nightly'
Expand All @@ -182,6 +182,10 @@ jobs:

- name: Run cargo nextest on all targets
run: cargo nextest run --no-fail-fast --features python --features deploy --all-targets
env:
# On stable the output messages will often not match pinned-nightly, so we set to 'overwrite'.
TRYBUILD: ${{ matrix.rust_release == 'pinned-nightly' && 'wip' || 'overwrite' }}
HYDROFLOW_EXPECT_WARNINGS: ${{ matrix.rust_release == 'pinned-nightly' && 'noop' || 'ignore' }}

- name: Run doctests
run: cargo test --no-fail-fast --features python --features deploy --doc
Expand Down Expand Up @@ -217,7 +221,7 @@ jobs:
cd python_tests
pip install -r requirements.txt
RUST_BACKTRACE=1 pytest
- name: Run Python tests (Windows)
if: ${{ matrix.os == 'windows-latest' }}
run: |
Expand All @@ -235,25 +239,25 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
rust_release: [pinned-nightly, latest-nightly]
rust_release: [pinned-nightly, latest-stable]
exclude:
# For non-pull requests, event_name != 'pull_request' will be true, and 'nothing' is
# truthy, so the entire && operator will resolve to 'nothing'. Then the || operator will
# resolve to 'nothing' so we will exclude 'nothing'. https://stackoverflow.com/a/73822998
- rust_release: ${{ (needs.pre_job.outputs.should_skip != 'true' && 'nothing') || 'pinned-nightly' }}
- rust_release: ${{ (github.event_name != 'pull_request' && 'nothing') || 'latest-nightly' }}
- rust_release: ${{ (github.event_name != 'pull_request' && 'nothing') || 'latest-stable' }}

steps:
- name: Checkout sources
uses: actions/checkout@v3

- name: Install nightly toolchain
- name: Install toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly
toolchain: stable
target: wasm32-unknown-unknown
override: ${{ matrix.rust_release == 'latest-nightly' }}
override: ${{ matrix.rust_release == 'latest-stable' }}

- name: Get wasm-bindgen version
id: wasm-bindgen-version
Expand Down Expand Up @@ -366,11 +370,10 @@ jobs:
- name: Checkout sources
uses: actions/checkout@v3

- name: Install nightly toolchain
- name: Install toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly

- name: Checkout gh-pages
shell: bash
Expand Down
13 changes: 12 additions & 1 deletion Cargo.lock

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

4 changes: 1 addition & 3 deletions benches/benches/fork_join.rs
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,7 @@ fn benchmark_hydroflow(c: &mut Criterion) {
fn benchmark_hydroflow_surface(c: &mut Criterion) {
c.bench_function("fork_join/hydroflow/surface", |b| {
b.iter(|| {
let mut hf = hydroflow_syntax! {
source_iter(0..NUM_INTS) -> import!("fork_join_20.hf") -> for_each(|x| { black_box(x); });
};
let mut hf = include!("fork_join_20.hf");
hf.run_available();
})
});
Expand Down
12 changes: 8 additions & 4 deletions benches/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,21 @@ pub fn fork_join() -> std::io::Result<()> {
let file = File::create(path)?;
let mut write = BufWriter::new(file);

writeln!(write, "a0 = mod -> tee();")?;

writeln!(write, "hydroflow_syntax! {{")?;
writeln!(write, "a0 = source_iter(0..NUM_INTS) -> tee();")?;
for i in 0..NUM_OPS {
if i > 0 {
writeln!(write, "a{} = union() -> tee();", i)?;
}
writeln!(write, "a{} -> filter(|x| x % 2 == 0) -> a{};", i, i + 1)?;
writeln!(write, "a{} -> filter(|x| x % 2 == 1) -> a{};", i, i + 1)?;
}

writeln!(write, "a{} = union() -> mod;", NUM_OPS)?;
writeln!(
write,
"a{} = union() -> for_each(|x| {{ black_box(x); }});",
NUM_OPS
)?;
writeln!(write, "}}")?;

write.flush()?;

Expand Down
4 changes: 2 additions & 2 deletions build_docs.bash
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
set -e

PLATFORM=${1:-"x86_64-linux-gnu-ubuntu-16.04"}
PLATFORM=${1:-"x86_64-linux-gnu-ubuntu-20.04"}

wget -qO- https://github.com/llvm/llvm-project/releases/download/llvmorg-13.0.0/clang+llvm-13.0.0-$PLATFORM.tar.xz | tar xJ
wget -qO- https://github.com/llvm/llvm-project/releases/download/llvmorg-18.1.8/clang+llvm-18.1.8-$PLATFORM.tar.xz | tar xJ

curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y

Expand Down
11 changes: 1 addition & 10 deletions hydroflow/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,8 @@ description = "Hydro's low-level dataflow runtime and IR"
workspace = true

[features]
default = [ "macros", "nightly", "debugging" ]
default = [ "macros", "debugging" ]

nightly = [ "hydroflow_macro", "hydroflow_macro/diagnostics" ]
macros = [ "hydroflow_macro", "hydroflow_datalog" ]
hydroflow_macro = [ "dep:hydroflow_macro" ]
hydroflow_datalog = [ "dep:hydroflow_datalog" ]
Expand All @@ -29,14 +28,6 @@ required-features = [ "nightly" ]
name = "python_udf"
required-features = [ "python" ]

[[example]]
name = "modules_outer_join"
required-features = [ "debugging" ]

[[example]]
name = "modules_triple_cross_join"
required-features = [ "debugging" ]

[dependencies]
bincode = "1.3.1"
byteorder = "1.3.2"
Expand Down
23 changes: 0 additions & 23 deletions hydroflow/examples/modules_outer_join/full_outer_join.hf

This file was deleted.

16 changes: 0 additions & 16 deletions hydroflow/examples/modules_outer_join/left_outer_join.hf

This file was deleted.

30 changes: 0 additions & 30 deletions hydroflow/examples/modules_outer_join/main.rs

This file was deleted.

6 changes: 0 additions & 6 deletions hydroflow/examples/modules_outer_join/right_outer_join.hf

This file was deleted.

Loading

0 comments on commit 9d9a66c

Please sign in to comment.