|
| 1 | +name: build-unit-tests-external |
| 2 | + |
| 3 | +on: [push, pull_request] |
| 4 | + |
| 5 | +jobs: |
| 6 | + release_extra_only: |
| 7 | + runs-on: ${{ matrix.os }} |
| 8 | + strategy: |
| 9 | + matrix: |
| 10 | + os: [ubuntu-latest] |
| 11 | + |
| 12 | + steps: |
| 13 | + - uses: actions/checkout@v4 |
| 14 | + |
| 15 | + - name: Clone extra unit tests repo |
| 16 | + shell: bash |
| 17 | + working-directory: ${{runner.workspace}} |
| 18 | + run: | |
| 19 | + git clone https://github.com/galabovaa/highs-unit-tests.git |
| 20 | +
|
| 21 | + - name: Create symlink |
| 22 | + shell: bash |
| 23 | + working-directory: ${{runner.workspace}} |
| 24 | + run: ln -s ${{runner.workspace}}/highs-unit-tests $GITHUB_WORKSPACE/check |
| 25 | + |
| 26 | + - name: Create Build Environment |
| 27 | + run: cmake -E make_directory ${{runner.workspace}}/build |
| 28 | + |
| 29 | + - name: Configure CMake All |
| 30 | + shell: bash |
| 31 | + working-directory: ${{runner.workspace}}/build |
| 32 | + run: cmake $GITHUB_WORKSPACE -DBUILD_EXTRA_UNIT_TESTS=ON -DBUILD_EXTRA_UNIT_ONLY=ON -DBUILD_CXX=OFF |
| 33 | + |
| 34 | + - name: Build All |
| 35 | + working-directory: ${{runner.workspace}}/build |
| 36 | + shell: bash |
| 37 | + run: | |
| 38 | + cmake --build . --parallel |
| 39 | +
|
| 40 | + - name: Test Extra Only |
| 41 | + working-directory: ${{runner.workspace}}/build |
| 42 | + shell: bash |
| 43 | + run: ctest --parallel --timeout 300 --output-on-failure |
| 44 | + |
| 45 | + release_all_tests: |
| 46 | + runs-on: ${{ matrix.os }} |
| 47 | + strategy: |
| 48 | + matrix: |
| 49 | + os: [ubuntu-latest] |
| 50 | + |
| 51 | + steps: |
| 52 | + - uses: actions/checkout@v4 |
| 53 | + |
| 54 | + - name: Clone extra unit tests repo |
| 55 | + shell: bash |
| 56 | + working-directory: ${{runner.workspace}} |
| 57 | + run: | |
| 58 | + git clone https://github.com/galabovaa/highs-unit-tests.git |
| 59 | +
|
| 60 | + - name: Create symlink |
| 61 | + shell: bash |
| 62 | + working-directory: ${{runner.workspace}} |
| 63 | + run: ln -s ${{runner.workspace}}/highs-unit-tests $GITHUB_WORKSPACE/check |
| 64 | + |
| 65 | + - name: Create Build Environment |
| 66 | + run: cmake -E make_directory ${{runner.workspace}}/build |
| 67 | + |
| 68 | + - name: Configure CMake All |
| 69 | + shell: bash |
| 70 | + working-directory: ${{runner.workspace}}/build |
| 71 | + run: cmake $GITHUB_WORKSPACE -DALL_TESTS=ON -DBUILD_EXTRA_UNIT_TESTS=ON |
| 72 | + |
| 73 | + - name: Build All |
| 74 | + working-directory: ${{runner.workspace}}/build |
| 75 | + shell: bash |
| 76 | + run: | |
| 77 | + cmake --build . --parallel |
| 78 | +
|
| 79 | + - name: Test All |
| 80 | + working-directory: ${{runner.workspace}}/build |
| 81 | + shell: bash |
| 82 | + run: ctest --parallel --timeout 300 --output-on-failure |
| 83 | + |
| 84 | + # release__windows_extra_unit_tests: |
| 85 | + # runs-on: windows-2019 |
| 86 | + |
| 87 | + # steps: |
| 88 | + # - uses: actions/checkout@v4 |
| 89 | + |
| 90 | + # - name: Create Build Environment |
| 91 | + # run: cmake -E make_directory ${{runner.workspace}}/build |
| 92 | + |
| 93 | + # - name: Clone extra unit tests repo |
| 94 | + # working-directory: ${{runner.workspace}}/build |
| 95 | + # run: git clone https://github.com/galabovaa/highs-unit-tests.git |
| 96 | + |
| 97 | + # - name: Create symlink |
| 98 | + # shell: bash |
| 99 | + # working-directory: $GITHUB_WORKSPACE/check |
| 100 | + # run: mklink /d highs-unit-tests ${{runner.workspace}}/highs-unit-tests |
| 101 | + |
| 102 | + # - name: Configure CMake |
| 103 | + # # Use a bash shell so we can use the same syntax for environment variable |
| 104 | + # # access regardless of the host operating system |
| 105 | + # shell: bash |
| 106 | + # working-directory: ${{runner.workspace}}/build |
| 107 | + # # Note the current convention is to use the -S and -B options here to specify source |
| 108 | + # # and build directories, but this is only available with CMake 3.13 and higher. |
| 109 | + # # The CMake binaries on the Github Actions machines are (as of this writing) 3.12 |
| 110 | + # run: cmake $GITHUB_WORKSPACE -DALL_TESTS=ON -DBUILD_EXTRA_UNIT_TESTS=ON |
| 111 | + |
| 112 | + # - name: Build |
| 113 | + # working-directory: ${{runner.workspace}}/build |
| 114 | + # shell: bash |
| 115 | + # # Execute the build. You can specify a specific target with "--target <NAME>" |
| 116 | + # run: cmake --build . --config Release --parallel |
| 117 | + |
| 118 | + # - name: Unit Test Extra |
| 119 | + # working-directory: ${{runner.workspace}}/build |
| 120 | + # shell: bash |
| 121 | + # run: ./bin/Release/unit_tests.exe highs-names-extra |
| 122 | + |
| 123 | + # - name: Test |
| 124 | + # working-directory: ${{runner.workspace}}/build |
| 125 | + # shell: bash |
| 126 | + # # Execute tests defined by the CMake configuration. |
| 127 | + # # See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail |
| 128 | + # run: ctest --timeout 300 --output-on-failure -C Release |
0 commit comments