Skip to content

Commit

Permalink
trying to natively build on m1 chip, removing linnux build on arm64
Browse files Browse the repository at this point in the history
  • Loading branch information
BDonnot committed Apr 12, 2024
1 parent 0322425 commit cdfbb35
Showing 1 changed file with 23 additions and 23 deletions.
46 changes: 23 additions & 23 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,7 @@ jobs:
}

env:
RUNNER_OS: macos-latest
RUNNER_OS: ${{ matrix.runner.name }}
PYTHON_VERSION: ${{ matrix.python.version }}

steps:
Expand All @@ -385,7 +385,7 @@ jobs:
run: |
make
export __O3_OPTIM=1
python3 setup.py build
python setup.py build
- name: Build wheel
run: python setup.py bdist_wheel
Expand All @@ -399,13 +399,13 @@ jobs:
run: |
mkdir tmp_for_import_checking
cd tmp_for_import_checking
python3 -c "import lightsim2grid"
python3 -c "from lightsim2grid import *"
python3 -c "from lightsim2grid.newtonpf import newtonpf"
python3 -c "from lightsim2grid.timeSerie import TimeSeriesCPP"
python3 -c "from lightsim2grid.contingencyAnalysis import ContingencyAnalysisCPP"
python3 -c "from lightsim2grid.securityAnalysis import SecurityAnalysisCPP"
python3 -c "from lightsim2grid.gridmodel import init, GridModel"
python -c "import lightsim2grid"
python -c "from lightsim2grid import *"
python -c "from lightsim2grid.newtonpf import newtonpf"
python -c "from lightsim2grid.timeSerie import TimeSeriesCPP"
python -c "from lightsim2grid.contingencyAnalysis import ContingencyAnalysisCPP"
python -c "from lightsim2grid.securityAnalysis import SecurityAnalysisCPP"
python -c "from lightsim2grid.gridmodel import init, GridModel"
- name: Fix urllib3 (python 3.7)
if: matrix.python.name == 'cp37'
Expand All @@ -415,27 +415,27 @@ jobs:

- name: Install grid2op
run: |
python3 -m pip install grid2op
python3 -m pip freeze
python -m pip install grid2op
python -m pip freeze
- name: Check extra can be imported can be imported (with grid2op)
run:
cd tmp_for_import_checking
python3 -v -c "from lightsim2grid import LightSimBackend"
python3 -c "from lightsim2grid.timeSerie import TimeSerie"
python3 -c "from lightsim2grid.contingencyAnalysis import ContingencyAnalysis"
python3 -c "from lightsim2grid.physical_law_checker import PhysicalLawChecker"
python3 -c "from lightsim2grid.securityAnalysis import SecurityAnalysis"
python -v -c "from lightsim2grid import LightSimBackend"
python -c "from lightsim2grid.timeSerie import TimeSerie"
python -c "from lightsim2grid.contingencyAnalysis import ContingencyAnalysis"
python -c "from lightsim2grid.physical_law_checker import PhysicalLawChecker"
python -c "from lightsim2grid.securityAnalysis import SecurityAnalysis"

- name: Check LightSimBackend can be used to create env
run:
cd tmp_for_import_checking
python3 -v -c "from lightsim2grid import LightSimBackend; import grid2op; env = grid2op.make('l2rpn_case14_sandbox', test=True, backend=LightSimBackend())"
python -v -c "from lightsim2grid import LightSimBackend; import grid2op; env = grid2op.make('l2rpn_case14_sandbox', test=True, backend=LightSimBackend())"

- name: Upload wheel
uses: actions/upload-artifact@v3
with:
name: lightsim2grid-wheel-darwin-${{ matrix.python.name }}
name: lightsim2grid-wheel-darwin-${{ matrix.python.name }}-${{ matrix.runner.arch}}
path: dist/*.whl

# - name: Checkout sources
Expand Down Expand Up @@ -473,11 +473,11 @@ jobs:
# python -c "from lightsim2grid import LightSimBackend" &&
# python -c "from lightsim2grid import LightSimBackend; import grid2op; env = grid2op.make('l2rpn_case14_sandbox', test=True, backend=LightSimBackend())"

- name: Upload wheel
uses: actions/upload-artifact@v3
with:
name: lightsim2grid-wheel-darwin-${{ matrix.python.name }}-${{ matrix.runner.arch}}
path: dist/*.whl
# - name: Upload wheel
# uses: actions/upload-artifact@v3
# with:
# name: lightsim2grid-wheel-darwin-${{ matrix.python.name }}-${{ matrix.runner.arch}}
# path: ./wheelhouse/*.whl

package:
name: Package wheels
Expand Down

0 comments on commit cdfbb35

Please sign in to comment.