|
1 | 1 | name: Build and test |
2 | 2 | on: push |
3 | 3 | jobs: |
4 | | - Linux-build: |
5 | | - runs-on: ubuntu-latest |
6 | | - container: quay.io/pypa/manylinux2014_x86_64 |
7 | | - steps: |
8 | | - - name: Checkout |
9 | | - uses: actions/checkout@v5 |
10 | | - - name: Install NVCC |
11 | | - run: | |
12 | | - yum-config-manager --add-repo https://developer.download.nvidia.com/compute/cuda/repos/rhel7/x86_64/cuda-rhel7.repo |
13 | | - yum install -y cuda-nvcc-11-1-11.1.105-1 cuda-cudart-devel-11-1-11.1.74-1 |
14 | | - - name: Compile |
15 | | - run: | |
16 | | - PATH=$PATH:/usr/local/cuda-11.1/bin |
17 | | - CUDA_HOME=/usr/local/cuda-11.1 |
18 | | - CUDA_ROOT=/usr/local/cuda-11.1 |
19 | | - CUDA_PATH=/usr/local/cuda-11.1 |
20 | | - CUDADIR=/usr/local/cuda-11.1 |
21 | | - LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/cuda-11.1/lib64 |
22 | | - cd src/deepwave |
23 | | - cp /lib64/libgomp.so.1 . |
24 | | - ./build_linux.sh |
25 | | - - name: Archive built libraries |
26 | | - uses: actions/upload-artifact@v4 |
27 | | - with: |
28 | | - name: linux_libraries |
29 | | - path: src/deepwave/*.so* |
30 | | - MacOS-build: |
31 | | - runs-on: macos-11 |
32 | | - steps: |
33 | | - - name: Checkout |
34 | | - uses: actions/checkout@v5 |
35 | | - - name: Compile |
36 | | - run: | |
37 | | - cd src/deepwave |
38 | | - ./build_macos.sh |
39 | | - - name: Archive built libraries |
40 | | - uses: actions/upload-artifact@v4 |
41 | | - with: |
42 | | - name: macos_libraries |
43 | | - path: src/deepwave/*.dylib |
44 | | - Windows-build: |
45 | | - runs-on: windows-2019 |
46 | | - defaults: |
47 | | - run: |
48 | | - shell: bash |
49 | | - steps: |
50 | | - - name: Checkout |
51 | | - uses: actions/checkout@v5 |
52 | | - - name: Install NVCC |
53 | | - run: | |
54 | | - 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 |
55 | | - chmod +x ./cuda_11.1.1_win10_network.exe |
56 | | - ./cuda_11.1.1_win10_network.exe -s nvcc_11.1 cudart_11.1 |
57 | | - echo "CUDA_PATH=C:\\Program Files\\NVIDIA GPU Computing Toolkit\\CUDA\\v11.1" >> $GITHUB_ENV |
58 | | - echo "C:\\Program Files\\NVIDIA GPU Computing Toolkit\\CUDA\\v11.1\\bin" >> $GITHUB_PATH |
59 | | - - name: Setup MSVC |
60 | | - uses: ilammy/msvc-dev-cmd@v1 |
61 | | - - name: Compile |
62 | | - run: | |
63 | | - cd src/deepwave |
64 | | - nuget install intelopenmp.devel.win -DirectDownload -NonInteractive |
65 | | - nuget install intelopenmp.redist.win -DirectDownload -NonInteractive |
66 | | - cp intelopenmp.devel.win*/lib/native/win-x64/libiomp5md.lib . |
67 | | - cp intelopenmp.redist.win*/runtimes/win-x86/native/libiomp5md.dll . |
68 | | - ./build_windows.sh |
69 | | - - name: Archive built libraries |
70 | | - uses: actions/upload-artifact@v4 |
71 | | - with: |
72 | | - name: windows_libraries |
73 | | - path: src/deepwave/*.dll |
74 | | - Test: |
75 | | - strategy: |
76 | | - matrix: |
77 | | - os: [ubuntu-latest, macos-latest, windows-latest] |
78 | | - fail-fast: false |
79 | | - runs-on: ${{ matrix.os }} |
80 | | - needs: [Linux-build, MacOS-build, Windows-build] |
81 | | - steps: |
82 | | - - name: Checkout |
83 | | - uses: actions/checkout@v5 |
84 | | - - name: Download built Linux libraries |
85 | | - uses: actions/download-artifact@v4 |
86 | | - with: |
87 | | - name: linux_libraries |
88 | | - path: src/deepwave/ |
89 | | - - name: Download built MacOS libraries |
90 | | - uses: actions/download-artifact@v4 |
91 | | - with: |
92 | | - name: macos_libraries |
93 | | - path: src/deepwave/ |
94 | | - - name: Download built Windows libraries |
95 | | - uses: actions/download-artifact@v4 |
96 | | - with: |
97 | | - name: windows_libraries |
98 | | - path: src/deepwave/ |
99 | | - - name: Set up Python |
100 | | - uses: actions/setup-python@v5 |
101 | | - - name: Install dependencies |
102 | | - run: | |
103 | | - python -m pip install --upgrade pip |
104 | | - python -m pip install pytest scipy |
105 | | - python -m pip install . |
106 | | - - name: Test with pytest (full) |
107 | | - if: matrix.os == 'ubuntu-latest' |
108 | | - run: pytest |
109 | | - - name: Test with pytest (partial) |
110 | | - if: matrix.os != 'ubuntu-latest' |
111 | | - run: pytest tests/test_scalar.py |
| 4 | + Linux-build: |
| 5 | + runs-on: ubuntu-latest |
| 6 | + steps: |
| 7 | + - name: Checkout |
| 8 | + uses: actions/checkout@v4 |
| 9 | + - name: Install dependencies and build |
| 10 | + run: | |
| 11 | + docker run --rm -v ${{ github.workspace }}:/workspace -w /workspace quay.io/pypa/manylinux2014_x86_64 /bin/bash -c "\ |
| 12 | + yum-config-manager --add-repo https://developer.download.nvidia.com/compute/cuda/repos/rhel7/x86_64/cuda-rhel7.repo |
| 13 | + yum install -y cuda-nvcc-11-1-11.1.105-1 cuda-cudart-devel-11-1-11.1.74-1 && \ |
| 14 | + export PATH=\$PATH:/usr/local/cuda-11.1/bin && \ |
| 15 | + export CUDA_HOME=/usr/local/cuda-11.1 && \ |
| 16 | + export CUDA_ROOT=/usr/local/cuda-11.1 && \ |
| 17 | + export CUDA_PATH=/usr/local/cuda-11.1 && \ |
| 18 | + export CUDADIR=/usr/local/cuda-11.1 && \ |
| 19 | + export LD_LIBRARY_PATH=\$LD_LIBRARY_PATH:/usr/local/cuda-11.1/lib64 && \ |
| 20 | + cd /workspace/src/deepwave && \ |
| 21 | + cp /lib64/libgomp.so.1 . && \ |
| 22 | + ./build_linux.sh" |
| 23 | + - name: Archive built libraries |
| 24 | + uses: actions/upload-artifact@v4 |
| 25 | + with: |
| 26 | + name: linux_libraries |
| 27 | + path: src/deepwave/*.so* |
| 28 | + # MacOS-build: |
| 29 | + # runs-on: macos-latest |
| 30 | + # steps: |
| 31 | + # - name: Checkout |
| 32 | + # uses: actions/checkout@v5 |
| 33 | + # - name: Compile |
| 34 | + # run: | |
| 35 | + # cd src/deepwave |
| 36 | + # ./build_macos.sh |
| 37 | + # - name: Archive built libraries |
| 38 | + # uses: actions/upload-artifact@v4 |
| 39 | + # with: |
| 40 | + # name: macos_libraries |
| 41 | + # path: src/deepwave/*.dylib |
| 42 | + Windows-build: |
| 43 | + runs-on: windows-latest |
| 44 | + defaults: |
| 45 | + run: |
| 46 | + shell: bash |
| 47 | + steps: |
| 48 | + - name: Checkout |
| 49 | + uses: actions/checkout@v5 |
| 50 | + - name: Install NVCC |
| 51 | + run: | |
| 52 | + 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 |
| 53 | + chmod +x ./cuda_12.4.0_windows_network.exe |
| 54 | + ./cuda_12.4.0_windows_network.exe -s nvcc_12.4 cudart_12.4 |
| 55 | + echo "CUDA_PATH=C:\\Program Files\\NVIDIA GPU Computing Toolkit\\CUDA\\v12.4" >> $GITHUB_ENV |
| 56 | + echo "C:\\Program Files\\NVIDIA GPU Computing Toolkit\\CUDA\\v12.4\\bin" >> $GITHUB_PATH |
| 57 | + - name: Setup MSVC |
| 58 | + uses: ilammy/msvc-dev-cmd@v1 |
| 59 | + - name: Compile |
| 60 | + run: | |
| 61 | + cd src/deepwave |
| 62 | + nuget install intelopenmp.devel.win -DirectDownload -NonInteractive |
| 63 | + nuget install intelopenmp.redist.win -DirectDownload -NonInteractive |
| 64 | + cp intelopenmp.devel.win*/build/native/win-x64/libiomp5md.lib . |
| 65 | + cp intelopenmp.redist.win*/runtimes/win-x64/native/libiomp5md.dll . |
| 66 | + ./build_windows.sh |
| 67 | + - name: Archive built libraries |
| 68 | + uses: actions/upload-artifact@v4 |
| 69 | + with: |
| 70 | + name: windows_libraries |
| 71 | + path: src/deepwave/*.dll |
| 72 | + # Test: |
| 73 | + # strategy: |
| 74 | + # matrix: |
| 75 | + # os: [ubuntu-latest, macos-latest, windows-latest] |
| 76 | + # fail-fast: false |
| 77 | + # runs-on: ${{ matrix.os }} |
| 78 | + # needs: [Linux-build, MacOS-build, Windows-build] |
| 79 | + # steps: |
| 80 | + # - name: Checkout |
| 81 | + # uses: actions/checkout@v5 |
| 82 | + # - name: Download built Linux libraries |
| 83 | + # uses: actions/download-artifact@v4 |
| 84 | + # with: |
| 85 | + # name: linux_libraries |
| 86 | + # path: src/deepwave/ |
| 87 | + # - name: Download built MacOS libraries |
| 88 | + # uses: actions/download-artifact@v4 |
| 89 | + # with: |
| 90 | + # name: macos_libraries |
| 91 | + # path: src/deepwave/ |
| 92 | + # - name: Download built Windows libraries |
| 93 | + # uses: actions/download-artifact@v4 |
| 94 | + # with: |
| 95 | + # name: windows_libraries |
| 96 | + # path: src/deepwave/ |
| 97 | + # - name: Set up Python |
| 98 | + # uses: actions/setup-python@v5 |
| 99 | + # - name: Install dependencies |
| 100 | + # run: | |
| 101 | + # python -m pip install --upgrade pip |
| 102 | + # python -m pip install pytest scipy |
| 103 | + # python -m pip install . |
| 104 | + # - name: Test with pytest (full) |
| 105 | + # if: matrix.os == 'ubuntu-latest' |
| 106 | + # run: pytest |
| 107 | + # - name: Test with pytest (partial) |
| 108 | + # if: matrix.os != 'ubuntu-latest' |
| 109 | + # run: pytest tests/test_scalar.py |
0 commit comments