Add ptu support and pyproject.toml, deprecate cython #25
Workflow file for this run
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: Checks | |
| on: | |
| push: | |
| branches: | |
| - main | |
| - add-ptu-support | |
| pull_request: | |
| branches: | |
| - main | |
| jobs: | |
| build: | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| python-version: ['3.11'] | |
| os: [macos-latest, ubuntu-latest, windows-latest] | |
| env: | |
| # Display must be available globally for linux to know where xvfb is | |
| DISPLAY: :0 | |
| steps: | |
| - uses: actions/checkout@v3 | |
| with: | |
| fetch-depth: 0 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v3 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| # building on macos results in a long run due to having to build the font cache | |
| - name: Cache Matplotlib font cache | |
| uses: actions/cache@v3 | |
| with: | |
| path: ~/.cache/matplotlib | |
| key: ${{ runner.os }}-matplotlib-${{ hashFiles('pyproject.toml') }} | |
| restore-keys: | | |
| ${{ runner.os }}-matplotlib- | |
| - name: Setup xvfb (Linux) | |
| if: runner.os == 'Linux' | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y \ | |
| xvfb \ | |
| libxkbcommon-x11-0 \ | |
| libxcb-icccm4 \ | |
| libxcb-image0 \ | |
| libxcb-keysyms1 \ | |
| libxcb-randr0 \ | |
| libxcb-render-util0 \ | |
| libxcb-xinerama0 \ | |
| libxcb-xinput0 \ | |
| libxcb-xfixes0 \ | |
| libegl1 \ | |
| libegl-mesa0 \ | |
| libgl1-mesa-dri | |
| # start xvfb in the background | |
| sudo /usr/bin/Xvfb $DISPLAY -screen 0 1280x1024x24 & | |
| - name: Install dependencies | |
| run: | | |
| # prerequisites | |
| python -m pip install --upgrade pip wheel | |
| python -m pip install coverage flake8 pytest | |
| python -m pip install -r tests/requirements.txt | |
| # install dependencies | |
| pip install -e . | |
| # show installed packages | |
| pip freeze | |
| # - name: Install large dependencies (Linux) | |
| # if: runner.os == 'Linux' | |
| # run: | | |
| # pip install -U -f https://extras.wxpython.org/wxPython4/extras/linux/gtk3/ubuntu-24.04 wxPython | |
| # pip install .[GUI] | |
| # - name: Install large dependencies (macOS) | |
| # if: runner.os == 'macOS' | |
| # run: | | |
| # pip install -U -f https://extras.wxpython.org/wxPython4/extras/linux/gtk3/ubuntu-24.04 wxPython | |
| # pip install --prefer-binary matplotlib | |
| # pip install .[GUI] | |
| # - name: Install large dependencies (Windows) | |
| # if: runner.os == 'windows' | |
| # run: | | |
| # pip install .[GUI] | |
| - name: Test | |
| run: | | |
| coverage run --source=pycorrfit -m pytest tests | |
| - name: Upload coverage to Codecov | |
| uses: codecov/codecov-action@v3 | |
| # - name: Create app and check if it runs (macOS) | |
| # if: runner.os == 'macOS' | |
| # working-directory: ./build-recipes | |
| # run: | | |
| # bash ./macos_build_app.sh PyCorrFit $(python -m pycorrfit --version) | |
| # - name: Upload build artifacts | |
| # if: (runner.os == 'macOS') | |
| # uses: actions/upload-artifact@v4 | |
| # with: | |
| # name: PyCorrFit_macosx | |
| # path: | | |
| # ./build-recipes/dist/*.dmg | |
| # - name: Create app and check if it runs (Win) | |
| # if: runner.os == 'windows' | |
| # working-directory: ./build-recipes | |
| # run: | | |
| # pip install -r win_build_requirements.txt | |
| # pyinstaller -y --log-level=WARN win_PyCorrFit.spec | |
| # .\dist\PyCorrFit\PyCorrFit.exe --version | |
| # python win_make_iss.py | |
| # iscc /Q win_bmicro.iss | |
| # - name: Upload build artifacts | |
| # if: (runner.os == 'windows') | |
| # uses: actions/upload-artifact@v4 | |
| # with: | |
| # name: PyCorrFit | |
| # path: | | |
| # ./build-recipes/Output/*.exe |