Moved python setup above CMake configuration. #26
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 Windows | |
on: | |
push: | |
branches: | |
- master | |
- develop | |
workflow_dispatch: | |
env: | |
BUILD_TYPE: Release | |
jobs: | |
build: | |
runs-on: windows-2019 | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Setup Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 3.8 | |
- name: Install dependencies | |
run: | | |
pip install --upgrade pip | |
pip install wheel | |
- name: Configure CMake | |
run: | | |
cmake ${{github.workspace}} -B ${{github.workspace}}/build ` | |
-DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} ` | |
-DROMOCC_BUILD_TESTS=OFF ` | |
-DROMOCC_BUILD_EXAMPLES=OFF ` | |
-DROMOCC_BUILD_PYTHON_BINDINGS=ON ` | |
-DPYTHON_EXECUTABLE=$(which python) | |
- name: Build libromocc | |
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} -j 4 | |
- name: Build pyromocc python wheel | |
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} --target create_python_wheel | |
- name: Upload Python wheel | |
uses: actions/upload-artifact@v3 | |
with: | |
name: Python wheel | |
path: ${{github.workspace}}/build/pyromocc/dist/pyromocc-*.whl | |
if-no-files-found: error |