Skip to content
Open
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
108 changes: 108 additions & 0 deletions .github/workflows/pylucid-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
name: pylucid test CI

on:
workflow_dispatch:
push:
branches: [main]
paths:
- "lucid/**"
- "bindings/pylucid/**"
- "test/**"
pull_request:
branches: [main]
paths:
- "lucid/**"
- "bindings/pylucid/**"
- "test/**"

env:
LUCID_FLAGS: --enable_gurobi_build=False --enable_matplotlib_build=False

jobs:
test:
runs-on: ${{ matrix.os }}
if: false # TODO: enable this again
strategy:
matrix:
os:
- ubuntu-latest
- macos-latest
- windows-latest
python_version:
- "3.9"
- "3.13"
# - "3.14" Need to upgrade gurobi to 13 first

steps:
- uses: actions/checkout@v6
- uses: ./.github/actions/bazel-cache
if: matrix.os != 'windows-latest'
- uses: ./.github/actions/frontend-setup
if: matrix.os == 'windows-latest'
- name: Install openmp on macOS
if: matrix.os == 'macos-latest'
run: |
brew install llvm libomp
export CC=/usr/local/opt/llvm/bin/clang
export CXX=/usr/local/opt/llvm/bin/clang++
- name: Run tests
run: |
bazel test --config=py --python_version=${{ matrix.python_version }} ${{ env.LUCID_FLAGS }} //tests/bindings/pylucid/...

build:
runs-on: ${{ matrix.os }}
# needs: test # TODO: enable this again
strategy:
fail-fast: false
matrix:
os:
- ubuntu-22.04
- macos-latest
- windows-latest
python_version:
- "3.9"
- "3.13"
# - "3.14" Need to upgrade gurobi to 13 first

steps:
- uses: actions/checkout@v6
- uses: ./.github/actions/gurobi-lib
id: gurobi-lib
with:
os: ${{ matrix.os }}
version: "12.0.0"
- uses: ./.github/actions/bazel-cache
- uses: ./.github/actions/frontend-setup
if: matrix.os == 'windows-latest'

# - name: Install openmp on macOS
# if: matrix.os == 'macos-latest'
# run: |
# brew install llvm libomp
# export CC=/usr/local/opt/llvm/bin/clang
# export CXX=/usr/local/opt/llvm/bin/clang++

- name: Install python
uses: actions/setup-python@v6
with:
python-version: "${{ matrix.python_version }}"
cache: "pip"
- name: Upgrade pip
run: python -m pip install --upgrade pip

- name: Install pip dependencies
run: |
python -m pip install --upgrade pip
pip install build setuptools wheel twine

- name: Build a binary wheel and a source tarball
run: python3 -m build
env:
GUROBI_HOME: ${{ steps.gurobi-lib.outputs.gurobi-home }}
LD_LIBRARY_PATH: ${{ steps.gurobi-lib.outputs.gurobi-home }}/lib

- name: Store the distribution packages
uses: actions/upload-artifact@v7
with:
name: python-package-${{ matrix.os }}-${{ matrix.python_version }}
path: dist/
2 changes: 1 addition & 1 deletion tools/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ pillow<=11.2.1
pyparsing<=3.2.3
python-dateutil<=2.9.0.post0
six<=1.17.0
tornado<=6.5.3
tornado<=6.5.5
scikit-learn<=1.6.1
joblib<=1.5.3
scipy<=1.15.2
Expand Down