Task02 Максим Синицын HSE #1832
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: CMake | |
| on: [push, pull_request] | |
| env: | |
| BUILD_TYPE: RelWithDebInfo | |
| jobs: | |
| build: | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - name: Install prerequisites | |
| run: | | |
| sudo apt update | |
| sudo apt install -y g++-13 | |
| sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-13 90 | |
| sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-13 90 | |
| - name: Install OpenCL CPU driver | |
| run: sudo bash scripts/linux/install_opencl_cpu_driver.sh; | |
| - name: Install Vulkan CPU driver | |
| run: sudo bash scripts/linux/install_vulkan_cpu_driver.sh; | |
| - name: Show clinfo full output | |
| run: clinfo | |
| - name: Install CUDA SDK | |
| run: sudo bash scripts/linux/install_cuda_sdk.sh; | |
| - name: Install Vulkan SDK | |
| run: sudo bash scripts/linux/install_vulkan_sdk.sh --no-validation-layers; # we don't compile validation layers on each CI run because it is too slow | |
| - name: Install dependencies (gtest and graphicsmagick) | |
| run: sudo bash scripts/linux/install_dependencies.sh; | |
| - name: Configure CMake | |
| run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DGPU_CUDA_SUPPORT=ON -DCMAKE_CUDA_ARCHITECTURES=75 -DCMAKE_CUDA_COMPILER=/usr/local/cuda/bin/nvcc | |
| - name: Build | |
| run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} --parallel $(nproc) | |
| - name: Make CUDA stubs visible (no driver on runner) | |
| run: | | |
| sudo ln -sf /usr/local/cuda/targets/x86_64-linux/lib/stubs/libcuda.so \ | |
| /usr/local/cuda/targets/x86_64-linux/lib/stubs/libcuda.so.1 | |
| echo "LD_LIBRARY_PATH=/usr/local/cuda/targets/x86_64-linux/lib/stubs:/usr/local/cuda/lib64:$LD_LIBRARY_PATH" >> $GITHUB_ENV | |
| - name: Run libs/gpu unit-tests | |
| working-directory: ${{github.workspace}}/build | |
| run: AVK_ENABLE_VALIDATION_LAYERS=false ./libs/gpu/libgpu_test --gtest_filter=-vulkan.* | |
| - name: Run main_aplusb | |
| working-directory: ${{github.workspace}}/build | |
| run: | | |
| ./main_aplusb 0 | |
| ./main_aplusb 1 | |
| - name: Run main_mandelbrot | |
| working-directory: ${{github.workspace}}/build | |
| run: | | |
| ./main_mandelbrot 0 | |
| - name: Run main_sum | |
| working-directory: ${{github.workspace}}/build | |
| run: | | |
| ./main_sum 0 |