Skip to content

Commit b0b8a29

Browse files
authored
ci: fix the quickstart perf workflow (#134)
1 parent 73ce432 commit b0b8a29

3 files changed

Lines changed: 63 additions & 17 deletions

File tree

.github/workflows/nightly_performance_score_director.yml renamed to .github/workflows/nightly_performance.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,10 @@ jobs:
2727
if git log --since="24 hours ago" --oneline | grep -q .; then
2828
cd ../timefold-solver-benchmarks
2929
echo '{}' | gh workflow run performance_score_director.yml --json
30-
echo "Launched nightly perf tests." >> $GITHUB_STEP_SUMMARY
30+
echo "Launched nightly score director perf tests." >> $GITHUB_STEP_SUMMARY
31+
sleep 1m
32+
echo '{}' | gh workflow run performance_quickstarts.yml --json
33+
echo "Queued nightly quickstart perf tests." >> $GITHUB_STEP_SUMMARY
3134
else
3235
# Don't waste money.
3336
echo "No commits in the past 24 hours." >> $GITHUB_STEP_SUMMARY

.github/workflows/performance_quickstarts.yml

Lines changed: 58 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -59,12 +59,12 @@ jobs:
5959
# When updating this list, use find-and-replace in the entire file to keep all such lists identical.
6060
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]
6161
steps:
62-
- name: Checkout timefold-solver-quickstarts
62+
- name: Checkout timefold-quickstarts
6363
uses: actions/checkout@v4
6464
with:
65-
repository: TimefoldAI/timefold-solver-quickstarts
66-
path: ./timefold-solver-quickstarts
67-
ref: main
65+
repository: TimefoldAI/timefold-quickstarts
66+
path: ./timefold-quickstarts
67+
ref: development
6868

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

88+
- name: Checkout timefold-solver-enterprise
89+
uses: actions/checkout@v4
90+
with:
91+
repository: TimefoldAI/timefold-solver-enterprise
92+
ref: ${{ github.event.inputs.baseline }}
93+
token: ${{ secrets.BENCHMARK_PUBLISH_TOKEN }}
94+
path: ./timefold-solver-enterprise
95+
96+
- name: Quickly build timefold-solver-enterprise
97+
working-directory: ./timefold-solver-enterprise
98+
shell: bash
99+
run: ./mvnw -B -Dquickly clean install
100+
88101
- name: Switch quickstarts to baseline branch if it exists
89-
working-directory: ./timefold-solver-quickstarts
102+
working-directory: ./timefold-quickstarts
90103
shell: bash
91104
env:
92105
TARGET_BRANCH: ${{ github.event.inputs.baseline }}
@@ -100,15 +113,15 @@ jobs:
100113
- name: Build the quickstart
101114
shell: bash
102115
run: |
103-
mvn -B -DskipTests package \
104-
-f timefold-solver-quickstarts/java/${{ matrix.example }}/pom.xml
116+
mvn -B -DskipTests -Penterprise package \
117+
-f timefold-quickstarts/java/${{ matrix.example }}/pom.xml
105118
106119
- name: Upload the binaries
107120
uses: actions/upload-artifact@v4
108121
with:
109122
name: baseline-${{ matrix.example }}
110123
path: |
111-
./timefold-solver-quickstarts/java/${{ matrix.example }}/target/quarkus-app/
124+
./timefold-quickstarts/java/${{ matrix.example }}/target/quarkus-app/
112125
if-no-files-found: error
113126

114127
build_sut:
@@ -119,12 +132,12 @@ jobs:
119132
# When updating this list, use find-and-replace in the entire file to keep all such lists identical.
120133
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]
121134
steps:
122-
- name: Checkout timefold-solver-quickstarts
135+
- name: Checkout timefold-quickstarts
123136
uses: actions/checkout@v4
124137
with:
125-
repository: TimefoldAI/timefold-solver-quickstarts
126-
path: ./timefold-solver-quickstarts
127-
ref: main
138+
repository: TimefoldAI/timefold-quickstarts
139+
path: ./timefold-quickstarts
140+
ref: development
128141

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

