Fix build_ext configuration and include path issues #13
This file contains hidden or 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
| name: CI | |
| on: | |
| push: | |
| branches: [ main ] | |
| pull_request: | |
| branches: [ main ] | |
| jobs: | |
| test: | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest, macos-latest, windows-latest] | |
| python-version: ['3.8', '3.9', '3.10', '3.11', '3.12'] | |
| fail-fast: false | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install build tools (Windows) | |
| if: runner.os == 'Windows' | |
| run: | | |
| choco install visualstudio2019buildtools --include-optional | |
| choco install windows-sdk-10.0 --include-optional | |
| - name: Set environment variables (Windows) | |
| if: runner.os == 'Windows' | |
| run: | | |
| setx PATH "%PATH%;C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\Current\Bin" | |
| - name: Debug environment | |
| run: | | |
| echo "OS: ${{ matrix.os }}" | |
| echo "Python Version: ${{ matrix.python-version }}" | |
| python --version | |
| pip list | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -e '.[test]' | |
| - name: Run tests with pytest | |
| run: | | |
| pytest tests/ -v | |
| lint: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.12' | |
| - name: Install linting dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install black isort flake8 | |
| - name: Auto-correct formatting issues | |
| run: | | |
| black optimrl tests | |
| isort optimrl tests | |
| - name: Check code formatting | |
| run: | | |
| black --check optimrl tests | |
| isort --check-only optimrl tests | |
| flake8 optimrl tests |