|
| 1 | +# ref: https://github.com/actions/runner-images |
| 2 | +name: amd64 Windows |
| 3 | + |
| 4 | +on: [push, pull_request, workflow_dispatch] |
| 5 | + |
| 6 | +# Building using the github runner environement directly. |
| 7 | +jobs: |
| 8 | + native: |
| 9 | + strategy: |
| 10 | + matrix: |
| 11 | + cmake: [ |
| 12 | + {generator: "Visual Studio 17 2022", config: Release, build_target: ALL_BUILD, test_target: RUN_TESTS, install_target: INSTALL}, |
| 13 | + {generator: "Visual Studio 17 2022", config: Debug, build_target: ALL_BUILD, test_target: RUN_TESTS, install_target: INSTALL}, |
| 14 | + ] |
| 15 | + fail-fast: false |
| 16 | + name: Windows • ${{ matrix.cmake.generator }} (${{ matrix.cmake.config }}) |
| 17 | + runs-on: windows-latest |
| 18 | + env: |
| 19 | + CTEST_OUTPUT_ON_FAILURE: 1 |
| 20 | + steps: |
| 21 | + - uses: actions/checkout@v4 |
| 22 | + - name: Check cmake |
| 23 | + run: | |
| 24 | + cmake --version |
| 25 | + cmake -G || true |
| 26 | + - name: Install CoinUtils |
| 27 | + run: > |
| 28 | + git clone -b stable/2.11 --depth=1 https://github.com/Mizux/CoinUtils.git |
| 29 | + && cd CoinUtils |
| 30 | + && cmake -S. -Bbuild |
| 31 | + && cmake --build build --config ${{ matrix.cmake.config }} |
| 32 | + && cmake --build build --config ${{ matrix.cmake.config }} --target install |
| 33 | + && cd .. |
| 34 | + && Remove-Item CoinUtils -Recurse -Include *.* |
| 35 | + - name: Install Osi |
| 36 | + run: > |
| 37 | + git clone -b stable/0.108 --depth=1 https://github.com/Mizux/Osi.git |
| 38 | + && cd Osi |
| 39 | + && cmake -S. -Bbuild |
| 40 | + && cmake --build build --config ${{ matrix.cmake.config }} |
| 41 | + && cmake --build build --config ${{ matrix.cmake.config }} --target install |
| 42 | + && cd .. |
| 43 | + && Remove-Item Osi -Recurse -Include *.* |
| 44 | + - name: Install Clp |
| 45 | + run: > |
| 46 | + git clone -b stable/1.17 --depth=1 https://github.com/Mizux/Clp.git |
| 47 | + && cd Clp |
| 48 | + && cmake -S. -Bbuild |
| 49 | + && cmake --build build --config ${{ matrix.cmake.config }} |
| 50 | + && cmake --build build --config ${{ matrix.cmake.config }} --target install |
| 51 | + && cd .. |
| 52 | + && Remove-Item Clp -Recurse -Include *.* |
| 53 | + - name: Configure |
| 54 | + run: > |
| 55 | + cmake -S. -Bbuild |
| 56 | + -G "${{ matrix.cmake.generator }}" |
| 57 | + -DCMAKE_CONFIGURATION_TYPES=${{ matrix.cmake.config }} |
| 58 | + -DBUILD_DEPS=ON |
| 59 | + -DCMAKE_INSTALL_PREFIX=build/install |
| 60 | + - name: Build |
| 61 | + run: > |
| 62 | + cmake --build build |
| 63 | + --config ${{ matrix.cmake.config }} |
| 64 | + --target ${{ matrix.cmake.build_target }} |
| 65 | + -v -j2 |
| 66 | + - name: Test |
| 67 | + run: > |
| 68 | + cmake --build build |
| 69 | + --config ${{ matrix.cmake.config }} |
| 70 | + --target ${{ matrix.cmake.test_target }} |
| 71 | + -v |
| 72 | + - name: Install |
| 73 | + run: > |
| 74 | + cmake --build build |
| 75 | + --config ${{ matrix.cmake.config }} |
| 76 | + --target ${{ matrix.cmake.install_target }} |
| 77 | + -v |
0 commit comments