|
| 1 | +name: Linux |
| 2 | + |
| 3 | +on: [push, pull_request] |
| 4 | + |
| 5 | +jobs: |
| 6 | + build-gcc-9: |
| 7 | + strategy: |
| 8 | + matrix: |
| 9 | + config: [Debug, Release] |
| 10 | + |
| 11 | + runs-on: ubuntu-latest |
| 12 | + name: Linux x64, GCC 9, ${{ matrix.config }} |
| 13 | + |
| 14 | + steps: |
| 15 | + - name: Clone DiligentTools |
| 16 | + uses: actions/checkout@v2 |
| 17 | + with: |
| 18 | + path: DiligentTools |
| 19 | + submodules: recursive |
| 20 | + |
| 21 | + - name: Clone DiligentCore |
| 22 | + uses: actions/checkout@v2 |
| 23 | + with: |
| 24 | + repository: 'DiligentGraphics/DiligentCore' |
| 25 | + path: DiligentCore |
| 26 | + submodules: recursive |
| 27 | + |
| 28 | + - name: Format validation |
| 29 | + working-directory: DiligentTools |
| 30 | + shell: bash |
| 31 | + run: | |
| 32 | + cd ./BuildTools/FormatValidation |
| 33 | + ./validate_format_linux.sh |
| 34 | +
|
| 35 | + - name: Configure dependencies |
| 36 | + if: success() |
| 37 | + run: | |
| 38 | + sudo apt-get install build-essential pkg-config libx11-dev libxcursor-dev \ |
| 39 | + libxinerama-dev libgl1-mesa-dev libglu-dev libasound2-dev libpulse-dev libudev-dev libxi-dev libxrandr-dev yasm |
| 40 | +
|
| 41 | + - name: Configure CMake |
| 42 | + if: success() |
| 43 | + env: |
| 44 | + CC: gcc-9 |
| 45 | + CXX: g++-9 |
| 46 | + shell: bash |
| 47 | + run: | |
| 48 | + echo "cmake_minimum_required(VERSION 3.6)" > CMakeLists.txt |
| 49 | + echo "Project(DiligentTools_Test)" >> CMakeLists.txt |
| 50 | + echo "add_subdirectory(DiligentCore)" >> CMakeLists.txt |
| 51 | + echo "add_subdirectory(DiligentTools)" >> CMakeLists.txt |
| 52 | + cd $GITHUB_WORKSPACE/DiligentCore/BuildTools/Scripts/github_actions |
| 53 | + chmod +x configure_cmake.sh |
| 54 | + ./configure_cmake.sh "linux" "${{runner.workspace}}" ${{ matrix.config }} |
| 55 | +
|
| 56 | + - name: Build |
| 57 | + if: success() |
| 58 | + working-directory: ${{runner.workspace}}/build |
| 59 | + shell: bash |
| 60 | + run: cmake --build . --config ${{ matrix.config }} --target install |
| 61 | + |
| 62 | + - name: DiligentToolsTest |
| 63 | + if: success() |
| 64 | + shell: bash |
| 65 | + run: ${{runner.workspace}}/build/DiligentTools/Tests/DiligentToolsTest/DiligentToolsTest |
| 66 | + |
| 67 | + |
| 68 | + build-clang-9: |
| 69 | + strategy: |
| 70 | + matrix: |
| 71 | + config: [Debug, Release] |
| 72 | + |
| 73 | + runs-on: ubuntu-latest |
| 74 | + name: Linux x64, Clang 9, ${{ matrix.config }} |
| 75 | + |
| 76 | + steps: |
| 77 | + - name: Clone DiligentTools |
| 78 | + uses: actions/checkout@v2 |
| 79 | + with: |
| 80 | + path: DiligentTools |
| 81 | + submodules: recursive |
| 82 | + |
| 83 | + - name: Clone DiligentCore |
| 84 | + uses: actions/checkout@v2 |
| 85 | + with: |
| 86 | + repository: 'DiligentGraphics/DiligentCore' |
| 87 | + path: DiligentCore |
| 88 | + submodules: recursive |
| 89 | + |
| 90 | + - name: Format validation |
| 91 | + working-directory: DiligentTools |
| 92 | + shell: bash |
| 93 | + run: | |
| 94 | + cd ./BuildTools/FormatValidation |
| 95 | + ./validate_format_linux.sh |
| 96 | +
|
| 97 | + - name: Configure dependencies |
| 98 | + if: success() |
| 99 | + run: | |
| 100 | + sudo apt-get install build-essential pkg-config libx11-dev libxcursor-dev \ |
| 101 | + libxinerama-dev libgl1-mesa-dev libglu-dev libasound2-dev libpulse-dev libudev-dev libxi-dev libxrandr-dev yasm |
| 102 | +
|
| 103 | + - name: Configure CMake |
| 104 | + if: success() |
| 105 | + env: |
| 106 | + CC: clang-9 |
| 107 | + CXX: clang++-9 |
| 108 | + shell: bash |
| 109 | + run: | |
| 110 | + echo "cmake_minimum_required(VERSION 3.6)" > CMakeLists.txt |
| 111 | + echo "Project(DiligentTools_Test)" >> CMakeLists.txt |
| 112 | + echo "add_subdirectory(DiligentCore)" >> CMakeLists.txt |
| 113 | + echo "add_subdirectory(DiligentTools)" >> CMakeLists.txt |
| 114 | + cd $GITHUB_WORKSPACE/DiligentCore/BuildTools/Scripts/github_actions |
| 115 | + chmod +x configure_cmake.sh |
| 116 | + ./configure_cmake.sh "linux" "${{runner.workspace}}" ${{ matrix.config }} |
| 117 | +
|
| 118 | + - name: Build |
| 119 | + if: success() |
| 120 | + working-directory: ${{runner.workspace}}/build |
| 121 | + shell: bash |
| 122 | + run: cmake --build . --config ${{ matrix.config }} --target install |
| 123 | + |
| 124 | + - name: DiligentToolsTest |
| 125 | + if: success() |
| 126 | + shell: bash |
| 127 | + run: ${{runner.workspace}}/build/DiligentTools/Tests/DiligentToolsTest/DiligentToolsTest |
0 commit comments