Skip to content

Commit

Permalink
Merge branch 'test-gha/develop' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
jacquev6 committed Jul 16, 2024
2 parents 402b146 + e65716c commit fee1b85
Show file tree
Hide file tree
Showing 4 changed files with 54 additions and 48 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Test building on GitHub Actions
on:
push:
branches:
- topics/test-gha
- test-gha/*
jobs:
build-for-linux:
runs-on: ubuntu-20.04
Expand Down Expand Up @@ -30,12 +30,7 @@ jobs:
tar xf boost_*.tar.gz
rm boost_*.tar.gz
cd boost_*
echo "using python : ${{ matrix.python_version }} ;" >tools/build/src/user-config.jam
./bootstrap.sh
./b2 --with-python python=${{ matrix.python_version }} link=shared variant=release stage
sudo cp -r boost /usr/local/include
sudo cp -r stage/lib/* /usr/local/lib
sudo ldconfig
- name: Install OR-Tools
run: |
cd /home/runner/work
Expand Down Expand Up @@ -109,12 +104,8 @@ jobs:
rm boost_*.tar.gz
mv boost_* boost
cd boost
echo "using python : ${{ matrix.python_version }} ;" >tools/build/src/user-config.jam
./bootstrap.bat
./b2 --with-python python=${{ matrix.python_version }} link=shared variant=release stage || true
mkdir -p /d/lincs-deps/include /d/lincs-deps/lib
cp -r boost /d/lincs-deps/include
cp -r stage/lib/* /d/lincs-deps/lib
- name: Install OR-Tools
shell: msys2 {0}
run: |
Expand All @@ -141,12 +132,12 @@ jobs:
run: twine check (get-item dist\*.whl)

build-for-macos:
runs-on: macos-11
runs-on: macos-12
strategy:
matrix:
python_version: ['3.8', '3.12']
env:
MACOSX_DEPLOYMENT_TARGET: 11.0
MACOSX_DEPLOYMENT_TARGET: 12.0
steps:
- name: Install Python
uses: actions/setup-python@v5
Expand All @@ -170,11 +161,7 @@ jobs:
tar xf boost_*.tar.gz
rm boost_*.tar.gz
cd boost_*
echo "using python : ${{ matrix.python_version }} ;" >tools/build/src/user-config.jam
./bootstrap.sh
./b2 --with-python python=${{ matrix.python_version }} link=shared variant=release stage
sudo cp -r boost /usr/local/include
sudo cp -r stage/lib/* /usr/local/lib
- name: Install OR-Tools
run: |
cd /Users/runner/work
Expand All @@ -194,3 +181,46 @@ jobs:
run: delocate-wheel --wheel-dir dist local-dist/*.whl
- name: Check the wheel
run: twine check dist/*.whl

check:
runs-on: ${{ matrix.os }}
needs:
- build-for-linux
- build-for-windows
- build-for-macos
strategy:
fail-fast: false
matrix:
os:
- ubuntu-20.04
- ubuntu-22.04
- ubuntu-24.04
- windows-2019
- windows-2022
- macos-12
- macos-13
# No macos-14: we don't support M1 chips
python_version: ['3.8', '3.12']
steps:
- name: Install Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python_version }}
# DO NOT install any other dependencies, to test that the wheels are self-contained

- name: Dowload the wheels from GitHub Actions artifacts
uses: actions/download-artifact@v4
with:
pattern: wheel-dist-${{ matrix.python_version }}-*
merge-multiple: true

- name: Install the wheel
run: pip${{ matrix.python_version }} install --find-links . --pre lincs

- name: Run lincs
run: lincs --help
- run: lincs generate classification-problem 3 2 --output-problem problem.yml
- run: lincs generate classification-model problem.yml --output-model model.yml
- run: lincs generate classified-alternatives problem.yml model.yml 100 --output-alternatives learning-set.csv
- run: lincs learn classification-model problem.yml learning-set.csv --output-model learned-model.yml
- run: lincs classification-accuracy problem.yml learned-model.yml learning-set.csv
19 changes: 3 additions & 16 deletions .github/workflows/distribute-pre-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,7 @@ jobs:
tar xf boost_*.tar.gz
rm boost_*.tar.gz
cd boost_*
echo "using python : ${{ matrix.python_version }} ;" >tools/build/src/user-config.jam
./bootstrap.sh
./b2 --with-python python=${{ matrix.python_version }} link=shared variant=release stage
sudo cp -r boost /usr/local/include
sudo cp -r stage/lib/* /usr/local/lib
sudo ldconfig
- name: Install OR-Tools
run: |
cd /home/runner/work
Expand Down Expand Up @@ -161,12 +156,8 @@ jobs:
rm boost_*.tar.gz
mv boost_* boost
cd boost
echo "using python : ${{ matrix.python_version }} ;" >tools/build/src/user-config.jam
./bootstrap.bat
./b2 --with-python python=${{ matrix.python_version }} link=shared variant=release stage || true
mkdir -p /d/lincs-deps/include /d/lincs-deps/lib
cp -r boost /d/lincs-deps/include
cp -r stage/lib/* /d/lincs-deps/lib
- name: Install OR-Tools
shell: msys2 {0}
run: |
Expand Down Expand Up @@ -206,14 +197,14 @@ jobs:
path: dist

build-for-macos:
runs-on: macos-11
runs-on: macos-12
needs:
- make-source-dist
strategy:
matrix:
python_version: ['3.8', '3.9', '3.10', '3.11', '3.12']
env:
MACOSX_DEPLOYMENT_TARGET: 11.0
MACOSX_DEPLOYMENT_TARGET: 12.0
steps:
- name: Install Python
uses: actions/setup-python@v5
Expand All @@ -237,11 +228,7 @@ jobs:
tar xf boost_*.tar.gz
rm boost_*.tar.gz
cd boost_*
echo "using python : ${{ matrix.python_version }} ;" >tools/build/src/user-config.jam
./bootstrap.sh
./b2 --with-python python=${{ matrix.python_version }} link=shared variant=release stage
sudo cp -r boost /usr/local/include
sudo cp -r stage/lib/* /usr/local/lib
- name: Install OR-Tools
run: |
cd /Users/runner/work
Expand Down Expand Up @@ -287,9 +274,9 @@ jobs:
- ubuntu-22.04
- windows-2019
- windows-2022
- macos-11
- macos-12
- macos-13
# No macos-14: we don't support M1 chips
python_version: ['3.8', '3.9', '3.10', '3.11', '3.12']
steps:
- name: Install Python
Expand Down
19 changes: 3 additions & 16 deletions .github/workflows/distribute-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,7 @@ jobs:
tar xf boost_*.tar.gz
rm boost_*.tar.gz
cd boost_*
echo "using python : ${{ matrix.python_version }} ;" >tools/build/src/user-config.jam
./bootstrap.sh
./b2 --with-python python=${{ matrix.python_version }} link=shared variant=release stage
sudo cp -r boost /usr/local/include
sudo cp -r stage/lib/* /usr/local/lib
sudo ldconfig
- name: Install OR-Tools
run: |
cd /home/runner/work
Expand Down Expand Up @@ -159,12 +154,8 @@ jobs:
rm boost_*.tar.gz
mv boost_* boost
cd boost
echo "using python : ${{ matrix.python_version }} ;" >tools/build/src/user-config.jam
./bootstrap.bat
./b2 --with-python python=${{ matrix.python_version }} link=shared variant=release stage || true
mkdir -p /d/lincs-deps/include /d/lincs-deps/lib
cp -r boost /d/lincs-deps/include
cp -r stage/lib/* /d/lincs-deps/lib
- name: Install OR-Tools
shell: msys2 {0}
run: |
Expand Down Expand Up @@ -204,14 +195,14 @@ jobs:
path: dist

build-for-macos:
runs-on: macos-11
runs-on: macos-12
needs:
- make-source-dist
strategy:
matrix:
python_version: ['3.8', '3.9', '3.10', '3.11', '3.12']
env:
MACOSX_DEPLOYMENT_TARGET: 11.0
MACOSX_DEPLOYMENT_TARGET: 12.0
steps:
- name: Install Python
uses: actions/setup-python@v5
Expand All @@ -235,11 +226,7 @@ jobs:
tar xf boost_*.tar.gz
rm boost_*.tar.gz
cd boost_*
echo "using python : ${{ matrix.python_version }} ;" >tools/build/src/user-config.jam
./bootstrap.sh
./b2 --with-python python=${{ matrix.python_version }} link=shared variant=release stage
sudo cp -r boost /usr/local/include
sudo cp -r stage/lib/* /usr/local/lib
- name: Install OR-Tools
run: |
cd /Users/runner/work
Expand Down Expand Up @@ -285,9 +272,9 @@ jobs:
- ubuntu-22.04
- windows-2019
- windows-2022
- macos-11
- macos-12
- macos-13
# No macos-14: we don't support M1 chips
python_version: ['3.8', '3.9', '3.10', '3.11', '3.12']
steps:
- name: Install Python
Expand Down
2 changes: 2 additions & 0 deletions doc-sources/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ Version 2.0.0 (2024-07-XX)

- Support Python 3.12

- Drop support for macOS 11 (`not supported by GitHub Actions anymore <https://github.blog/changelog/2024-05-20-actions-upcoming-changes-to-github-hosted-macos-runners/>_`)

- **Major** Support single-peaked criteria:
- on the command-line, ``lincs generate classification-problem`` has a new ``--allow-single-peaked-criteria`` option
- in the Problem file format, there is a new value ``single-peaked`` for ``preference_direction````
Expand Down

0 comments on commit fee1b85

Please sign in to comment.