|
| 1 | +name: testUbuntu |
| 2 | + |
| 3 | +on: [push, pull_request] |
| 4 | + |
| 5 | +env: |
| 6 | + BUILD_TYPE: Release |
| 7 | + |
| 8 | +jobs: |
| 9 | + build: |
| 10 | + runs-on: ubuntu-latest |
| 11 | + |
| 12 | + steps: |
| 13 | + - uses: actions/checkout@v4 |
| 14 | + with: |
| 15 | + submodules: 'recursive' |
| 16 | + |
| 17 | + - name: Make some space |
| 18 | + run: | |
| 19 | + df -h |
| 20 | + sudo rm -rf /usr/share/dotnet |
| 21 | + sudo rm -rf /usr/share/swift |
| 22 | + sudo rm -rf /usr/local/lib/android |
| 23 | + sudo rm -rf /opt/hostedtoolcache |
| 24 | + sudo rm -rf /opt/ghc |
| 25 | + sudo rm -rf /opt/az |
| 26 | + df -h |
| 27 | +
|
| 28 | + - name: Install dependencies |
| 29 | + run: | |
| 30 | + sudo wget -qO - https://packages.lunarg.com/lunarg-signing-key-pub.asc | sudo apt-key add - |
| 31 | + sudo wget -qO /etc/apt/sources.list.d/lunarg-vulkan-1.3.224-focal.list https://packages.lunarg.com/vulkan/1.3.224/lunarg-vulkan-1.3.224-focal.list |
| 32 | + sudo apt update --yes |
| 33 | + sudo apt install --yes vulkan-sdk xorg-dev cmake libgtk-3-dev libdbus-1-dev libboost-dev |
| 34 | +
|
| 35 | + - name: Install Cuda |
| 36 | + |
| 37 | + id: cuda-toolkit |
| 38 | + with: |
| 39 | + cuda: '12.3.2' |
| 40 | + |
| 41 | + - name: Configure CMake |
| 42 | + run: cmake -B ${{github.workspace}}/build -DWERROR=YES -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DRAYX_REQUIRE_CUDA=ON |
| 43 | + |
| 44 | + - name: Build |
| 45 | + run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} |
| 46 | + |
| 47 | + - name: Run |
| 48 | + working-directory: ${{github.workspace}} |
| 49 | + run: | |
| 50 | + ./build/bin/release/rayx -x -c -m 1 -i Intern/rayx-core/tests/input/BoringImagePlane.rml |
| 51 | + git checkout -- Intern/rayx-core/tests/input/BoringImagePlane.csv |
| 52 | +
|
| 53 | + - name: Test |
| 54 | + working-directory: ${{github.workspace}}/build/bin/release |
| 55 | + run: ./rayx-core-tst -x |
| 56 | + |
| 57 | + - name: CPack |
| 58 | + working-directory: ${{github.workspace}}/build |
| 59 | + run: cpack -G DEB |
| 60 | + |
| 61 | + - name: Upload artifact |
| 62 | + uses: actions/upload-artifact@v4 |
| 63 | + with: |
| 64 | + name: RAYX |
| 65 | + path: ${{github.workspace}}/build/RAYX-*.*.*-Linux.deb |
| 66 | + |
0 commit comments