Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,10 @@ jobs:
if git log --since="24 hours ago" --oneline | grep -q .; then
cd ../timefold-solver-benchmarks
echo '{}' | gh workflow run performance_score_director.yml --json
echo "Launched nightly perf tests." >> $GITHUB_STEP_SUMMARY
echo "Launched nightly score director perf tests." >> $GITHUB_STEP_SUMMARY
sleep 1m
echo '{}' | gh workflow run performance_quickstarts.yml --json
echo "Queued nightly quickstart perf tests." >> $GITHUB_STEP_SUMMARY
else
# Don't waste money.
echo "No commits in the past 24 hours." >> $GITHUB_STEP_SUMMARY
Expand Down
74 changes: 58 additions & 16 deletions .github/workflows/performance_quickstarts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,12 @@ jobs:
# When updating this list, use find-and-replace in the entire file to keep all such lists identical.
example: [bed-allocation, conference-scheduling, employee-scheduling, facility-location, flight-crew-scheduling, food-packaging, maintenance-scheduling, meeting-scheduling, order-picking, project-job-scheduling, school-timetabling, sports-league-scheduling, task-assigning, tournament-scheduling, vehicle-routing]
steps:
- name: Checkout timefold-solver-quickstarts
- name: Checkout timefold-quickstarts
uses: actions/checkout@v4
with:
repository: TimefoldAI/timefold-solver-quickstarts
path: ./timefold-solver-quickstarts
ref: main
repository: TimefoldAI/timefold-quickstarts
path: ./timefold-quickstarts
ref: development

- name: Setup JDK and Maven
uses: actions/setup-java@v5
Expand All @@ -85,8 +85,21 @@ jobs:
shell: bash
run: ./mvnw -B -Dquickly clean install

- name: Checkout timefold-solver-enterprise
uses: actions/checkout@v4
with:
repository: TimefoldAI/timefold-solver-enterprise
ref: ${{ github.event.inputs.baseline }}
token: ${{ secrets.BENCHMARK_PUBLISH_TOKEN }}
path: ./timefold-solver-enterprise

- name: Quickly build timefold-solver-enterprise
working-directory: ./timefold-solver-enterprise
shell: bash
run: ./mvnw -B -Dquickly clean install

Comment on lines +88 to +100
- name: Switch quickstarts to baseline branch if it exists
working-directory: ./timefold-solver-quickstarts
working-directory: ./timefold-quickstarts
shell: bash
env:
TARGET_BRANCH: ${{ github.event.inputs.baseline }}
Expand All @@ -100,15 +113,15 @@ jobs:
- name: Build the quickstart
shell: bash
run: |
mvn -B -DskipTests package \
-f timefold-solver-quickstarts/java/${{ matrix.example }}/pom.xml
mvn -B -DskipTests -Penterprise package \
-f timefold-quickstarts/java/${{ matrix.example }}/pom.xml

- name: Upload the binaries
uses: actions/upload-artifact@v4
with:
name: baseline-${{ matrix.example }}
path: |
./timefold-solver-quickstarts/java/${{ matrix.example }}/target/quarkus-app/
./timefold-quickstarts/java/${{ matrix.example }}/target/quarkus-app/
if-no-files-found: error

build_sut:
Expand All @@ -119,12 +132,12 @@ jobs:
# When updating this list, use find-and-replace in the entire file to keep all such lists identical.
example: [bed-allocation, conference-scheduling, employee-scheduling, facility-location, flight-crew-scheduling, food-packaging, maintenance-scheduling, meeting-scheduling, order-picking, project-job-scheduling, school-timetabling, sports-league-scheduling, task-assigning, tournament-scheduling, vehicle-routing]
steps:
- name: Checkout timefold-solver-quickstarts
- name: Checkout timefold-quickstarts
uses: actions/checkout@v4
with:
repository: TimefoldAI/timefold-solver-quickstarts
path: ./timefold-solver-quickstarts
ref: main
repository: TimefoldAI/timefold-quickstarts
path: ./timefold-quickstarts
ref: development

- name: Setup JDK and Maven
uses: actions/setup-java@v5
Expand All @@ -145,8 +158,33 @@ jobs:
shell: bash
run: ./mvnw -B -Dquickly clean install

- name: Checkout timefold-solver-enterprise
uses: actions/checkout@v4
with:
repository: TimefoldAI/timefold-solver-enterprise
ref: main
token: ${{ secrets.BENCHMARK_PUBLISH_TOKEN }}
path: ./timefold-solver-enterprise

- name: Switch timefold-solver-enterprise to branch under test if it exists
working-directory: ./timefold-solver-enterprise
shell: bash
env:
TARGET_BRANCH: ${{ github.event.inputs.branch }}
run: |
if git ls-remote --exit-code --heads origin "$TARGET_BRANCH" > /dev/null; then
git fetch --depth=1 origin "$TARGET_BRANCH"
git checkout -B "$TARGET_BRANCH" FETCH_HEAD
fi
git status

- name: Quickly build timefold-solver-enterprise
working-directory: ./timefold-solver-enterprise
shell: bash
run: ./mvnw -B -Dquickly clean install

- name: Switch quickstarts to branch under test if it exists
working-directory: ./timefold-solver-quickstarts
working-directory: ./timefold-quickstarts
shell: bash
env:
TARGET_BRANCH: ${{ github.event.inputs.branch }}
Expand All @@ -160,15 +198,15 @@ jobs:
- name: Build the quickstart
shell: bash
run: |
mvn -B -DskipTests package \
-f timefold-solver-quickstarts/java/${{ matrix.example }}/pom.xml
mvn -B -DskipTests -Penterprise package \
-f timefold-quickstarts/java/${{ matrix.example }}/pom.xml

- name: Upload the binaries
uses: actions/upload-artifact@v4
with:
name: sut-${{ matrix.example }}
path: |
./timefold-solver-quickstarts/java/${{ matrix.example }}/target/quarkus-app/
./timefold-quickstarts/java/${{ matrix.example }}/target/quarkus-app/
if-no-files-found: error

benchmark:
Expand Down Expand Up @@ -228,6 +266,8 @@ jobs:
- name: (Baseline) Run the benchmark
id: benchmark_baseline
shell: bash
env:
TIMEFOLD_ENTERPRISE_LICENSE: ${{ secrets.TIMEFOLD_SOLVER_CI_PROD_LICENSE }}
run: |
python3 timefold-solver-benchmarks/benchmark-quickstarts.py \
${{ matrix.example }} ./baseline-app \
Expand All @@ -249,6 +289,8 @@ jobs:
- name: (SUT) Run the benchmark
id: benchmark_sut
shell: bash
env:
TIMEFOLD_ENTERPRISE_LICENSE: ${{ secrets.TIMEFOLD_SOLVER_CI_PROD_LICENSE }}
run: |
python3 timefold-solver-benchmarks/benchmark-quickstarts.py \
${{ matrix.example }} ./sut-app \
Expand Down
1 change: 1 addition & 0 deletions benchmark-quickstarts.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ def _run_once(
"java",
f"-Dquarkus.http.port={port}",
f"-Dquarkus.timefold.solver.termination.spent-limit={time_limit}s",
"-Dquarkus.timefold.solver.move-thread-count=NONE",
"-Dquarkus.log.category.ai.timefold.solver.level=INFO",
"-Dquarkus.console.color=false",
"-jar", str(jar),
Expand Down
Loading