Skip to content

still debuging github #274

still debuging github

still debuging github #274

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
env:
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true
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: |
python setup.py bdist_wheel
# auditwheel repair dist/*.whl # only for compiled code !
- name: Install wheel
run: |
pip3 install dist/*.whl
pip freeze
- name: Check package can be imported
run: |
python -c "import grid2op"
python -c "from grid2op import *"
python -c "from grid2op.Action._backendAction import _BackendAction"
- name: List wheel
run:
ls ./dist/*.whl
- name: Upload wheel
uses: actions/upload-artifact@v3
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
pip freeze
- name: Check package can be imported
run: |
python -c "import grid2op"
python -c "from grid2op import *"
python -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 == 'cp310'
with:
name: grid2op-sources
path: dist/*.tar.gz
auto_class_in_file:
name: Test ${{ matrix.config.name }} OS can handle automatic class generation
runs-on: ${{ matrix.config.os }}
strategy:
matrix:
config:
- {
name: darwin,
os: macos-latest,
}
- {
name: windows,
os: windows-2019,
}
- {
name: ubuntu,
os: ubuntu-latest,
}
python:
- {
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
python -m pip install --upgrade gymnasium "numpy<2"
- name: Build wheel
run: python setup.py bdist_wheel
- name: Install wheel
shell: bash
run: |
python -m pip install dist/*.whl --user
pip freeze
- name: Test the automatic generation of classes in the env folder
run: |
python -m unittest grid2op/tests/automatic_classes.py -f
package:
name: Test install
runs-on: ubuntu-latest
needs: [manylinux_build, macos_windows_build, auto_class_in_file]
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