diff --git a/.github/workflows/cmake-fetch-content.yml b/.github/workflows/cmake-fetch-content.yml new file mode 100644 index 0000000..e557676 --- /dev/null +++ b/.github/workflows/cmake-fetch-content.yml @@ -0,0 +1,43 @@ +name: cmake-fetch-content + +on: [push, pull_request] + +jobs: + master: + runs-on: ${{ matrix.os }} + strategy: + matrix: + # os: [ubuntu-latest, windows-latest] + os: [ubuntu-latest] + branch: [master, latest] + + 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-content-${{matrix.branch}} + + - name: Build CMakeFindHighsPackage + working-directory: ${{runner.workspace}}/build-fetch-content-${{matrix.branch}} + shell: bash + run: | + cmake ${{runner.workspace}}/highs-tests/CMakeHighsFetchContent-main-${{matrix.branch}} \ + -DBRANCH=${{matrix.branch}} + cmake --build . --parallel + + - name: Test + working-directory: ${{runner.workspace}}/build-fetch-content-${{matrix.branch}} + shell: bash + run: | + ./main + + # todo, not implemented yet in CMakeHighsFetchContent + # - name: Test install \ No newline at end of file diff --git a/.github/workflows/cmake-find-highs.yml b/.github/workflows/cmake-find-highs.yml new file mode 100644 index 0000000..3f66724 --- /dev/null +++ b/.github/workflows/cmake-find-highs.yml @@ -0,0 +1,77 @@ +name: cmake-find-highs + +on: [push, pull_request] + +jobs: + master: + runs-on: ${{ matrix.os }} + strategy: + matrix: + # os: [ubuntu-latest, windows-latest] + os: [ubuntu-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: | + 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 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 + cmake --build . --parallel + + # cmake --install . + # -DCMAKE_INSTALL_PREFIX=${{runner.workspace}}/install-find-highs-${{matrix.branch}} + + - name: Test build + working-directory: ${{runner.workspace}}/build-find-highs-${{matrix.branch}} + shell: bash + 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 diff --git a/.github/workflows/extra-unit-cuda-updates.yml b/.github/workflows/extra-unit-cuda-updates.yml deleted file mode 100644 index 93f4ea4..0000000 --- a/.github/workflows/extra-unit-cuda-updates.yml +++ /dev/null @@ -1,76 +0,0 @@ -name: extra-unit-cuda-updates - -on: [push, pull_request] - -jobs: - release: - runs-on: ${{ matrix.os }} - strategy: - matrix: - os: [ubuntu-latest] - - steps: - - uses: actions/checkout@v4 - - - name: Checkout HiGHS repo - uses: actions/checkout@v4 - with: - repository: ERGO-Code/HiGHS - ref: cuda-updates - path: HiGHS - - - name: Checkout highs-unit-tests repo - uses: actions/checkout@v4 - with: - repository: galabovaa/highs-unit-tests - ref: cuda-updates - path: highs-unit-tests - - - name: HiGHS dir - working-directory: HiGHS - run: | - ls -a - pwd - - - name: extra tests dir - working-directory: highs-unit-tests - run: | - ls -a - pwd - - - name: workspace dir - working-directory: ${{runner.workspace}} - run: | - ls -a - pwd - - - name: Symlink extra tests to HiGHS - working-directory: ${{runner.workspace}}/highs-tests/HiGHS/check - run: | - ls -a - pwd - mv ${{runner.workspace}}/highs-tests/highs-unit-tests ./highs-unit-tests - cd highs-unit-tests - ls -a - pwd - - - name: Create Build Environment - run: cmake -E make_directory ${{runner.workspace}}/build - - - name: Configure CMake - shell: bash - working-directory: ${{runner.workspace}}/build - run: cmake ${{runner.workspace}}/highs-tests/HiGHS -DALL_TESTS=ON -DBUILD_EXTRA_UNIT_TESTS=ON - - - name: Build - working-directory: ${{runner.workspace}}/build - shell: bash - run: | - cmake --build . --parallel - - - name: Test - working-directory: ${{runner.workspace}}/build - shell: bash - # Execute tests defined by the CMake configuration. - # See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail - run: ctest --parallel --timeout 300 --output-on-failure \ No newline at end of file