Skip to content

Commit

Permalink
Build against timely master (#539)
Browse files Browse the repository at this point in the history
* 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]>
  • Loading branch information
antiguru authored Nov 25, 2024
1 parent 03b6ba4 commit 4dfb13a
Show file tree
Hide file tree
Showing 7 changed files with 120 additions and 1 deletion.
13 changes: 13 additions & 0 deletions .github/create-issue-on-failure.md
Original file line number Diff line number Diff line change
@@ -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
50 changes: 50 additions & 0 deletions .github/workflows/test-timely-master.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: "Test build against Timely master"
on:
workflow_dispatch:
schedule:
- cron: '38 3 * * *'

jobs:
tests:
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 check against Timely master
working-directory: timely_master
run: cargo check --all-targets
- name: Cargo test against Timely master
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
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
Cargo.lock
/target
target
10 changes: 10 additions & 0 deletions timely_master/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# This is not part of the regular workspace.
[workspace]
members = ["differential-dataflow", "differential-dogs3"]
resolver = "2"

[workspace.dependencies]
timely = { git = "https://github.com/TimelyDataflow/timely-dataflow", default-features = false }

[patch.crates-io]
timely = { git = "https://github.com/TimelyDataflow/timely-dataflow" }
7 changes: 7 additions & 0 deletions timely_master/README.md
Original file line number Diff line number Diff line change
@@ -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.
21 changes: 21 additions & 0 deletions timely_master/differential-dataflow/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
[package]
name = "differential-dataflow"
version = "0.0.0"
authors = ["Moritz Hoffmann <[email protected]>"]
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"]
18 changes: 18 additions & 0 deletions timely_master/differential-dogs3/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
[package]
name = "differential-dogs3"
version = "0.0.0"
authors = ["Moritz Hoffmann <[email protected]>"]
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 }

0 comments on commit 4dfb13a

Please sign in to comment.