Skip to content

Merge pull request #574 from BDonnot/bd_dev #44

Merge pull request #574 from BDonnot/bd_dev

Merge pull request #574 from BDonnot/bd_dev #44

Workflow file for this run

name: CI
on:
push:
branches:
- '*'
tags:
- 'v*.*.*'
jobs:
manylinux_build:
name: Build linux ${{ matrix.python.name }} wheel
runs-on: ubuntu-latest
container: quay.io/pypa/manylinux2014_x86_64
strategy:
matrix:
python:
- {
name: cp38,
abi: cp38,
version: '3.8',
}
- {
name: cp39,
abi: cp39,
version: '3.9',
}
- {
name: cp310,
abi: cp310,
version: '3.10',
}
- {
name: cp311,
abi: cp311,
version: '3.11',
}
- {
name: cp312,
abi: cp312,
version: '3.12',
}
steps:
- name: Checkout sources
uses: actions/checkout@v1
with:
submodules: true
- name: Setup path
run: echo "/opt/python/${{ matrix.python.name }}-${{ matrix.python.abi }}/bin/" >> $GITHUB_PATH
- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
python -m pip install --upgrade wheel
python -m pip install --upgrade setuptools
- name: Build wheel
run: |
python3 setup.py bdist_wheel
# auditwheel repair dist/*.whl # only for compiled code !
- name: Install wheel
run: pip3 install dist/*.whl --user
- name: Check package can be imported
run: |
python3 -c "import grid2op"
python3 -c "from grid2op import *"
python3 -c "from grid2op.Action._backendAction import _BackendAction"
- name: Upload wheel
uses: actions/upload-artifact@v2
with:
name: grid2op-wheel-${{ matrix.config.name }}-${{ matrix.python.name }}
path: dist/*.whl
macos_windows_build:
name: Build ${{ matrix.config.name }} ${{ matrix.python.name }} wheel
runs-on: ${{ matrix.config.os }}
strategy:
matrix:
config:
- {
name: darwin,
os: macos-latest,
}
- {
name: windows,
os: windows-2019,
}
python:
- {
name: cp38,
version: '3.8',
}
- {
name: cp39,
version: '3.9',
}
- {
name: cp310,
version: '3.10',
}
- {
name: cp311,
version: '3.11',
}
- {
name: cp312,
version: '3.12',
}
steps:
- name: Checkout sources
uses: actions/checkout@v1
with:
submodules: true
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python.version }}
- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
python -m pip install --upgrade wheel
python -m pip install --upgrade setuptools
- name: Build wheel
run: python setup.py bdist_wheel
- name: Install wheel
shell: bash
run: python -m pip install dist/*.whl --user
- name: Check package can be imported
run: |
python3 -c "import grid2op"
python3 -c "from grid2op import *"
python3 -c "from grid2op.Action._backendAction import _BackendAction"
- name: Build source archive
if: matrix.config.name == 'darwin' && matrix.python.name == 'cp310'
run: python setup.py sdist
- name: Upload wheel
uses: actions/upload-artifact@v2
with:
name: grid2op-wheel-${{ matrix.config.name }}-${{ matrix.python.name }}
path: dist/*.whl
- name: Upload source archive
uses: actions/upload-artifact@v2
if: matrix.config.name == 'darwin' && matrix.python.name == 'cp39'
with:
name: grid2op-sources
path: dist/*.tar.gz
package:
name: Test install
runs-on: ubuntu-latest
needs: [manylinux_build, macos_windows_build]
steps:
- name: Download wheels
uses: actions/download-artifact@v2
with:
path: download
- name: Upload wheels
uses: actions/upload-artifact@v2
with:
name: grid2op-wheels
path: |
download/**/*.whl
download/**/*.tar.gz