Skip to content

Commit 092bc3d

Browse files
authored
Add script to run flink on CI (#1985)
Add manually-triggered Flink benchmark task to Earthly. --------- Signed-off-by: Matei <matei@feldera.com>
1 parent 55c7200 commit 092bc3d

File tree

2 files changed

+27
-0
lines changed

2 files changed

+27
-0
lines changed

Earthfile

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -580,6 +580,27 @@ benchmark:
580580
SAVE ARTIFACT crates/dbsp/galen_results.csv AS LOCAL .
581581
#SAVE ARTIFACT crates/dbsp/ldbc_results.csv AS LOCAL .
582582

583+
flink-benchmark:
584+
FROM +rust-sources
585+
586+
# Install docker compose - earthly can do this automatically, but it installs an older version
587+
ENV DOCKER_CONFIG=${DOCKER_CONFIG:-$HOME/.docker}
588+
RUN mkdir -p $DOCKER_CONFIG/cli-plugins
589+
RUN curl -SL https://github.com/docker/compose/releases/download/v2.24.0-birthday.10/docker-compose-linux-x86_64 -o $DOCKER_CONFIG/cli-plugins/docker-compose
590+
RUN chmod +x $DOCKER_CONFIG/cli-plugins/docker-compose
591+
RUN mkdir -p benchmark/flink
592+
COPY benchmark/flink/* benchmark/flink
593+
COPY benchmark/run-nexmark.sh benchmark
594+
RUN apt-get install maven
595+
RUN benchmark/flink/setup-flink.sh
596+
597+
RUN echo "when,runner,mode,language,name,num_cores,num_events,elapsed" >> flink_results.csv
598+
WITH DOCKER
599+
RUN docker compose -f benchmark/flink/docker-compose.yml -p nexmark up --build --force-recreate --renew-anon-volumes -d && \
600+
docker exec -i nexmark-jobmanager-1 run.sh 2>&1 | ./benchmark/run-nexmark.sh --runner flink --parse >> flink_results.csv
601+
END
602+
SAVE ARTIFACT flink_results.csv AS LOCAL .
603+
583604
all-tests:
584605
BUILD +formatting-check
585606
BUILD +machete

benchmark/flink/setup-flink.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#!/bin/sh -x
2+
cd "$(dirname "$0")"
3+
rm -rf nexmark nexmark-flink
4+
git clone https://github.com/blp/nexmark.git
5+
(cd nexmark/nexmark-flink && ./build.sh)
6+
tar xzf nexmark/nexmark-flink/nexmark-flink.tgz

0 commit comments

Comments
 (0)