diff --git a/.github/workflows/amd64_docker_bazel.yml b/.github/workflows/amd64_docker_bazel.yml index 4bddf2d00e..89cde0d312 100644 --- a/.github/workflows/amd64_docker_bazel.yml +++ b/.github/workflows/amd64_docker_bazel.yml @@ -15,12 +15,12 @@ jobs: env: DISTRO: ${{ matrix.distro }} steps: - - uses: actions/checkout@v4 - - name: Build env image - run: make --directory=bazel ${DISTRO}_env - - name: Build devel image - run: make --directory=bazel ${DISTRO}_devel - - name: Build project - run: make --directory=bazel ${DISTRO}_build - - name: Test project - run: make --directory=bazel ${DISTRO}_test + - uses: actions/checkout@v4 + - name: Build env image + run: make --directory=bazel ${DISTRO}_env + - name: Build devel image + run: make --directory=bazel ${DISTRO}_devel + - name: Build project + run: make --directory=bazel ${DISTRO}_build + - name: Test project + run: make --directory=bazel ${DISTRO}_test diff --git a/.github/workflows/amd64_freebsd_cmake.yml b/.github/workflows/amd64_freebsd_cmake.yml index a45b799114..84d508717a 100644 --- a/.github/workflows/amd64_freebsd_cmake.yml +++ b/.github/workflows/amd64_freebsd_cmake.yml @@ -2,11 +2,11 @@ name: amd64 FreeBSD CMake on: [push, pull_request, workflow_dispatch] +# Only macos runner provide virtualisation with vagrant/virtualbox installed. +# ref: https://github.com/actions/runner-images/tree/main/images/macos +# ref: https://app.vagrantup.com/generic/boxes/freebsd13 jobs: - # Only macos runner provide virtualisation with vagrant/virtualbox installed. - FreeBSD: - runs-on: macos-10.15 - continue-on-error: ${{ matrix.allow_failure }} + vagrant: strategy: fail-fast: false matrix: @@ -15,19 +15,18 @@ jobs: allow_failure: [false] include: - distro: freebsd - lang: java + lang: dotnet allow_failure: true - distro: freebsd - lang: dotnet + lang: java allow_failure: true - env: - DISTRO: ${{ matrix.distro }} - LANG: ${{ matrix.lang }} + name: FreeBSD • CMake • ${{ matrix.lang }} + runs-on: macos-latest steps: - - uses: actions/checkout@v4 - - name: vagrant version - run: Vagrant --version - - name: VirtualBox version - run: virtualbox -h - - name: Build - run: make --directory=cmake ${DISTRO}_${LANG} + - uses: actions/checkout@v4 + - name: vagrant version + run: Vagrant --version + - name: VirtualBox version + run: virtualbox -h + - name: Build + run: make --directory=cmake ${{ matrix.distro }}_${{ matrix.lang }} diff --git a/.github/workflows/amd64_linux_bazel.yml b/.github/workflows/amd64_linux_bazel.yml index e6ad0f5f94..07dc21c7ae 100644 --- a/.github/workflows/amd64_linux_bazel.yml +++ b/.github/workflows/amd64_linux_bazel.yml @@ -3,14 +3,20 @@ name: amd64 Linux Bazel on: [push, pull_request, workflow_dispatch] +# Building using the github runner environement directly. jobs: - # Building using the github runner environement directly. - bazel: - runs-on: ubuntu-latest + native: strategy: matrix: - python-version: ['3.9', '3.10', '3.11', '3.12'] + python: [ + {version: '3.9'}, + {version: '3.10'}, + {version: '3.11'}, + {version: '3.12'}, + ] fail-fast: false + name: Linux • Bazel • Python-${{ matrix.python.version }} + runs-on: ubuntu-latest env: CC: gcc-12 CXX: g++-12 @@ -19,9 +25,9 @@ jobs: - name: Check Java run: java -version - name: Setup Python - uses: actions/setup-python@v3 + uses: actions/setup-python@v4 with: - python-version: ${{ matrix.python-version }} + python-version: ${{ matrix.python.version }} - name: Check Python run: python --version - name: Install Bazel @@ -37,13 +43,11 @@ jobs: run: > bazel build -c opt - --action_env=BAZEL_CXXOPTS="-std=c++17" - --subcommands=true - ortools/... examples/... + --subcommands=pretty_print + //ortools/... //examples/... - name: Test run: > bazel test -c opt - --action_env=BAZEL_CXXOPTS="-std=c++17" --test_output=errors - ortools/... examples/... + //ortools/... //examples/... diff --git a/.github/workflows/amd64_linux_cmake_coinor_off.yml b/.github/workflows/amd64_linux_cmake_coinor_off.yml index f95e2dfd17..7729f40095 100644 --- a/.github/workflows/amd64_linux_cmake_coinor_off.yml +++ b/.github/workflows/amd64_linux_cmake_coinor_off.yml @@ -1,101 +1,71 @@ +# ref: https://github.com/actions/runner-images name: amd64 Linux CMake CoinOR OFF on: [push, pull_request, workflow_dispatch] +# Building using the github runner environement directly. jobs: - # Building using the github runner environement directly. - linux_cpp: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - name: Check cmake - run: cmake --version - - name: Configure - run: cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release -DBUILD_DEPS=ON - -DBUILD_CXX=ON -DUSE_COINOR=OFF - - name: Build - run: cmake --build build --config Release --target all -v - - name: Test - run: CTEST_OUTPUT_ON_FAILURE=1 cmake --build build --config Release --target test -v - - name: Install - run: cmake --build build --config Release --target install -v -- DESTDIR=install - - linux_dotnet: + linux: + strategy: + matrix: + cmake: [ + {language: 'C++', args: '-DBUILD_CXX=ON'}, + {language: '.Net', args: '-DBUILD_CXX_SAMPLES=OFF -DBUILD_CXX_EXAMPLES=OFF -DBUILD_DOTNET=ON'}, + {language: 'Java', args: '-DBUILD_CXX_SAMPLES=OFF -DBUILD_CXX_EXAMPLES=OFF -DBUILD_JAVA=ON'}, + {language: 'Python', args: '-DBUILD_CXX_SAMPLES=OFF -DBUILD_CXX_EXAMPLES=OFF -DBUILD_PYTHON=ON'}, + ] + fail-fast: false + name: Linux • CMake • ${{ matrix.cmake.language }} • CoinOR OFF runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 + # Install SWIG - name: Swig install run: sudo apt install -y swig - name: Check swig run: swig -version # Install .NET SDKs - - name: Setup .NET Core 3.1 - uses: actions/setup-dotnet@v1 - with: - dotnet-version: 3.1.x - name: Setup .NET 6.0 uses: actions/setup-dotnet@v1 with: dotnet-version: 6.0.x - name: Check dotnet run: dotnet --info - - name: Check cmake - run: cmake --version - - name: Configure - run: cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release -DBUILD_DEPS=ON - -DBUILD_CXX_SAMPLES=OFF -DBUILD_CXX_EXAMPLES=OFF - -DBUILD_DOTNET=ON -DUSE_COINOR=OFF - - name: Build - run: cmake --build build --config Release --target all -v - - name: Test - run: CTEST_OUTPUT_ON_FAILURE=1 cmake --build build --config Release --target test -v - - name: Install - run: cmake --build build --config Release --target install -v -- DESTDIR=install - - linux_java: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - name: Swig install - run: sudo apt install -y swig - - name: Check swig - run: swig -version + # Install Java - name: Check java run: java -version - - name: Check cmake - run: cmake --version - - name: Configure - run: cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release -DBUILD_DEPS=ON - -DBUILD_CXX_SAMPLES=OFF -DBUILD_CXX_EXAMPLES=OFF - -DBUILD_JAVA=ON -DUSE_COINOR=OFF - - name: Build - run: cmake --build build --config Release --target all -v - - name: Test - run: CTEST_OUTPUT_ON_FAILURE=1 cmake --build build --config Release --target test -v - - name: Install - run: cmake --build build --config Release --target install -v -- DESTDIR=install - - linux_python: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - name: Swig install - run: sudo apt install -y swig - - name: Check swig - run: swig -version + # Install Python - name: Install python3 venv run: sudo apt-get install python3-venv - name: Update Path run: echo "$HOME/.local/bin" >> $GITHUB_PATH + # CMake - name: Check cmake run: cmake --version - name: Configure - run: cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release -DBUILD_DEPS=ON - -DBUILD_CXX_SAMPLES=OFF -DBUILD_CXX_EXAMPLES=OFF - -DBUILD_PYTHON=ON -DUSE_COINOR=OFF + run: > + cmake -S. -Bbuild + -DCMAKE_BUILD_TYPE=Release + -DBUILD_DEPS=ON + -DUSE_COINOR=OFF + ${{ matrix.cmake.args }} - name: Build - run: cmake --build build --config Release --target all -v + run: > + cmake --build build + --config Release + --target all + -v - name: Test - run: CTEST_OUTPUT_ON_FAILURE=1 cmake --build build --config Release --target test -v + run: > + CTEST_OUTPUT_ON_FAILURE=1 + cmake --build build + --config Release + --target test + -v - name: Install - run: cmake --build build --config Release --target install -v -- DESTDIR=install + run: > + cmake --build build + --config Release + --target install + -v + -- DESTDIR=install diff --git a/.github/workflows/amd64_linux_cmake_glpk_on.yml b/.github/workflows/amd64_linux_cmake_glpk_on.yml index d17d574187..02b8e65417 100644 --- a/.github/workflows/amd64_linux_cmake_glpk_on.yml +++ b/.github/workflows/amd64_linux_cmake_glpk_on.yml @@ -1,21 +1,41 @@ +# ref: https://github.com/actions/runner-images name: amd64 Linux CMake GLPK ON on: [push, pull_request, workflow_dispatch] +# Building using the github runner environement directly. jobs: - # Building using the github runner environement directly. - linux_cpp: + native: + name: Linux • CMake • GLPK ON runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 - - name: Check cmake - run: cmake --version - - name: Configure - run: cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release -DBUILD_DEPS=ON - -DBUILD_CXX=ON -DUSE_GLPK=ON -DUSE_SCIP=OFF -DUSE_COINOR=OFF - - name: Build - run: cmake --build build --config Release --target all -v - - name: Test - run: CTEST_OUTPUT_ON_FAILURE=1 cmake --build build --config Release --target test -v - - name: Install - run: cmake --build build --config Release --target install -v -- DESTDIR=install + - uses: actions/checkout@v4 + - name: Check cmake + run: cmake --version + - name: Configure + run: > + cmake -S. -Bbuild + -DCMAKE_BUILD_TYPE=Release + -DBUILD_DEPS=ON + -DUSE_SCIP=OFF -DUSE_COINOR=OFF + -DUSE_GLPK=ON + - name: Build + run: > + cmake --build build + --config Release + --target all + -v -j + - name: Test + run: > + CTEST_OUTPUT_ON_FAILURE=1 + cmake --build build + --config Release + --target test + -v -j + - name: Install + run: > + cmake --build build + --config Release + --target install + -v -j + -- DESTDIR=install diff --git a/.github/workflows/amd64_linux_cmake_no_lp_parser.yml b/.github/workflows/amd64_linux_cmake_no_lp_parser.yml index 9482a9b478..ca7392a989 100644 --- a/.github/workflows/amd64_linux_cmake_no_lp_parser.yml +++ b/.github/workflows/amd64_linux_cmake_no_lp_parser.yml @@ -1,20 +1,40 @@ +# ref: https://github.com/actions/runner-images name: amd64 Linux CMake C++ LP_PARSER OFF on: [push, pull_request, workflow_dispatch] +# Building using the github runner environement directly. jobs: - # Building using the github runner environement directly. - cmake: + native: + name: Linux • CMake • LP_PARSER OFF runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 - - name: Check cmake - run: cmake --version - - name: Configure - run: cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release -DBUILD_DEPS=ON -DBUILD_LP_PARSER=OFF - - name: Build - run: cmake --build build --config Release --target all -v - - name: Test - run: CTEST_OUTPUT_ON_FAILURE=1 cmake --build build --config Release --target test -v - - name: Install - run: cmake --build build --config Release --target install -v -- DESTDIR=install + - uses: actions/checkout@v4 + - name: Check cmake + run: cmake --version + - name: Configure + run: > + cmake -S. -Bbuild + -DCMAKE_BUILD_TYPE=Release + -DBUILD_DEPS=ON + -DBUILD_LP_PARSER=OFF + - name: Build + run: > + cmake --build build + --config Release + --target all + -v -j + - name: Test + run: > + CTEST_OUTPUT_ON_FAILURE=1 + cmake --build build + --config Release + --target test + -v -j + - name: Install + run: > + cmake --build build + --config Release + --target install + -v -j + -- DESTDIR=install diff --git a/.github/workflows/amd64_linux_cmake_python.yml b/.github/workflows/amd64_linux_cmake_python.yml index 2df9b0101a..5a3209bf40 100644 --- a/.github/workflows/amd64_linux_cmake_python.yml +++ b/.github/workflows/amd64_linux_cmake_python.yml @@ -1,80 +1,71 @@ +# ref: https://github.com/actions/runner-images name: amd64 Linux CMake Python on: [push, pull_request, workflow_dispatch] +# Building using the github runner environement directly. jobs: - # Building using the github runner environement directly. - ninja: + native: + strategy: + matrix: + cmake: [ + {generator: "Ninja", config: Release, build_target: all, test_target: test, install_target: install}, + {generator: "Ninja Multi-Config", config: Release, build_target: all, test_target: test, install_target: install}, + {generator: "Unix Makefiles", config: Release, build_target: all, test_target: test, install_target: install}, + ] + python: [ + {version: '3.9'}, + {version: '3.10'}, + {version: '3.11'}, + {version: '3.12'}, + ] + fail-fast: false + name: Linux • ${{ matrix.cmake.generator }} • Python-${{ matrix.python.version }} runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 - - name: Install python3 venv - run: sudo apt-get install python3-venv - - name: Install Ninja - run: | - sudo apt update - sudo apt install -y ninja-build - - name: Swig install - run: sudo apt install -y swig - - name: Check swig - run: swig -version - - name: Update Path - run: echo "$HOME/.local/bin" >> $GITHUB_PATH - - name: Check cmake - run: cmake --version - - name: Configure - run: cmake -S. -Bbuild -G "Ninja" -DCMAKE_BUILD_TYPE=Release -DBUILD_PYTHON=ON -DBUILD_CXX_SAMPLES=OFF -DBUILD_CXX_EXAMPLES=OFF -DCMAKE_INSTALL_PREFIX=install - - name: Build - run: cmake --build build --target all -v - - name: Test - run: CTEST_OUTPUT_ON_FAILURE=1 cmake --build build --target test -v - - name: Install - run: cmake --build build --target install -v - ninja-multi: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - name: Install python3 venv - run: sudo apt-get install python3-venv - - name: Install Ninja - run: | - sudo apt update - sudo apt install -y ninja-build - - name: Swig install - run: sudo apt install -y swig - - name: Check swig - run: swig -version - - name: Update Path - run: echo "$HOME/.local/bin" >> $GITHUB_PATH - - name: Check cmake - run: cmake --version - - name: Configure - run: cmake -S. -Bbuild -G "Ninja Multi-Config" -DBUILD_PYTHON=ON -DBUILD_CXX_SAMPLES=OFF -DBUILD_CXX_EXAMPLES=OFF -DCMAKE_INSTALL_PREFIX=install - - name: Build - run: cmake --build build --config Release --target all -v - - name: Test - run: CTEST_OUTPUT_ON_FAILURE=1 cmake --build build --config Release --target test -v - - name: Install - run: cmake --build build --config Release --target install -v - make: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - name: Install python3 venv - run: sudo apt-get install python3-venv - - name: Swig install - run: sudo apt install -y swig - - name: Check swig - run: swig -version - - name: Update Path - run: echo "$HOME/.local/bin" >> $GITHUB_PATH - - name: Check cmake - run: cmake --version - - name: Configure - run: cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release -DBUILD_PYTHON=ON -DBUILD_CXX_SAMPLES=OFF -DBUILD_CXX_EXAMPLES=OFF - - name: Build - run: cmake --build build --config Release --target all -v - - name: Test - run: CTEST_OUTPUT_ON_FAILURE=1 cmake --build build --config Release --target test -v - - name: Install - run: cmake --build build --config Release --target install -v -- DESTDIR=install + - uses: actions/checkout@v4 + - name: Install Ninja + run: | + sudo apt update + sudo apt install -y ninja-build + - name: Swig install + run: | + sudo apt install -y swig + swig -version + - name: Setup Python + uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python.version }} + - name: Install python3 venv + run: python3 -m pip install venv + - name: Update Path + run: echo "$HOME/.local/bin" >> $GITHUB_PATH + - name: Check cmake + run: cmake --version + - name: Configure + run: > + cmake -S. -Bbuild + -G ${{ matrix.cmake.generator }} + -DCMAKE_BUILD_TYPE=${{ matrix.cmake.config }} + -DBUILD_PYTHON=ON + -DBUILD_CXX_SAMPLES=OFF -DBUILD_CXX_EXAMPLES=OFF + -DCMAKE_INSTALL_PREFIX=install + - name: Build + run: > + cmake --build build + --config ${{ matrix.cmake.config }} + --target ${{ matrix.cmake.build_target }} + -v -j + - name: Test + run: > + CTEST_OUTPUT_ON_FAILURE=1 + cmake --build build + --config ${{ matrix.cmake.config }} + --target ${{ matrix.cmake.test_target }} + -v -j + - name: Install + run: > + cmake --build build + --config ${{ matrix.cmake.config }} + --target ${{ matrix.cmake.install_target }} + -v -j diff --git a/.github/workflows/amd64_linux_cmake_scip_off.yml b/.github/workflows/amd64_linux_cmake_scip_off.yml index 250dcaccf7..246357e466 100644 --- a/.github/workflows/amd64_linux_cmake_scip_off.yml +++ b/.github/workflows/amd64_linux_cmake_scip_off.yml @@ -1,101 +1,71 @@ +# ref: https://github.com/actions/runner-images name: amd64 Linux CMake SCIP OFF on: [push, pull_request, workflow_dispatch] +# Building using the github runner environement directly. jobs: - # Building using the github runner environement directly. - linux_cpp: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - name: Check cmake - run: cmake --version - - name: Configure - run: cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release -DBUILD_DEPS=ON - -DBUILD_CXX=ON -DUSE_SCIP=OFF - - name: Build - run: cmake --build build --config Release --target all -v - - name: Test - run: CTEST_OUTPUT_ON_FAILURE=1 cmake --build build --config Release --target test -v - - name: Install - run: cmake --build build --config Release --target install -v -- DESTDIR=install - - linux_dotnet: + linux: + strategy: + matrix: + cmake: [ + {language: 'C++', args: '-DBUILD_CXX=ON'}, + {language: '.Net', args: '-DBUILD_CXX_SAMPLES=OFF -DBUILD_CXX_EXAMPLES=OFF -DBUILD_DOTNET=ON'}, + {language: 'Java', args: '-DBUILD_CXX_SAMPLES=OFF -DBUILD_CXX_EXAMPLES=OFF -DBUILD_JAVA=ON'}, + {language: 'Python', args: '-DBUILD_CXX_SAMPLES=OFF -DBUILD_CXX_EXAMPLES=OFF -DBUILD_PYTHON=ON'}, + ] + fail-fast: false + name: Linux • CMake • ${{ matrix.cmake.language }} • SCIP OFF runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 + # Install SWIG - name: Swig install run: sudo apt install -y swig - name: Check swig run: swig -version # Install .NET SDKs - - name: Setup .NET Core 3.1 - uses: actions/setup-dotnet@v1 - with: - dotnet-version: 3.1.x - name: Setup .NET 6.0 uses: actions/setup-dotnet@v1 with: dotnet-version: 6.0.x - name: Check dotnet run: dotnet --info - - name: Check cmake - run: cmake --version - - name: Configure - run: cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release -DBUILD_DEPS=ON - -DBUILD_CXX_SAMPLES=OFF -DBUILD_CXX_EXAMPLES=OFF - -DBUILD_DOTNET=ON -DUSE_SCIP=OFF - - name: Build - run: cmake --build build --config Release --target all -v - - name: Test - run: CTEST_OUTPUT_ON_FAILURE=1 cmake --build build --config Release --target test -v - - name: Install - run: cmake --build build --config Release --target install -v -- DESTDIR=install - - linux_java: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - name: Swig install - run: sudo apt install -y swig - - name: Check swig - run: swig -version + # Install Java - name: Check java run: java -version - - name: Check cmake - run: cmake --version - - name: Configure - run: cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release -DBUILD_DEPS=ON - -DBUILD_CXX_SAMPLES=OFF -DBUILD_CXX_EXAMPLES=OFF - -DBUILD_JAVA=ON -DUSE_SCIP=OFF - - name: Build - run: cmake --build build --config Release --target all -v - - name: Test - run: CTEST_OUTPUT_ON_FAILURE=1 cmake --build build --config Release --target test -v - - name: Install - run: cmake --build build --config Release --target install -v -- DESTDIR=install - - linux_python: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - name: Swig install - run: sudo apt install -y swig - - name: Check swig - run: swig -version + # Install Python - name: Install python3 venv run: sudo apt-get install python3-venv - name: Update Path run: echo "$HOME/.local/bin" >> $GITHUB_PATH + # CMake - name: Check cmake run: cmake --version - name: Configure - run: cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release -DBUILD_DEPS=ON - -DBUILD_CXX_SAMPLES=OFF -DBUILD_CXX_EXAMPLES=OFF - -DBUILD_PYTHON=ON -DUSE_SCIP=OFF + run: > + cmake -S. -Bbuild + -DCMAKE_BUILD_TYPE=Release + -DBUILD_DEPS=ON + -DUSE_SCIP=OFF + ${{ matrix.cmake.args }} - name: Build - run: cmake --build build --config Release --target all -v + run: > + cmake --build build + --config Release + --target all + -v - name: Test - run: CTEST_OUTPUT_ON_FAILURE=1 cmake --build build --config Release --target test -v + run: > + CTEST_OUTPUT_ON_FAILURE=1 + cmake --build build + --config Release + --target test + -v - name: Install - run: cmake --build build --config Release --target install -v -- DESTDIR=install + run: > + cmake --build build + --config Release + --target install + -v + -- DESTDIR=install diff --git a/.github/workflows/amd64_linux_cmake_system_deps.yml b/.github/workflows/amd64_linux_cmake_system_deps.yml index 5d0dcf1d8a..0c76f5786e 100644 --- a/.github/workflows/amd64_linux_cmake_system_deps.yml +++ b/.github/workflows/amd64_linux_cmake_system_deps.yml @@ -5,36 +5,34 @@ on: [push, pull_request, workflow_dispatch] jobs: linux: - runs-on: ubuntu-latest strategy: matrix: distro: [system_deps] lang: [cpp, python, dotnet, java] fail-fast: false - env: - DISTRO: ${{ matrix.distro }} - LANG: ${{ matrix.lang }} + name: Archlinux • CMake • ${{ matrix.lang }} • BUILD_DEPS OFF + runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 - - name: Build base image - run: make --directory=cmake ${DISTRO}_base - - name: Build env image - run: make --directory=cmake ${DISTRO}_${LANG}_env - - name: Build devel image - run: make --directory=cmake ${DISTRO}_${LANG}_devel - - name: Build project - run: make --directory=cmake ${DISTRO}_${LANG}_build - - name: Test project - run: make --directory=cmake ${DISTRO}_${LANG}_test + - uses: actions/checkout@v4 + - name: Build base image + run: make --directory=cmake ${{ matrix.distro }}_base + - name: Build env image + run: make --directory=cmake ${{ matrix.distro }}_${{ matrix.lang }}_env + - name: Build devel image + run: make --directory=cmake ${{ matrix.distro }}_${{ matrix.lang }}_devel + - name: Build project + run: make --directory=cmake ${{ matrix.distro }}_${{ matrix.lang }}_build + - name: Test project + run: make --directory=cmake ${{ matrix.distro }}_${{ matrix.lang }}_test - - name: Build Install env image - run: make --directory=cmake ${DISTRO}_${LANG}_install_env - - name: Build Install devel image - run: make --directory=cmake ${DISTRO}_${LANG}_install_devel - - name: Build Install - run: make --directory=cmake ${DISTRO}_${LANG}_install_build - - name: Test Install - run: make --directory=cmake ${DISTRO}_${LANG}_install_test + - name: Build Install env image + run: make --directory=cmake ${{ matrix.distro }}_${{ matrix.lang }}_install_env + - name: Build Install devel image + run: make --directory=cmake ${{ matrix.distro }}_${{ matrix.lang }}_install_devel + - name: Build Install + run: make --directory=cmake ${{ matrix.distro }}_${{ matrix.lang }}_install_build + - name: Test Install + run: make --directory=cmake ${{ matrix.distro }}_${{ matrix.lang }}_install_test # TODO(user): Add macOS + brew job # TODO(user): Add Windows + choco/vcpkg job diff --git a/.github/workflows/amd64_macos_bazel.yml b/.github/workflows/amd64_macos_bazel.yml index 4df61c1aa3..cb4ecc4901 100644 --- a/.github/workflows/amd64_macos_bazel.yml +++ b/.github/workflows/amd64_macos_bazel.yml @@ -3,17 +3,22 @@ name: amd64 MacOS Bazel on: [push, pull_request, workflow_dispatch] +# Building using the github runner environement directly. jobs: - # Building using the github runner environement directly. - bazel: - runs-on: macos-latest + native: strategy: matrix: - python-version: ['3.9', '3.10', '3.11', '3.12'] + python: [ + {version: '3.9'}, + {version: '3.10'}, + {version: '3.11'}, + {version: '3.12'}, + ] fail-fast: false + name: MacOS • Bazel • Python-${{ matrix.python.version }} + runs-on: macos-latest steps: - - name: Check out repository code - uses: actions/checkout@v4 + - uses: actions/checkout@v4 - name: Set Java to OpenJDK 17 (Temurin) uses: actions/setup-java@v3 with: @@ -22,9 +27,9 @@ jobs: - name: Check mvn run: mvn --version - name: Setup Python - uses: actions/setup-python@v3 + uses: actions/setup-python@v4 with: - python-version: ${{ matrix.python-version }} + python-version: ${{ matrix.python.version }} - name: Check Python run: python --version - name: Install Bazel @@ -38,13 +43,11 @@ jobs: run: > bazel build -c opt - --action_env=BAZEL_CXXOPTS="-std=c++17" - --subcommands=true + --subcommands=pretty_print //ortools/... //examples/... - name: Test run: > bazel test -c opt - --action_env=BAZEL_CXXOPTS="-std=c++17" --test_output=errors //ortools/... //examples/... diff --git a/.github/workflows/amd64_macos_cmake_python.yml b/.github/workflows/amd64_macos_cmake_python.yml index 170ee70748..0a74452de5 100644 --- a/.github/workflows/amd64_macos_cmake_python.yml +++ b/.github/workflows/amd64_macos_cmake_python.yml @@ -1,3 +1,4 @@ +# ref: https://github.com/actions/runner-images name: amd64 MacOS CMake Python on: [push, pull_request, workflow_dispatch] @@ -5,38 +6,54 @@ on: [push, pull_request, workflow_dispatch] jobs: # Building using the github runner environement directly. macos: - runs-on: macos-latest strategy: - matrix: - build: [ - ["Xcode", "Release", "ALL_BUILD", "RUN_TESTS", "install"], - ["Unix Makefiles", "Release", "all", "test", "install"] - ] - fail-fast: false - env: - GENERATOR: ${{ matrix.build[0] }} - BUILD_TYPE: ${{ matrix.build[1] }} - BUILD_TARGET: ${{ matrix.build[2] }} - TEST_TARGET: ${{ matrix.build[3] }} - INSTALL_TARGET: ${{ matrix.build[4] }} + matrix: + cmake: [ + {generator: "Xcode", config: Release, build_target: ALL_BUILD, test_target: RUN_TESTS, install_target: install}, + {generator: "Unix Makefiles", config: Release, build_target: all, test_target: test, install_target: install}, + ] + python: [{version: 3.9}, {version: 3.10}, {version: 3.11}, {version: 3.12}] + fail-fast: false + name: ${{ matrix.cmake.generator }} • Python ${{ matrix.python.version }} + runs-on: macos-latest steps: - - uses: actions/checkout@v4 - - name: Swig install - run: brew install swig - - name: Check swig - run: swig -version - - name: Update Path - run: echo "$HOME/Library/Python/3.12/bin" >> $GITHUB_PATH - - name: Check cmake - run: cmake --version - - name: Configure - run: > - cmake -S. -Bbuild -G "$GENERATOR" -DCMAKE_BUILD_TYPE="$BUILD_TYPE" -DCMAKE_INSTALL_PREFIX=install - -DBUILD_CXX_SAMPLES=OFF -DBUILD_CXX_EXAMPLES=OFF - -DBUILD_PYTHON=ON - - name: Build - run: cmake --build build --config "$BUILD_TYPE" --target "$BUILD_TARGET" -v - - name: Test - run: CTEST_OUTPUT_ON_FAILURE=1 cmake --build build --config "$BUILD_TYPE" --target "$TEST_TARGET" -v - - name: Install - run: cmake --build build --config "$BUILD_TYPE" --target "$INSTALL_TARGET" -v + - uses: actions/checkout@v4 + - name: Setup Python + uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python.version }} + - name: Update Path + run: echo "$HOME/Library/Python/${{ matrix.python-version }}/bin" >> $GITHUB_PATH + - name: Swig install + run: brew install swig + - name: Check swig + run: swig -version + - name: Check cmake + run: cmake --version + - name: Configure + run: > + cmake -S. -Bbuild + -G ${{ matrix.cmake.generator }} + -DCMAKE_BUILD_TYPE=${{ matrix.cmake.config }} + -DCMAKE_INSTALL_PREFIX=install + -DBUILD_CXX_SAMPLES=OFF -DBUILD_CXX_EXAMPLES=OFF + -DBUILD_PYTHON=ON + - name: Build + run: > + cmake --build build + --config ${{ matrix.cmake.config }} + --target ${{ matrix.cmake.build_target }} + -v + - name: Test + run: > + CTEST_OUTPUT_ON_FAILURE=1 + cmake --build build + --config ${{ matrix.cmake.config }} + --target ${{ matrix.cmake.test_target }} + -v + - name: Install + run: > + cmake --build build + --config ${{ matrix.cmake.config }} + --target ${{ matrix.cmake.install_target }} + -v diff --git a/.github/workflows/amd64_windows_bazel.yml b/.github/workflows/amd64_windows_bazel.yml index 3873e2adc1..d54ad6d803 100644 --- a/.github/workflows/amd64_windows_bazel.yml +++ b/.github/workflows/amd64_windows_bazel.yml @@ -3,16 +3,21 @@ name: amd64 Windows Bazel on: [push, pull_request, workflow_dispatch] +# Building using the github runner environement directly. jobs: - # Building using the github runner environement directly. - bazel: + native: strategy: matrix: runner: [windows-2022, windows-2019] - python-version: ['3.9', '3.10', '3.11', '3.12'] + python: [ + {version: '3.9'}, + {version: '3.10'}, + {version: '3.11'}, + {version: '3.12'}, + ] fail-fast: false # Don't cancel all jobs if one fails. + name: ${{ matrix.runner }} • Bazel • Python-${{ matrix.python.version }} runs-on: ${{ matrix.runner }} - #runs-on: windows-latest steps: - uses: actions/checkout@v4 - uses: actions/setup-java@v3 @@ -24,9 +29,9 @@ jobs: - name: Check mvn run: mvn --version - name: Setup Python - uses: actions/setup-python@v3 + uses: actions/setup-python@v4 with: - python-version: ${{ matrix.python-version }} + python-version: ${{ matrix.python.version }} - name: Check Python run: python --version - name: Install Bazel @@ -37,13 +42,11 @@ jobs: run: > bazel build -c opt - --cxxopt="/std:c++20" - --subcommands=true + --subcommands=pretty_print //ortools/... //examples/... - name: Test run: > bazel test -c opt - --cxxopt="/std:c++20" --test_output=errors //ortools/... //examples/... diff --git a/.github/workflows/amd64_windows_cmake_python.yml b/.github/workflows/amd64_windows_cmake_python.yml index fadf5e61f4..15157ebd92 100644 --- a/.github/workflows/amd64_windows_cmake_python.yml +++ b/.github/workflows/amd64_windows_cmake_python.yml @@ -1,3 +1,4 @@ +# ref: https://github.com/actions/runner-images name: amd64 Windows CMake Python on: [push, pull_request, workflow_dispatch] @@ -5,30 +6,62 @@ on: [push, pull_request, workflow_dispatch] jobs: # Building using the github runner environement directly. cmake: + strategy: + matrix: + cmake: [ + {generator: "Visual Studio 17 2022", config: Release, build_target: ALL_BUILD, test_target: RUN_TESTS, install_target: INSTALL}, + ] + python: [ + {version: 3.9, dir: Python309}, + {version: 3.10, dir: Python310}, + {version: 3.11, dir: Python311}, + {version: 3.12, dir: Python312}, + ] + fail-fast: false + name: ${{ matrix.cmake.generator }} • Python ${{ matrix.python.version }} runs-on: windows-latest steps: - - uses: actions/checkout@v4 - - uses: actions/setup-python@v2 - with: - python-version: '3.10' - - name: Install python3 - run: python3 -m pip install --user mypy-protobuf absl-py setuptools wheel numpy pandas - - name: Install SWIG 4.1.1 - run: | - (New-Object System.Net.WebClient).DownloadFile("http://prdownloads.sourceforge.net/swig/swigwin-4.1.1.zip","swigwin-4.1.1.zip"); - Expand-Archive .\swigwin-4.1.1.zip .; - echo "$((Get-Item .).FullName)/swigwin-4.1.1" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append - - name: Check swig - run: swig -version - - name: Add Python binaries to path - run: echo "$((Get-Item ~).FullName)/AppData/Roaming/Python/Python310/Scripts" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append - - name: Check cmake - run: cmake --version - - name: Configure - run: cmake -S. -Bbuild -G "Visual Studio 17 2022" -A x64 -DCMAKE_BUILD_TYPE=Release -DBUILD_PYTHON=ON -DBUILD_CXX_SAMPLES=OFF -DBUILD_CXX_EXAMPLES=OFF - - name: Build - run: cmake --build build --config Release --target ALL_BUILD -v -- /maxcpucount - - name: Test - run: cmake --build build --config Release --target RUN_TESTS -v -- /maxcpucount - - name: Install - run: cmake --build build --config Release --target INSTALL -v -- /maxcpucount + - uses: actions/checkout@v4 + - uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python.version }} + - name: Install python3 + run: python3 -m pip install --user mypy-protobuf absl-py setuptools wheel numpy pandas + - name: Install SWIG 4.1.1 + run: | + (New-Object System.Net.WebClient).DownloadFile("http://prdownloads.sourceforge.net/swig/swigwin-4.1.1.zip","swigwin-4.1.1.zip"); + Expand-Archive .\swigwin-4.1.1.zip .; + echo "$((Get-Item .).FullName)/swigwin-4.1.1" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append + - name: Check swig + run: swig -version + - name: Add Python binaries to path + run: > + echo "$((Get-Item ~).FullName)/AppData/Roaming/Python/${{ matrix.python.dir }}/Scripts" | + Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append + - name: Check cmake + run: cmake --version + - name: Configure + run: > + cmake -S. -Bbuild + -G "${{ matrix.cmake.generator }}" -A x64 + -DCMAKE_BUILD_TYPE=${{ matrix.cmake.config }} + -DBUILD_PYTHON=ON + -DBUILD_CXX_SAMPLES=OFF -DBUILD_CXX_EXAMPLES=OFF + - name: Build + run: > + cmake --build build + --config ${{ matrix.cmake.config }} + --target ${{ matrix.cmake.build_target }} + -v -j + - name: Test + run: > + cmake --build build + --config ${{ matrix.cmake.config }} + --target ${{ matrix.cmake.test_target }} + -v -j + - name: Install + run: > + cmake --build build + --config ${{ matrix.cmake.config }} + --target ${{ matrix.cmake.install_target }} + -v -j