Skip to content

Commit 4dfb13a

Browse files
authored
Build against timely master (#539)
* Build against timely master Adds a crate and workflow to compile differential against timely master. Signed-off-by: Moritz Hoffmann <[email protected]> * Notify on workflow failure Signed-off-by: Moritz Hoffmann <[email protected]> --------- Signed-off-by: Moritz Hoffmann <[email protected]>
1 parent 03b6ba4 commit 4dfb13a

File tree

7 files changed

+120
-1
lines changed

7 files changed

+120
-1
lines changed

.github/create-issue-on-failure.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
---
2+
name: "Issue on workflow failure"
3+
about: "Issue template for workflow failures"
4+
title: 'Workflow "{{ env.WORKFLOW_NAME }}" failed'
5+
labels: "build-failure"
6+
---
7+
8+
The workflow "**{{ env.WORKFLOW_NAME }}**" failed. See logs:
9+
https://github.com/{{ env.REPO_SLUG }}/actions/runs/{{ env.RUN_ID }}
10+
11+
Commit: https://github.com/{{ env.REPO_SLUG }}/commit/{{ tools.context.sha }}
12+
13+
// cc: {{ env.MENTION }} — please triage and resolve this issue
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: "Test build against Timely master"
2+
on:
3+
workflow_dispatch:
4+
schedule:
5+
- cron: '38 3 * * *'
6+
7+
jobs:
8+
tests:
9+
strategy:
10+
matrix:
11+
os:
12+
- ubuntu
13+
toolchain:
14+
- stable
15+
name: cargo test on ${{ matrix.os }}, rust ${{ matrix.toolchain }}
16+
runs-on: ${{ matrix.os }}-latest
17+
steps:
18+
- uses: actions/checkout@v4
19+
- uses: actions-rust-lang/setup-rust-toolchain@v1
20+
with:
21+
toolchain: ${{ matrix.toolchain }}
22+
- name: Cargo check against Timely master
23+
working-directory: timely_master
24+
run: cargo check --all-targets
25+
- name: Cargo test against Timely master
26+
working-directory: timely_master
27+
run: cargo test
28+
29+
notify:
30+
name: Notify failed build
31+
if: failure() && github.event.pull_request == null
32+
needs: [tests]
33+
permissions:
34+
contents: read
35+
issues: write
36+
runs-on: ubuntu-latest
37+
steps:
38+
# We need to checkout the repository to access the issue template
39+
- uses: actions/checkout@v4
40+
- uses: JasonEtco/create-an-issue@v2
41+
env:
42+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
43+
WORKFLOW_NAME: ${{ github.workflow }}
44+
REPO_SLUG: ${{ github.repository }}
45+
RUN_ID: ${{ github.run_id }}
46+
MENTION: '@frankmcsherry, @antiguru'
47+
with:
48+
filename: '.github/create-issue-on-failure.md'
49+
update_existing: true
50+
search_existing: open

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
Cargo.lock
2-
/target
2+
target

timely_master/Cargo.toml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# This is not part of the regular workspace.
2+
[workspace]
3+
members = ["differential-dataflow", "differential-dogs3"]
4+
resolver = "2"
5+
6+
[workspace.dependencies]
7+
timely = { git = "https://github.com/TimelyDataflow/timely-dataflow", default-features = false }
8+
9+
[patch.crates-io]
10+
timely = { git = "https://github.com/TimelyDataflow/timely-dataflow" }

timely_master/README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Tests for Differential against Timely master
2+
3+
This directory contains tests for Differential against Timely master. The tests are run in the same way as the tests
4+
for Differential against released versions of Timely, but the crate is replaced with the `timely` crate from Github.
5+
6+
Nobody should ever rely on the contents of this directory for any other purpose than testing differential
7+
against timely master.
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
[package]
2+
name = "differential-dataflow"
3+
version = "0.0.0"
4+
authors = ["Moritz Hoffmann <[email protected]>"]
5+
license = "MIT"
6+
edition = "2021"
7+
publish = false
8+
description = "A fake package to test differential against timely master."
9+
10+
# Point at the regular differential crate.
11+
[lib]
12+
path = "../../src/lib.rs"
13+
14+
# Dependencies to build against timely master. Must mirror the dependencies in the main Cargo.toml.
15+
[dependencies]
16+
fnv="1.0.2"
17+
serde = { version = "1.0", features = ["derive"] }
18+
timely = { workspace = true }
19+
20+
[features]
21+
default = ["timely/getopts"]
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
[package]
2+
name = "differential-dogs3"
3+
version = "0.0.0"
4+
authors = ["Moritz Hoffmann <[email protected]>"]
5+
license = "MIT"
6+
edition = "2021"
7+
publish = false
8+
description = "A fake package to test dogsdogsdogs against timely master."
9+
10+
# Point at the regular dogsdogsdogs crate.
11+
[lib]
12+
path = "../../dogsdogsdogs/src/lib.rs"
13+
14+
# Dependencies to build against timely master. Must mirror the dependencies in the main Cargo.toml.
15+
[dependencies]
16+
differential-dataflow = { path = "../differential-dataflow", default-features = false }
17+
serde = { version = "1.0", features = ["derive"] }
18+
timely = { workspace = true }

0 commit comments

Comments
 (0)