move forward kernels in elastic.c into separate functions so that the… #48
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: Build and test | |
on: push | |
jobs: | |
# Linux-build: | |
# runs-on: ubuntu-latest | |
# container: quay.io/pypa/manylinux2014_x86_64 | |
# steps: | |
# - name: Checkout | |
# uses: actions/checkout@v3 | |
# - name: Install NVCC | |
# run: | | |
# yum-config-manager --add-repo https://developer.download.nvidia.com/compute/cuda/repos/rhel7/x86_64/cuda-rhel7.repo | |
# yum install -y cuda-nvcc-11-1-11.1.105-1 cuda-cudart-devel-11-1-11.1.74-1 | |
# - name: Compile | |
# run: | | |
# PATH=$PATH:/usr/local/cuda-11.1/bin | |
# CUDA_HOME=/usr/local/cuda-11.1 | |
# CUDA_ROOT=/usr/local/cuda-11.1 | |
# CUDA_PATH=/usr/local/cuda-11.1 | |
# CUDADIR=/usr/local/cuda-11.1 | |
# LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/cuda-11.1/lib64 | |
# cd src/deepwave | |
# cp /lib64/libgomp.so.1 . | |
# ./build_linux.sh | |
# - name: Archive built libraries | |
# uses: actions/upload-artifact@v3 | |
# with: | |
# name: linux_libraries | |
# path: src/deepwave/*.so* | |
MacOS-build: | |
runs-on: macos-11 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Set up Python | |
uses: actions/setup-python@v3 | |
- name: Install dependencies | |
run: | | |
nuget install intelopenmp.devel.osx -DirectDownload -NonInteractive | |
#ls -R | |
#python -m pip install torch | |
- name: Compile | |
run: | | |
cd src/deepwave | |
#cp `python -c "import torch; print(torch.__path__[0])"`/lib/libiomp5.dylib . | |
mv intelopenmp.devel.osx*/lib/native/osx-x64/libiomp5.dylib . | |
brew install libomp | |
./build_macos.sh | |
cd ../../ | |
python -m pip install --upgrade pip | |
python -m pip install pytest scipy | |
python -m pip install . | |
- name: Test with pytest | |
run: | | |
#pytest -s | |
cd tests | |
PYTHONVERBOSE=3 python -c "import test_elastic; test_wavefield_decays()" | |
# - name: Archive built libraries | |
# uses: actions/upload-artifact@v3 | |
# with: | |
# name: macos_libraries | |
# path: src/deepwave/*.dylib | |
# Windows-build: | |
# runs-on: windows-2019 | |
# defaults: | |
# run: | |
# shell: bash | |
# steps: | |
# - name: Checkout | |
# uses: actions/checkout@v3 | |
# - name: Set up Python | |
# uses: actions/setup-python@v3 | |
# - name: Install NVCC | |
# run: | | |
# curl https://developer.download.nvidia.com/compute/cuda/11.1.1/network_installers/cuda_11.1.1_win10_network.exe -o cuda_11.1.1_win10_network.exe | |
# chmod +x ./cuda_11.1.1_win10_network.exe | |
# ./cuda_11.1.1_win10_network.exe -s nvcc_11.1 cudart_11.1 | |
# echo "CUDA_PATH=C:\\Program Files\\NVIDIA GPU Computing Toolkit\\CUDA\\v11.1" >> $GITHUB_ENV | |
# echo "C:\\Program Files\\NVIDIA GPU Computing Toolkit\\CUDA\\v11.1\\bin" >> $GITHUB_PATH | |
# - name: Setup MSVC | |
# uses: ilammy/msvc-dev-cmd@v1 | |
# - name: Compile | |
# run: | | |
# cd src/deepwave | |
# nuget install intelopenmp.devel.win -DirectDownload -NonInteractive | |
# nuget install intelopenmp.redist.win -DirectDownload -NonInteractive | |
# mv intelopenmp.devel.win*/lib/native/win-x64/libiomp5md.lib . | |
# mv intelopenmp.redist.win*/runtimes/win-x86/native/libiomp5md.dll . | |
# ./build_windows.sh | |
# - name: Archive built libraries | |
# uses: actions/upload-artifact@v3 | |
# with: | |
# name: windows_libraries | |
# path: src/deepwave/*.dll | |
# Test: | |
# strategy: | |
# matrix: | |
# os: [ubuntu-latest, macos-latest, windows-latest] | |
# fail-fast: false | |
# runs-on: ${{ matrix.os }} | |
# needs: [Linux-build, MacOS-build, Windows-build] | |
# steps: | |
# - name: Checkout | |
# uses: actions/checkout@v3 | |
# - name: Download built Linux libraries | |
# uses: actions/download-artifact@v3 | |
# with: | |
# name: linux_libraries | |
# path: src/deepwave/ | |
# - name: Download built MacOS libraries | |
# uses: actions/download-artifact@v3 | |
# with: | |
# name: macos_libraries | |
# path: src/deepwave/ | |
# - name: Download built Windows libraries | |
# uses: actions/download-artifact@v3 | |
# with: | |
# name: windows_libraries | |
# path: src/deepwave/ | |
# - name: Set up Python | |
# uses: actions/setup-python@v3 | |
# - name: Install dependencies | |
# run: | | |
# python -m pip install --upgrade pip | |
# python -m pip install pytest scipy | |
# python -m pip install . | |
# - name: Test with pytest | |
# run: | | |
# PYTHONVERBOSE=3 pytest |