diff --git a/.github/workflows/cmake-fetch-content.yml b/.github/workflows/cmake-fetch-linux.yml similarity index 59% rename from .github/workflows/cmake-fetch-content.yml rename to .github/workflows/cmake-fetch-linux.yml index 22abc62..e7bf155 100644 --- a/.github/workflows/cmake-fetch-content.yml +++ b/.github/workflows/cmake-fetch-linux.yml @@ -1,13 +1,13 @@ -name: cmake-fetch-content +name: cmake-fetch-linux on: [push, pull_request] jobs: - master: + fetch_ubuntu: runs-on: ${{ matrix.os }} strategy: + fail-fast: false matrix: - # os: [ubuntu-latest, windows-latest] os: [ubuntu-latest] branch: [master, latest, cmake] @@ -23,23 +23,26 @@ jobs: - name: Create build dir run: | - cmake -E make_directory ${{runner.workspace}}/build-fetch-content-${{matrix.branch}} + cmake -E make_directory ${{runner.workspace}}/build-fetch-${{matrix.branch}} - name: Build CMakeFindHighsPackage - working-directory: ${{runner.workspace}}/build-fetch-content-${{matrix.branch}} + working-directory: ${{runner.workspace}}/build-fetch-${{matrix.branch}} shell: bash run: | cmake ${{runner.workspace}}/highs-tests/CMakeHighsFetchContent-main-${{matrix.branch}} \ - -DBRANCH=${{matrix.branch}} + -DBRANCH=${{matrix.branch}} \ + -DCMAKE_INSTALL_PREFIX=${{runner.workspace}}/install-fetch-${{matrix.branch}} cmake --build . --parallel + cmake --install . - name: Test - working-directory: ${{runner.workspace}}/build-fetch-content-${{matrix.branch}} + working-directory: ${{runner.workspace}}/build-fetch-${{matrix.branch}} shell: bash run: | ./main - # todo, not implemented yet in CMakeHighsFetchContent - # - name: Test install - - # trigger test \ No newline at end of file + - name: Test install + working-directory: ${{runner.workspace}}/install-fetch-${{matrix.branch}} + shell: bash + run: | + ./bin/main \ No newline at end of file diff --git a/.github/workflows/cmake-fetch-macos.yml b/.github/workflows/cmake-fetch-macos.yml new file mode 100644 index 0000000..2467143 --- /dev/null +++ b/.github/workflows/cmake-fetch-macos.yml @@ -0,0 +1,48 @@ +name: cmake-fetch-macos + +on: [push, pull_request] + +jobs: + fetch_macos: + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: [macos-latest] + branch: [master, latest, cmake] + + steps: + - uses: actions/checkout@v4 + + - name: Checkout CMakeHighsFetchContent + uses: actions/checkout@v4 + with: + repository: galabovaa/CMakeHighsFetchContent + ref: main + path: CMakeHighsFetchContent-main-${{matrix.branch}} + + - name: Create build dir + run: | + cmake -E make_directory ${{runner.workspace}}/build-fetch-${{matrix.branch}} + + - name: Build CMakeFindHighsPackage + working-directory: ${{runner.workspace}}/build-fetch-${{matrix.branch}} + shell: bash + run: | + cmake ${{runner.workspace}}/highs-tests/CMakeHighsFetchContent-main-${{matrix.branch}} \ + -DBRANCH=${{matrix.branch}} \ + -DCMAKE_INSTALL_PREFIX=${{runner.workspace}}/install-fetch-${{matrix.branch}} + cmake --build . --parallel + cmake --install . + + - name: Test + working-directory: ${{runner.workspace}}/build-fetch-${{matrix.branch}} + shell: bash + run: | + ./main + + - name: Test install + working-directory: ${{runner.workspace}}/install-fetch-${{matrix.branch}} + shell: bash + run: | + ./bin/main \ No newline at end of file diff --git a/.github/workflows/cmake-fetch-windows.yml b/.github/workflows/cmake-fetch-windows.yml new file mode 100644 index 0000000..bf08188 --- /dev/null +++ b/.github/workflows/cmake-fetch-windows.yml @@ -0,0 +1,50 @@ +name: cmake-fetch-windows + +on: [push, pull_request] + +jobs: + fetch_win: + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: [windows-latest] + branch: [master, latest, cmake] + + steps: + - uses: actions/checkout@v4 + + - name: Checkout CMakeHighsFetchContent + uses: actions/checkout@v4 + with: + repository: galabovaa/CMakeHighsFetchContent + ref: main + path: CMakeHighsFetchContent-main-${{matrix.branch}} + + - name: Create build dir + run: | + mkdir ${{runner.workspace}}\\build-fetch-${{matrix.branch}} + + - name: Configure CMakeFindHighsPackage + working-directory: ${{runner.workspace}}\\build-fetch-${{matrix.branch}} + run: >- + cmake ${{runner.workspace}}\\highs-tests\\CMakeHighsFetchContent-main-${{matrix.branch}} + -DBRANCH=${{matrix.branch}} + -DCMAKE_INSTALL_PREFIX=${{runner.workspace}}/install-fetch-${{matrix.branch}} + + - name: Build CMakeFindHighsPackage + working-directory: ${{runner.workspace}}\\build-fetch-${{matrix.branch}} + run: | + cmake --build . --parallel --config Release + cmake --install . + + - name: Test + working-directory: ${{runner.workspace}}\\build-fetch-${{matrix.branch}} + run: | + .\\Release\\main.exe + + - name: Test install + working-directory: ${{runner.workspace}}\\install-fetch-${{matrix.branch}} + shell: bash + run: | + .\\bin\\main.exe \ No newline at end of file diff --git a/.github/workflows/cmake-find-build-linux.yml b/.github/workflows/cmake-find-build-linux.yml new file mode 100644 index 0000000..788ed96 --- /dev/null +++ b/.github/workflows/cmake-find-build-linux.yml @@ -0,0 +1,70 @@ +name: cmake-find-build-linux + +on: [push, pull_request] + +jobs: + find_b_ubuntu: + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: [ubuntu-latest] + branch: [master, latest, cmake] + + 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}}-b + + - name: Checkout CMakeHighsFindPackage + uses: actions/checkout@v4 + with: + repository: galabovaa/CMakeHighsFindPackage + ref: master + path: CMakeHighsFindPackage-master-${{matrix.branch}}-b + + - name: Create build and install dirs + run: | + cmake -E make_directory ${{runner.workspace}}/build-highs-${{matrix.branch}}-b + cmake -E make_directory ${{runner.workspace}}/build-find-build-${{matrix.branch}} + cmake -E make_directory ${{runner.workspace}}/install-find-build-${{matrix.branch}} + + - name: Configure CMake HiGHS + shell: bash + working-directory: ${{runner.workspace}}/build-highs-${{matrix.branch}}-b + run: + cmake ${{runner.workspace}}/highs-tests/HiGHS-${{matrix.branch}}-b + + - name: Build, ctest and install HiGHS + working-directory: ${{runner.workspace}}/build-highs-${{matrix.branch}}-b + shell: bash + run: | + cmake --build . --parallel + ctest + + - name: Build CMakeFindHighsPackage + working-directory: ${{runner.workspace}}/build-find-build-${{matrix.branch}} + shell: bash + run: | + cmake ${{runner.workspace}}/highs-tests/CMakeHighsFindPackage-master-${{matrix.branch}}-b \ + -DHIGHS_DIR=${{runner.workspace}}/build-highs-${{matrix.branch}}-b \ + -DCMAKE_INSTALL_PREFIX=${{runner.workspace}}/install-find-build-${{matrix.branch}} + cmake --build . --parallel + cmake --install . + + - name: Test build + working-directory: ${{runner.workspace}}/build-find-build-${{matrix.branch}} + shell: bash + run: | + ./main + + - name: Test install + working-directory: ${{runner.workspace}}/install-find-build-${{matrix.branch}} + shell: bash + run: | + LD_LIBRARY_PATH=${{runner.workspace}}/build-highs-${{matrix.branch}}-b/lib ./bin/main \ No newline at end of file diff --git a/.github/workflows/cmake-find-build-macos.yml b/.github/workflows/cmake-find-build-macos.yml new file mode 100644 index 0000000..394294e --- /dev/null +++ b/.github/workflows/cmake-find-build-macos.yml @@ -0,0 +1,70 @@ +name: cmake-find-build-macos + +on: [push, pull_request] + +jobs: + find_b_macos: + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: [macos-latest] + branch: [master, latest, cmake] + + 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}}-b + + - name: Checkout CMakeHighsFindPackage + uses: actions/checkout@v4 + with: + repository: galabovaa/CMakeHighsFindPackage + ref: master + path: CMakeHighsFindPackage-master-${{matrix.branch}}-b + + - name: Create build and install dirs + run: | + cmake -E make_directory ${{runner.workspace}}/build-highs-${{matrix.branch}}-b + cmake -E make_directory ${{runner.workspace}}/build-find-build-${{matrix.branch}} + cmake -E make_directory ${{runner.workspace}}/install-find-build-${{matrix.branch}} + + - name: Configure CMake HiGHS + shell: bash + working-directory: ${{runner.workspace}}/build-highs-${{matrix.branch}}-b + run: + cmake ${{runner.workspace}}/highs-tests/HiGHS-${{matrix.branch}}-b + + - name: Build, ctest and install HiGHS + working-directory: ${{runner.workspace}}/build-highs-${{matrix.branch}}-b + shell: bash + run: | + cmake --build . --parallel + ctest + + - name: Build CMakeFindHighsPackage + working-directory: ${{runner.workspace}}/build-find-build-${{matrix.branch}} + shell: bash + run: | + cmake ${{runner.workspace}}/highs-tests/CMakeHighsFindPackage-master-${{matrix.branch}}-b \ + -DHIGHS_DIR=${{runner.workspace}}/build-highs-${{matrix.branch}}-b \ + -DCMAKE_INSTALL_PREFIX=${{runner.workspace}}/install-find-build-${{matrix.branch}} + cmake --build . --parallel + cmake --install . + + - name: Test build + working-directory: ${{runner.workspace}}/build-find-build-${{matrix.branch}} + shell: bash + run: | + ./main + + - name: Test install + working-directory: ${{runner.workspace}}/install-find-build-${{matrix.branch}} + shell: bash + run: | + DYLD_LIBRARY_PATH=${{runner.workspace}}/build-highs-${{matrix.branch}}-b/lib ./bin/main \ No newline at end of file diff --git a/.github/workflows/cmake-find-build-windows.yml b/.github/workflows/cmake-find-build-windows.yml new file mode 100644 index 0000000..36f0820 --- /dev/null +++ b/.github/workflows/cmake-find-build-windows.yml @@ -0,0 +1,73 @@ +name: cmake-find-build-windows + +on: [push, pull_request] + +jobs: + find_b_win: + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: [windows-latest] + branch: [master, latest, cmake] + + 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}}-b + + - name: Checkout CMakeHighsFindPackage + uses: actions/checkout@v4 + with: + repository: galabovaa/CMakeHighsFindPackage + ref: master + path: CMakeHighsFindPackage-master-${{matrix.branch}}-b + + - name: Create build and install dirs + run: | + mkdir ${{runner.workspace}}\\build-highs-${{matrix.branch}}-b + mkdir ${{runner.workspace}}\\build-find-build-${{matrix.branch}} + mkdir ${{runner.workspace}}\\install-find-build-${{matrix.branch}} + + - name: Configure CMake HiGHS + working-directory: ${{runner.workspace}}\\build-highs-${{matrix.branch}}-b + run: + cmake ${{runner.workspace}}\\highs-tests\\HiGHS-${{matrix.branch}}-b + + - name: Build, ctest and install HiGHS + working-directory: ${{runner.workspace}}\\build-highs-${{matrix.branch}}-b + run: | + cmake --build . --parallel --config Release + ctest -C Release + + - name: Configure CMakeFindHighsPackage + working-directory: ${{runner.workspace}}\\build-find-build-${{matrix.branch}} + run: >- + cmake ${{runner.workspace}}\\highs-tests\\CMakeHighsFindPackage-master-${{matrix.branch}}-b + -DHIGHS_DIR=${{runner.workspace}}\\build-highs-${{matrix.branch}}-b + -DCMAKE_INSTALL_PREFIX=${{runner.workspace}}\\install-find-build-${{matrix.branch}} + + - name: Build and install CMakeFindHighsPackage + working-directory: ${{runner.workspace}}\\build-find-build-${{matrix.branch}} + run: | + cmake --build . --parallel --config Release + cmake --install . + + - name: Test build + working-directory: ${{runner.workspace}}\\build-find-build-${{matrix.branch}} + run: | + $env:PATH = '${{runner.workspace}}/build-highs-${{matrix.branch}}-b/bin/Release;' + $env:PATH + echo $Env:PATH + .\\Release\\main.exe + + - name: Test install + working-directory: ${{runner.workspace}}\\install-find-build-${{matrix.branch}} + run: | + $env:PATH = '${{runner.workspace}}/build-highs-${{matrix.branch}}-b/bin/Release;' + $env:PATH + echo $Env:PATH + .\\bin\\main.exe \ No newline at end of file diff --git a/.github/workflows/cmake-find-highs.yml b/.github/workflows/cmake-find-linux.yml similarity index 77% rename from .github/workflows/cmake-find-highs.yml rename to .github/workflows/cmake-find-linux.yml index 6e49414..1904cbb 100644 --- a/.github/workflows/cmake-find-highs.yml +++ b/.github/workflows/cmake-find-linux.yml @@ -1,14 +1,13 @@ -name: cmake-find-highs +name: cmake-find-linux on: [push, pull_request] jobs: - master: + find_i_ubuntu: runs-on: ${{ matrix.os }} strategy: fail-fast: false matrix: - # os: [ubuntu-latest, windows-latest] os: [ubuntu-latest] branch: [master, latest, cmake] @@ -34,8 +33,7 @@ jobs: cmake -E make_directory ${{runner.workspace}}/build-highs-${{matrix.branch}} cmake -E make_directory ${{runner.workspace}}/install-highs-${{matrix.branch}} cmake -E make_directory ${{runner.workspace}}/build-find-highs-${{matrix.branch}} - - # cmake -E make_directory ${{runner.workspace}}/install-find-highs-${{matrix.branch}} + cmake -E make_directory ${{runner.workspace}}/install-find-highs-${{matrix.branch}} - name: Configure CMake HiGHS shell: bash @@ -52,17 +50,15 @@ jobs: ctest cmake --install . - # - name: Build and install CMakeFindHighsPackage - name: Build CMakeFindHighsPackage working-directory: ${{runner.workspace}}/build-find-highs-${{matrix.branch}} shell: bash run: | cmake ${{runner.workspace}}/highs-tests/CMakeHighsFindPackage-master-${{matrix.branch}} \ - -DHIGHS_DIR=${{runner.workspace}}/install-highs-${{matrix.branch}}/lib/cmake/highs + -DHIGHS_DIR=${{runner.workspace}}/install-highs-${{matrix.branch}}/lib/cmake/highs \ + -DCMAKE_INSTALL_PREFIX=${{runner.workspace}}/install-find-highs-${{matrix.branch}} cmake --build . --parallel - - # cmake --install . - # -DCMAKE_INSTALL_PREFIX=${{runner.workspace}}/install-find-highs-${{matrix.branch}} + cmake --install . - name: Test build working-directory: ${{runner.workspace}}/build-find-highs-${{matrix.branch}} @@ -70,9 +66,8 @@ jobs: run: | ./main - # does not find highs lib, needs more cmake code in CMakeFindHighsPackage - # - name: Test install - # working-directory: ${{runner.workspace}}/install-find-highs-${{matrix.branch}} - # shell: bash - # run: | - # ./bin/main \ No newline at end of file + - name: Test install + working-directory: ${{runner.workspace}}/install-find-highs-${{matrix.branch}} + shell: bash + run: | + LD_LIBRARY_PATH=${{runner.workspace}}/install-highs-${{matrix.branch}}/lib ./bin/main \ No newline at end of file diff --git a/.github/workflows/cmake-find-macos.yml b/.github/workflows/cmake-find-macos.yml new file mode 100644 index 0000000..5d92b11 --- /dev/null +++ b/.github/workflows/cmake-find-macos.yml @@ -0,0 +1,73 @@ +name: cmake-find-macos + +on: [push, pull_request] + +jobs: + find_i_macos: + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: [macos-latest] + branch: [master, latest, cmake] + + 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: | + cmake -E make_directory ${{runner.workspace}}/build-highs-${{matrix.branch}} + cmake -E make_directory ${{runner.workspace}}/install-highs-${{matrix.branch}} + cmake -E make_directory ${{runner.workspace}}/build-find-highs-${{matrix.branch}} + cmake -E make_directory ${{runner.workspace}}/install-find-highs-${{matrix.branch}} + + - name: Configure CMake HiGHS + shell: bash + 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}} + shell: bash + run: | + cmake --build . --parallel + ctest + cmake --install . + + - name: Build CMakeFindHighsPackage + working-directory: ${{runner.workspace}}/build-find-highs-${{matrix.branch}} + shell: bash + 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}} + cmake --build . --parallel + cmake --install . + + - name: Test build + working-directory: ${{runner.workspace}}/build-find-highs-${{matrix.branch}} + shell: bash + run: | + ./main + + - name: Test install + working-directory: ${{runner.workspace}}/install-find-highs-${{matrix.branch}} + shell: bash + run: | + DYLD_LIBRARY_PATH=${{runner.workspace}}/install-highs-${{matrix.branch}}/lib ./bin/main \ No newline at end of file diff --git a/.github/workflows/cmake-find-windows.yml b/.github/workflows/cmake-find-windows.yml new file mode 100644 index 0000000..b2df4ef --- /dev/null +++ b/.github/workflows/cmake-find-windows.yml @@ -0,0 +1,78 @@ +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, cmake] + + 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 \ No newline at end of file diff --git a/README.md b/README.md index d8b0d05..370e28d 100644 --- a/README.md +++ b/README.md @@ -1 +1,3 @@ -# highs-tests \ No newline at end of file +# highs-tests + +Repository for tests of HiGHS during development and for releases. \ No newline at end of file