161+
- name: Checkout timefold-solver-enterprise
162+
uses: actions/checkout@v4
163+
with:
164+
repository: TimefoldAI/timefold-solver-enterprise
165+
ref: main
166+
token: ${{ secrets.BENCHMARK_PUBLISH_TOKEN }}
167+
path: ./timefold-solver-enterprise
168+
169+
- name: Switch timefold-solver-enterprise to branch under test if it exists
170+
working-directory: ./timefold-solver-enterprise
171+
shell: bash
172+
env:
173+
TARGET_BRANCH: ${{ github.event.inputs.branch }}
174+
run: |
175+
if git ls-remote --exit-code --heads origin "$TARGET_BRANCH" > /dev/null; then
176+
git fetch --depth=1 origin "$TARGET_BRANCH"
177+
git checkout -B "$TARGET_BRANCH" FETCH_HEAD
178+
fi
179+
git status
180+
181+
- name: Quickly build timefold-solver-enterprise
182+
working-directory: ./timefold-solver-enterprise
183+
shell: bash
184+
run: ./mvnw -B -Dquickly clean install
185+
148186
- name: Switch quickstarts to branch under test if it exists
149-
working-directory: ./timefold-solver-quickstarts
187+
working-directory: ./timefold-quickstarts
150188
shell: bash
151189
env:
152190
TARGET_BRANCH: ${{ github.event.inputs.branch }}
@@ -160,15 +198,15 @@ jobs:
160198
- name: Build the quickstart
161199
shell: bash
162200
run: |
163-
mvn -B -DskipTests package \
164-
-f timefold-solver-quickstarts/java/${{ matrix.example }}/pom.xml
201+
mvn -B -DskipTests -Penterprise package \
202+
-f timefold-quickstarts/java/${{ matrix.example }}/pom.xml
165203
166204
- name: Upload the binaries
167205
uses: actions/upload-artifact@v4
168206
with:
169207
name: sut-${{ matrix.example }}
170208
path: |
171-
./timefold-solver-quickstarts/java/${{ matrix.example }}/target/quarkus-app/
209+
./timefold-quickstarts/java/${{ matrix.example }}/target/quarkus-app/
172210
if-no-files-found: error
173211

174212
benchmark:
@@ -228,6 +266,8 @@ jobs:
228266
- name: (Baseline) Run the benchmark
229267
id: benchmark_baseline
230268
shell: bash
269+
env:
270+
TIMEFOLD_ENTERPRISE_LICENSE: ${{ secrets.TIMEFOLD_SOLVER_CI_PROD_LICENSE }}
231271
run: |
232272
python3 timefold-solver-benchmarks/benchmark-quickstarts.py \
233273
${{ matrix.example }} ./baseline-app \
@@ -249,6 +289,8 @@ jobs:
249289
- name: (SUT) Run the benchmark
250290
id: benchmark_sut
251291
shell: bash
292+
env:
293+
TIMEFOLD_ENTERPRISE_LICENSE: ${{ secrets.TIMEFOLD_SOLVER_CI_PROD_LICENSE }}
252294
run: |
253295
python3 timefold-solver-benchmarks/benchmark-quickstarts.py \
254296
${{ matrix.example }} ./sut-app \

benchmark-quickstarts.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@ def _run_once(
108108
"java",
109109
f"-Dquarkus.http.port={port}",
110110
f"-Dquarkus.timefold.solver.termination.spent-limit={time_limit}s",
111+
"-Dquarkus.timefold.solver.move-thread-count=NONE",
111112
"-Dquarkus.log.category.ai.timefold.solver.level=INFO",
112113
"-Dquarkus.console.color=false",
113114
"-jar", str(jar),

0 commit comments

Comments
 (0)