This repository has been archived by the owner on Jul 17, 2024. It is now read-only.
chore: Remove old wrapper generation code and use more Pythonic API #23
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Tests PRs on multiple operating systems and Python/Java versions | |
name: Test Build | |
on: | |
pull_request: | |
types: [opened, synchronize, reopened, labeled] | |
branches: | |
- main | |
paths-ignore: | |
- 'LICENSE*' | |
- '.gitignore' | |
- '**.md' | |
- '**.adoc' | |
- '*.txt' | |
- '.ci/**' | |
defaults: | |
run: | |
shell: bash | |
jobs: | |
test-build: | |
strategy: | |
matrix: | |
os: [ ubuntu-latest ] | |
java-version: [ 17, 21, 22 ] | |
fail-fast: false | |
runs-on: ${{ matrix.os }} | |
steps: | |
# 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 to access the scripts | |
uses: actions/checkout@v4 | |
with: | |
path: './timefold-solver' | |
repository: 'TimefoldAI/timefold-solver' | |
- name: Find the proper timefold-solver repo and branch | |
env: | |
CHAIN_USER: ${{ github.event.pull_request.head.repo.owner.login }} | |
CHAIN_BRANCH: ${{ github.head_ref }} | |
CHAIN_REPO: "timefold-solver" | |
CHAIN_DEFAULT_BRANCH: ${{ endsWith(github.head_ref, '.x') && github.head_ref || 'main' }} | |
shell: bash | |
run: | | |
./timefold-solver/.github/scripts/check_chain_repo.sh | |
rm -rf ./timefold-solver | |
- name: Checkout the proper timefold-solver branch | |
uses: actions/checkout@v4 | |
with: | |
repository: ${{ env.TARGET_CHAIN_USER }}/${{ env.TARGET_CHAIN_REPO }} | |
ref: ${{ env.TARGET_CHAIN_BRANCH }} | |
path: './timefold-solver' | |
fetch-depth: 0 # Otherwise merge in the next step will fail on account of not having history. | |
- name: Prevent stale fork of timefold-solver | |
env: | |
BLESSED_REPO: "timefold-solver" | |
BLESSED_BRANCH: ${{ endsWith(github.head_ref, '.x') && github.head_ref || 'main' }} | |
shell: bash | |
working-directory: ./timefold-solver | |
run: .github/scripts/prevent_stale_fork.sh | |
- name: Check out repository code | |
uses: actions/checkout@v4 | |
with: | |
path: './timefold-solver-python' | |
# Build and test | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v4 | |
with: | |
java-version: ${{ matrix.java-version }} | |
distribution: 'temurin' | |
cache: 'maven' | |
# Need to install all Python versions in the same run for tox | |
- name: Python 3.9, Python 3.10, Python 3.11 Setup | |
uses: actions/setup-python@v4 | |
with: | |
python-version: | | |
3.9 | |
3.10 | |
3.11 | |
cache: 'pip' | |
cache-dependency-path: | | |
**/setup.py | |
- name: Install tox | |
run: | |
python -m pip install --upgrade pip | |
pip install tox pytest | |
- name: Quickly build timefold-solver | |
working-directory: ./timefold-solver | |
run: mvn -B -Dquickly clean install | |
- name: Build with Maven to install parent poms for python build | |
working-directory: ./timefold-solver-python | |
run: mvn -B --fail-at-end clean install | |
- name: Run tox on timefold solver python test suite | |
working-directory: ./timefold-solver-python | |
run: python -m tox | |
- name: Run tox on jpyinterpreter test suite | |
working-directory: ./timefold-solver-python/jpyinterpreter | |
run: python -m tox |