Skip to content

Commit

Permalink
chore: improve score corruption error message (#14)
Browse files Browse the repository at this point in the history
  • Loading branch information
triceo authored May 3, 2024
1 parent 0ff9814 commit 5f26fa6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
10 changes: 7 additions & 3 deletions .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ jobs:
cancel-in-progress: true
timeout-minutes: 120
steps:
# Clone timefold-solver
# Need to check for stale repo, since Github is not aware of the build chain and therefore doesn't automate it.
- name: Checkout timefold-solver (PR) # Checkout the PR branch first, if it exists
if: github.head_ref # Only true if this is a PR.
id: checkout-solver
uses: actions/checkout@v4
continue-on-error: true
Expand All @@ -36,14 +36,15 @@ jobs:
path: ./timefold-solver
fetch-depth: 0 # Otherwise merge will fail on account of not having history.
- name: Checkout timefold-solver (main) # Checkout the main branch if the PR branch does not exist
if: steps.checkout-solver.outcome != 'success'
if: ${{ steps.checkout-solver.outcome != 'success' }}
uses: actions/checkout@v4
with:
repository: TimefoldAI/timefold-solver
ref: main
path: ./timefold-solver
fetch-depth: 0 # Otherwise merge will fail on account of not having history.
- name: Prevent stale fork of timefold-solver
- name: Prevent stale fork of timefold-solver # Solver can't be stale if main branch of blessed repo requested.
if: ${{ steps.checkout-solver.outcome == 'success' }}
env:
BLESSED_REPO: "timefold-solver"
BLESSED_BRANCH: ${{ endsWith(github.head_ref, '.x') && github.head_ref || 'main' }}
Expand All @@ -66,6 +67,7 @@ jobs:
# Clone timefold-solver-enterprise
# Need to check for stale repo, since Github is not aware of the build chain and therefore doesn't automate it.
- name: Checkout timefold-solver-enterprise (PR) # Checkout the PR branch first, if it exists
if: github.head_ref # Only true if this is a PR.
id: checkout-solver-enterprise
uses: actions/checkout@v4
continue-on-error: true
Expand All @@ -85,6 +87,7 @@ jobs:
path: ./timefold-solver-enterprise
fetch-depth: 0 # Otherwise merge will fail on account of not having history.
- name: Prevent stale fork of timefold-solver-enterprise
if: steps.checkout-solver-enterprise.outcome == 'success'
env:
BLESSED_REPO: "timefold-solver-enterprise"
BLESSED_BRANCH: ${{ endsWith(github.head_ref, '.x') && github.head_ref || 'main' }}
Expand All @@ -101,6 +104,7 @@ jobs:
uses: actions/checkout@v4
with:
repository: TimefoldAI/timefold-solver-benchmarks
ref: ${{ github.head_ref }}
path: ./timefold-solver-benchmarks
- name: Build and test timefold-solver-benchmarks
working-directory: ./timefold-solver-benchmarks
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ public final void setupIteration() {
var solverScope = new SolverScope<Solution_>();
solverScope.setScoreDirector(scoreDirector);
solverScope.setWorkingRandom(new Random(0)); // Fully reproducible random selection.
phaseScope = new LocalSearchPhaseScope<>(solverScope);
phaseScope = new LocalSearchPhaseScope<>(solverScope, 0);
moveSelector.solvingStarted(solverScope);
moveSelector.phaseStarted(phaseScope);
}
Expand Down

0 comments on commit 5f26fa6

Please sign in to comment.