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