fix docker #373
Workflow file for this run
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: Windows | |
on: | |
push: | |
branches: [ master ] | |
tags: ['v*'] | |
pull_request: | |
branches: [ master ] | |
jobs: | |
build: | |
runs-on: windows-2019 | |
strategy: | |
fail-fast: false | |
# explicit include-based build matrix, of known valid options | |
matrix: | |
include: | |
# Windows2019 & VS 2019 supports 11.0+ | |
- os: windows-2019 | |
cuda: "11.2.0" | |
visual_studio: "Visual Studio 16 2019" | |
python-version: "3.8" | |
- os: windows-2019 | |
cuda: "11.2.0" | |
visual_studio: "Visual Studio 16 2019" | |
python-version: "3.9" | |
- os: windows-2019 | |
cuda: "11.2.0" | |
visual_studio: "Visual Studio 16 2019" | |
python-version: "3.10" | |
- os: windows-2019 | |
cuda: "11.2.0" | |
visual_studio: "Visual Studio 16 2019" | |
python-version: "3.11" | |
env: | |
build_dir: "build" | |
config: "Release" | |
steps: | |
- name: Checkout source code | |
uses: actions/checkout@v2 | |
with: | |
submodules: true | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v1 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install CUDA | |
uses: Jimver/cuda-toolkit@v0.2.8 | |
id: cuda-toolkit | |
with: | |
cuda: '11.7.0' | |
- name: nvcc check | |
shell: powershell | |
run: | | |
nvcc -V | |
ls $env:CUDA_PATH | |
ls $env:CUDA_PATH\bin | |
ls $env:CUDA_PATH\include | |
- name: cmake version | |
shell: bash | |
run: cmake --version | |
- name: Configure CMake | |
id: configure | |
shell: bash | |
run: cmake . -B ${{ env.build_dir }} -G "${{ matrix.visual_studio }}" -A x64 -DCMAKE_BUILD_TYPE=Release -DBUILD_GLEW=ON -DBUILD_GLFW=ON -DBUILD_PNG=ON -DBUILD_JSONCPP=ON | |
- name: Configure Error Processing | |
if: ${{ (failure() && steps.configure.outcome == 'failure') || success() }} | |
working-directory: ${{ env.build_dir }} | |
shell: bash | |
run: | | |
if [[ -f "CMakeFiles/CMakeOutput.log" ]]; then | |
echo "---- CMakeFiles/CMakeOutput.log" | |
cat CMakeFiles/CMakeOutput.log | |
echo "----" | |
fi | |
if [[ -f "CMakeFiles/CMakeError.log" ]]; then | |
echo "---- CMakeFiles/CMakeError.log" | |
cat CMakeFiles/CMakeError.log | |
echo "----" | |
fi | |
- name: Build | |
working-directory: ${{ env.build_dir }} | |
run: cmake --build . --config ${{ env.config }} --target ALL_BUILD --verbose | |
- name: Build package | |
working-directory: ${{ env.build_dir }} | |
run: | | |
python -m pip install -U pip wheel setuptools | |
cmake --build . --config ${{ env.config }} --target pip-package --verbose | |
- name: Publish package | |
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') && matrix.cuda == '11.2.0' | |
working-directory: ${{ env.build_dir }}/lib/python_package | |
env: | |
PYPI_USERNAME: ${{ secrets.pypi_username }} | |
PYPI_PASSWORD: ${{ secrets.pypi_password }} | |
run: | | |
python -m pip install twine | |
python -m twine upload -u $env:PYPI_USERNAME -p $env:PYPI_PASSWORD pip_package/* |