Merge pull request #7 from ERGO-Code/ortools-c #108
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: cmake-find-windows | |
| on: [push, pull_request] | |
| jobs: | |
| find_i_win: | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [windows-latest] | |
| branch: [master, latest] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Checkout HiGHS repo | |
| uses: actions/checkout@v4 | |
| with: | |
| repository: ERGO-Code/HiGHS | |
| ref: ${{matrix.branch}} | |
| path: HiGHS-${{matrix.branch}} | |
| - name: Checkout CMakeHighsFindPackage | |
| uses: actions/checkout@v4 | |
| with: | |
| repository: galabovaa/CMakeHighsFindPackage | |
| ref: master | |
| path: CMakeHighsFindPackage-master-${{matrix.branch}} | |
| - name: Create build and install dirs | |
| run: | | |
| mkdir ${{runner.workspace}}\\build-highs-${{matrix.branch}} | |
| mkdir ${{runner.workspace}}\\install-highs-${{matrix.branch}} | |
| mkdir ${{runner.workspace}}\\build-find-highs-${{matrix.branch}} | |
| mkdir ${{runner.workspace}}\\install-find-highs-${{matrix.branch}} | |
| - name: Configure CMake HiGHS | |
| working-directory: ${{runner.workspace}}\\build-highs-${{matrix.branch}} | |
| run: >- | |
| cmake ${{runner.workspace}}\\highs-tests\\HiGHS-${{matrix.branch}} | |
| -DCMAKE_INSTALL_PREFIX=${{runner.workspace}}\\install-highs-${{matrix.branch}} | |
| - name: Build, ctest and install HiGHS | |
| working-directory: ${{runner.workspace}}\\build-highs-${{matrix.branch}} | |
| run: | | |
| cmake --build . --parallel --config Release | |
| ctest -C Release | |
| cmake --install . | |
| - name: Configure CMakeFindHighsPackage | |
| working-directory: ${{runner.workspace}}\\build-find-highs-${{matrix.branch}} | |
| run: >- | |
| cmake ${{runner.workspace}}\\highs-tests\\CMakeHighsFindPackage-master-${{matrix.branch}} | |
| -DHIGHS_DIR=${{runner.workspace}}\\install-highs-${{matrix.branch}}\\lib\\cmake\\highs | |
| -DCMAKE_INSTALL_PREFIX=${{runner.workspace}}\\install-find-highs-${{matrix.branch}} | |
| - name: Build and install CMakeFindHighsPackage | |
| working-directory: ${{runner.workspace}}\\build-find-highs-${{matrix.branch}} | |
| run: | | |
| cmake --build . --parallel --config Release | |
| cmake --install . | |
| - name: Test build | |
| working-directory: ${{runner.workspace}}\\build-find-highs-${{matrix.branch}} | |
| shell: pwsh | |
| run: | | |
| $env:PATH = '${{runner.workspace}}/install-highs-${{matrix.branch}}/bin/Release;' + $env:PATH | |
| echo $Env:PATH | |
| .\\Release\\main.exe | |
| - name: Test install | |
| working-directory: ${{runner.workspace}}\\install-find-highs-${{matrix.branch}} | |
| shell: pwsh | |
| run: | | |
| $env:PATH = '${{runner.workspace}}/install-highs-${{matrix.branch}}/bin/Release;' + $env:PATH | |
| echo $Env:PATH | |
| .\\bin\\main.exe |