Updates Linux container and CUDA version #160
Workflow file for this run
This file contains hidden or 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 and test | |
| on: [push, pull_request] | |
| jobs: | |
| build_wheels: | |
| name: Build wheels on ${{ matrix.os }} | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest] #, windows-2022, macos-13, macos-14] | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Check if tests should be skipped | |
| id: check-skip | |
| run: | | |
| if echo "${{ github.event.head_commit.message }}" | grep -q "\[skip tests\]"; then | |
| echo "skip_tests=true" >> $GITHUB_OUTPUT | |
| else | |
| echo "skip_tests=false" >> $GITHUB_OUTPUT | |
| fi | |
| shell: bash | |
| - name: Build wheels | |
| uses: pypa/cibuildwheel@v3.3.0 | |
| env: | |
| # For Linux, install CUDA in the container. Note that manylinux_2_28 | |
| # is specified in pyproject.toml | |
| CIBW_BEFORE_ALL_LINUX: > | |
| curl -sL https://developer.download.nvidia.com/compute/cuda/repos/rhel8/x86_64/cuda-rhel8.repo -o /etc/yum.repos.d/cuda-rhel8.repo && dnf install -y cuda-nvcc-12-4 cuda-cudart-devel-12-4 gcc-toolset-12 | |
| CIBW_ENVIRONMENT_LINUX: PATH="/opt/rh/gcc-toolset-12/root/usr/bin/:$PATH:/usr/local/cuda-12.4/bin" CUDA_PATH="/usr/local/cuda-12.4/bin" CUDA_HOME="/usr/local/cuda-12.4" CUDA_ROOT="/usr/local/cuda-12.4" LD_LIBRARY_PATH="/opt/rh/gcc-toolset-12/root/usr/lib64:$LD_LIBRARY_PATH:/usr/local/cuda-12.4/lib64" CUDACXX="/usr/local/cuda-12.4/bin/nvcc" CC=/opt/rh/gcc-toolset-12/root/usr/bin/gcc CXX=/opt/rh/gcc-toolset-12/root/usr/bin/g++ CMAKE_CUDA_HOST_COMPILER=/opt/rh/gcc-toolset-12/root/usr/bin/g++ | |
| # For Windows, install CUDA | |
| CIBW_BEFORE_ALL_WINDOWS: > | |
| nuget install intelopenmp.devel.win -DirectDownload -NonInteractive && | |
| nuget install intelopenmp.redist.win -DirectDownload -NonInteractive && | |
| cp intelopenmp.devel.win*/build/native/win-x64/libiomp5md.lib src/deepwave && | |
| cp intelopenmp.redist.win*/runtimes/win-x64/native/libiomp5md.dll src/deepwave && | |
| curl https://developer.download.nvidia.com/compute/cuda/12.4.0/network_installers/cuda_12.4.0_windows_network.exe -o cuda_12.4.0_windows_network.exe && | |
| cuda_12.4.0_windows_network.exe -s nvcc_12.4 cudart_12.4 visual_studio_integration_12.4 | |
| CIBW_ENVIRONMENT_WINDOWS: PATH="$PATH;C:\\Program Files\\NVIDIA GPU Computing Toolkit\\CUDA\\v12.4\\bin" CudaToolkitDir="C:\\Program Files\\NVIDIA GPU Computing Toolkit\\CUDA\\v12.4" CUDA_PATH="C:\\Program Files\\NVIDIA GPU Computing Toolkit\\CUDA\\v12.4" CUDA_HOME="C:\\Program Files\\NVIDIA GPU Computing Toolkit\\CUDA\\v12.4" CUDAToolkit_ROOT="C:\\Program Files\\NVIDIA GPU Computing Toolkit\\CUDA\\v12.4" CUDACXX="C:\\Program Files\\NVIDIA GPU Computing Toolkit\\CUDA\\v12.4\\bin\\nvcc.exe" | |
| CIBW_BEFORE_TEST_MACOS: pip install "numpy<2" | |
| CIBW_TEST_SKIP: ${{ steps.check-skip.outputs.skip_tests == 'true' && '*' || '' }} | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }} | |
| path: ./wheelhouse/*.whl | |
| # build_sdist: | |
| # name: Build source distribution | |
| # runs-on: ubuntu-latest | |
| # steps: | |
| # - uses: actions/checkout@v5 | |
| # | |
| # - name: Build sdist | |
| # run: pipx run build --sdist | |
| # | |
| # - uses: actions/upload-artifact@v4 | |
| # with: | |
| # path: dist/*.tar.gz |