|
92 | 92 | --output-on-failure \ |
93 | 93 | 2>&1 | tee logfile2 |
94 | 94 |
|
| 95 | + - name: Check log for Errors |
| 96 | + working-directory: ${{runner.workspace}}/build |
| 97 | + shell: bash |
| 98 | + run: | |
| 99 | + cat logfile2 |
| 100 | + OUTPUT='ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)' |
| 101 | + if grep -q "$OUTPUT" logfile2; then |
| 102 | + exit 0 |
| 103 | + fi |
| 104 | + exit 1 |
| 105 | +
|
| 106 | + examples: |
| 107 | + runs-on: ${{ matrix.os }} |
| 108 | + strategy: |
| 109 | + matrix: |
| 110 | + os: [ubuntu-latest] |
| 111 | + |
| 112 | + steps: |
| 113 | + - uses: actions/checkout@v4 |
| 114 | + |
| 115 | + - name: Install Valgrind |
| 116 | + run: sudo apt-get update && sudo apt-get install valgrind |
| 117 | + |
| 118 | + - name: Create Build Environment |
| 119 | + run: cmake -E make_directory ${{runner.workspace}}/build |
| 120 | + |
| 121 | + - name: Configure CMake All |
| 122 | + shell: bash |
| 123 | + working-directory: ${{runner.workspace}}/build |
| 124 | + run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=Debug |
| 125 | + |
| 126 | + - name: Build All |
| 127 | + working-directory: ${{runner.workspace}}/build |
| 128 | + shell: bash |
| 129 | + run: | |
| 130 | + cmake --build . --parallel |
| 131 | +
|
| 132 | + - name: Test cpp example |
| 133 | + working-directory: ${{runner.workspace}}/build |
| 134 | + shell: bash |
| 135 | + run: | |
| 136 | + valgrind \ |
| 137 | + --leak-check=full \ |
| 138 | + --show-leak-kinds=all \ |
| 139 | + --track-origins=yes \ |
| 140 | + -s \ |
| 141 | + ./bin/call_highs_from_cpp \ |
| 142 | + --timeout 1000 \ |
| 143 | + --output-on-failure \ |
| 144 | + 2>&1 | tee logfile2 |
| 145 | +
|
| 146 | + - name: Check log for Errors |
| 147 | + working-directory: ${{runner.workspace}}/build |
| 148 | + shell: bash |
| 149 | + run: | |
| 150 | + cat logfile2 |
| 151 | + OUTPUT='ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)' |
| 152 | + if grep -q "$OUTPUT" logfile2; then |
| 153 | + exit 0 |
| 154 | + fi |
| 155 | + exit 1 |
| 156 | + |
| 157 | + - name: Test C example |
| 158 | + working-directory: ${{runner.workspace}}/build |
| 159 | + shell: bash |
| 160 | + run: | |
| 161 | + valgrind \ |
| 162 | + --leak-check=full \ |
| 163 | + --show-leak-kinds=all \ |
| 164 | + --track-origins=yes \ |
| 165 | + -s \ |
| 166 | + ./bin/call_highs_from_c_minimal \ |
| 167 | + --timeout 1000 \ |
| 168 | + --output-on-failure \ |
| 169 | + 2>&1 | tee logfile2 |
| 170 | +
|
95 | 171 | - name: Check log for Errors |
96 | 172 | working-directory: ${{runner.workspace}}/build |
97 | 173 | shell: bash |
|
0 commit comments