Merge pull request #227 from ISISNeutronMuon/protos-GUI-analysis #76
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
name: Build MDANSE | |
on: [push, pull_request] | |
jobs: | |
build_wheels: | |
name: Build wheels on ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-20.04, windows-2019, macOS-11] | |
python-version: ["3.8", "3.9", "3.10", "3.11"] | |
# os: [ubuntu-20.04, windows-2019, macOS-11, ubuntu-latest, windows-latest, macOS-latest] | |
if: | | |
contains( github.ref, 'protos' ) | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v3 | |
- name: Install build packages | |
run: python -m pip install build wheel setuptools | |
- name: Install dependencies | |
run: (cd MDANSE && python -m pip install -r requirements.txt) | |
- name: Build wheels | |
run: (cd MDANSE && python setup.py bdist_wheel) | |
# to supply options, put them in 'env', like: | |
# env: | |
# CIBW_SOME_OPTION: value | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: ${{ matrix.os }}_python${{ matrix.python-version }}_wheel | |
path: ./MDANSE/dist/*.whl | |
retention-days: 30 | |
build_gui_wheels: | |
name: Build GUI wheels on ${{ matrix.os }} | |
needs: [build_wheels] | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-20.04, windows-2019, macOS-11] | |
python-version: ["3.11"] | |
# os: [ubuntu-20.04, windows-2019, macOS-11, ubuntu-latest, windows-latest, macOS-latest] | |
if: | | |
contains( github.ref, 'protos' ) && | |
contains( github.ref, 'GUI' ) | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v3 | |
- uses: actions/download-artifact@v3 | |
with: | |
name: ${{ matrix.os }}_python${{ matrix.python-version }}_wheel | |
- name: Install build packages | |
run: python -m pip install build wheel setuptools | |
- name: Install MDANSE | |
if: runner.os == 'Linux' || runner.os == 'macOS' | |
run: python -m pip install *.whl | |
- name: Install MDANSE on Windows | |
if: runner.os == 'Windows' | |
run: foreach ($file in Get-ChildItem *.whl) {python -m pip install $file} | |
- name: Install dependencies | |
run: (cd MDANSE_GUI && python -m pip install -r requirements.txt) | |
- name: Build wheels | |
run: (cd MDANSE_GUI && python setup.py bdist_wheel) | |
# to supply options, put them in 'env', like: | |
# env: | |
# CIBW_SOME_OPTION: value | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: ${{ matrix.os }}_GUI_wheel | |
path: ./MDANSE_GUI/dist/*.whl | |
retention-days: 30 | |