From 36dbf8546b58a0f42ec24798d3d000e802c537a6 Mon Sep 17 00:00:00 2001 From: Moritz Hoffmann Date: Mon, 11 Nov 2024 13:26:51 +0100 Subject: [PATCH 1/2] Build against timely master Adds a crate and workflow to compile differential against timely master. Signed-off-by: Moritz Hoffmann --- .github/workflows/test-timely-master.yml | 25 ++++++++++++++++++++++++ .gitignore | 2 +- timely_master/Cargo.toml | 15 ++++++++++++++ timely_master/src/lib.rs | 1 + 4 files changed, 42 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/test-timely-master.yml create mode 100644 timely_master/Cargo.toml create mode 100644 timely_master/src/lib.rs diff --git a/.github/workflows/test-timely-master.yml b/.github/workflows/test-timely-master.yml new file mode 100644 index 0000000000..bb24bcccec --- /dev/null +++ b/.github/workflows/test-timely-master.yml @@ -0,0 +1,25 @@ +name: "Test build against Timely master" +on: + push: + branches: + - master + pull_request: + workflow_dispatch: + +jobs: + test: + strategy: + matrix: + os: + - ubuntu + toolchain: + - stable + name: cargo test on ${{ matrix.os }}, rust ${{ matrix.toolchain }} + runs-on: ${{ matrix.os }}-latest + steps: + - uses: actions/checkout@v4 + - uses: actions-rust-lang/setup-rust-toolchain@v1 + with: + toolchain: ${{ matrix.toolchain }} + - name: Cargo test against Timely master + run: cd timely_master && cargo test diff --git a/.gitignore b/.gitignore index 06aba01b65..fa8d85ac52 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,2 @@ Cargo.lock -/target +target diff --git a/timely_master/Cargo.toml b/timely_master/Cargo.toml new file mode 100644 index 0000000000..8e5fc587ba --- /dev/null +++ b/timely_master/Cargo.toml @@ -0,0 +1,15 @@ +[package] +name = "differential-dataflow-timely-master" +version = "0.0.0" +authors = ["Moritz Hoffmann "] +license = "MIT" +edition = "2021" +publish = false + +[workspace] + +[dependencies] +differential-dataflow = { path = "../" } + +[patch.crates-io] +timely = { git = "https://github.com/TimelyDataflow/timely-dataflow" } diff --git a/timely_master/src/lib.rs b/timely_master/src/lib.rs new file mode 100644 index 0000000000..197cc710b8 --- /dev/null +++ b/timely_master/src/lib.rs @@ -0,0 +1 @@ +//~ Empty From 18853f15746b065ecaa7f20881bc7ef8736b3f73 Mon Sep 17 00:00:00 2001 From: Moritz Hoffmann Date: Tue, 12 Nov 2024 09:59:24 +0100 Subject: [PATCH 2/2] Notify on workflow failure Signed-off-by: Moritz Hoffmann --- .github/create-issue-on-failure.md | 13 +++++++ .github/workflows/test-timely-master.yml | 37 ++++++++++++++++--- timely_master/Cargo.toml | 15 +++----- timely_master/README.md | 7 ++++ .../differential-dataflow/Cargo.toml | 21 +++++++++++ timely_master/differential-dogs3/Cargo.toml | 18 +++++++++ timely_master/src/lib.rs | 1 - 7 files changed, 95 insertions(+), 17 deletions(-) create mode 100644 .github/create-issue-on-failure.md create mode 100644 timely_master/README.md create mode 100644 timely_master/differential-dataflow/Cargo.toml create mode 100644 timely_master/differential-dogs3/Cargo.toml delete mode 100644 timely_master/src/lib.rs diff --git a/.github/create-issue-on-failure.md b/.github/create-issue-on-failure.md new file mode 100644 index 0000000000..c13edfff8b --- /dev/null +++ b/.github/create-issue-on-failure.md @@ -0,0 +1,13 @@ +--- +name: "Issue on workflow failure" +about: "Issue template for workflow failures" +title: 'Workflow "{{ env.WORKFLOW_NAME }}" failed' +labels: "build-failure" +--- + +The workflow "**{{ env.WORKFLOW_NAME }}**" failed. See logs: +https://github.com/{{ env.REPO_SLUG }}/actions/runs/{{ env.RUN_ID }} + +Commit: https://github.com/{{ env.REPO_SLUG }}/commit/{{ tools.context.sha }} + +// cc: {{ env.MENTION }} — please triage and resolve this issue diff --git a/.github/workflows/test-timely-master.yml b/.github/workflows/test-timely-master.yml index bb24bcccec..2af4f1c35b 100644 --- a/.github/workflows/test-timely-master.yml +++ b/.github/workflows/test-timely-master.yml @@ -1,13 +1,11 @@ name: "Test build against Timely master" on: - push: - branches: - - master - pull_request: workflow_dispatch: + schedule: + - cron: '38 3 * * *' jobs: - test: + tests: strategy: matrix: os: @@ -21,5 +19,32 @@ jobs: - uses: actions-rust-lang/setup-rust-toolchain@v1 with: toolchain: ${{ matrix.toolchain }} + - name: Cargo check against Timely master + working-directory: timely_master + run: cargo check --all-targets - name: Cargo test against Timely master - run: cd timely_master && cargo test + working-directory: timely_master + run: cargo test + + notify: + name: Notify failed build + if: failure() && github.event.pull_request == null + needs: [tests] + permissions: + contents: read + issues: write + runs-on: ubuntu-latest + steps: + # We need to checkout the repository to access the issue template + - uses: actions/checkout@v4 + - uses: JasonEtco/create-an-issue@v2 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + WORKFLOW_NAME: ${{ github.workflow }} + REPO_SLUG: ${{ github.repository }} + RUN_ID: ${{ github.run_id }} + MENTION: '@frankmcsherry, @antiguru' + with: + filename: '.github/create-issue-on-failure.md' + update_existing: true + search_existing: open diff --git a/timely_master/Cargo.toml b/timely_master/Cargo.toml index 8e5fc587ba..3080b03a0c 100644 --- a/timely_master/Cargo.toml +++ b/timely_master/Cargo.toml @@ -1,15 +1,10 @@ -[package] -name = "differential-dataflow-timely-master" -version = "0.0.0" -authors = ["Moritz Hoffmann "] -license = "MIT" -edition = "2021" -publish = false - +# This is not part of the regular workspace. [workspace] +members = ["differential-dataflow", "differential-dogs3"] +resolver = "2" -[dependencies] -differential-dataflow = { path = "../" } +[workspace.dependencies] +timely = { git = "https://github.com/TimelyDataflow/timely-dataflow", default-features = false } [patch.crates-io] timely = { git = "https://github.com/TimelyDataflow/timely-dataflow" } diff --git a/timely_master/README.md b/timely_master/README.md new file mode 100644 index 0000000000..da3923f89a --- /dev/null +++ b/timely_master/README.md @@ -0,0 +1,7 @@ +# Tests for Differential against Timely master + +This directory contains tests for Differential against Timely master. The tests are run in the same way as the tests +for Differential against released versions of Timely, but the crate is replaced with the `timely` crate from Github. + +Nobody should ever rely on the contents of this directory for any other purpose than testing differential +against timely master. diff --git a/timely_master/differential-dataflow/Cargo.toml b/timely_master/differential-dataflow/Cargo.toml new file mode 100644 index 0000000000..9c496fb2e8 --- /dev/null +++ b/timely_master/differential-dataflow/Cargo.toml @@ -0,0 +1,21 @@ +[package] +name = "differential-dataflow" +version = "0.0.0" +authors = ["Moritz Hoffmann "] +license = "MIT" +edition = "2021" +publish = false +description = "A fake package to test differential against timely master." + +# Point at the regular differential crate. +[lib] +path = "../../src/lib.rs" + +# Dependencies to build against timely master. Must mirror the dependencies in the main Cargo.toml. +[dependencies] +fnv="1.0.2" +serde = { version = "1.0", features = ["derive"] } +timely = { workspace = true } + +[features] +default = ["timely/getopts"] diff --git a/timely_master/differential-dogs3/Cargo.toml b/timely_master/differential-dogs3/Cargo.toml new file mode 100644 index 0000000000..1fc0ecfcdd --- /dev/null +++ b/timely_master/differential-dogs3/Cargo.toml @@ -0,0 +1,18 @@ +[package] +name = "differential-dogs3" +version = "0.0.0" +authors = ["Moritz Hoffmann "] +license = "MIT" +edition = "2021" +publish = false +description = "A fake package to test dogsdogsdogs against timely master." + +# Point at the regular dogsdogsdogs crate. +[lib] +path = "../../dogsdogsdogs/src/lib.rs" + +# Dependencies to build against timely master. Must mirror the dependencies in the main Cargo.toml. +[dependencies] +differential-dataflow = { path = "../differential-dataflow", default-features = false } +serde = { version = "1.0", features = ["derive"] } +timely = { workspace = true } diff --git a/timely_master/src/lib.rs b/timely_master/src/lib.rs deleted file mode 100644 index 197cc710b8..0000000000 --- a/timely_master/src/lib.rs +++ /dev/null @@ -1 +0,0 @@ -//~ Empty