diff --git a/.github/workflows/make_linux_cpp.yml b/.github/workflows/make_linux_cpp.yml new file mode 100644 index 0000000000..dc923f6f80 --- /dev/null +++ b/.github/workflows/make_linux_cpp.yml @@ -0,0 +1,20 @@ +name: Make Linux C++ + +on: [push, pull_request] + +jobs: + # Building using the github runner environement directly. + make: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Check make + run: make --version + - name: Build third party + run: make third_party -j4 + - name: Build C++ + run: make cc -j4 + - name: Test + run: make test_cc + - name: Install + run: make install_cc DESTDIR=install diff --git a/.github/workflows/make_linux_dotnet.yml b/.github/workflows/make_linux_dotnet.yml new file mode 100644 index 0000000000..05b169f831 --- /dev/null +++ b/.github/workflows/make_linux_dotnet.yml @@ -0,0 +1,28 @@ +name: Make Linux .Net + +on: [push, pull_request] + +jobs: + # Building using the github runner environement directly. + make: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Check make + run: make --version + - name: Swig install + run: sudo apt install -y swig + - name: Check swig + run: swig -version + - name: Check dotnet + run: dotnet --info + - name: Build third party + run: make third_party -j4 + - name: Build C++ + run: make cc -j4 + - name: Build .Net + run: make dotnet -j4 + - name: Test + run: make test_dotnet -j4 + - name: Create nuget packages + run: make package_dotnet diff --git a/.github/workflows/make_linux_java.yml b/.github/workflows/make_linux_java.yml new file mode 100644 index 0000000000..d33e811170 --- /dev/null +++ b/.github/workflows/make_linux_java.yml @@ -0,0 +1,28 @@ +name: Make Linux Java + +on: [push, pull_request] + +jobs: + # Building using the github runner environement directly. + make: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Check cmake + run: cmake --version + - name: Swig install + run: sudo apt install -y swig + - name: Check swig + run: swig -version + - name: Check java + run: java -version + - name: Build third party + run: make third_party -j4 + - name: Build C++ + run: make cc -j4 + - name: Build Java + run: make java -j4 + - name: Test + run: make test_java -j4 + - name: Create maven package + run: make package_java diff --git a/.github/workflows/make_linux_python.yml b/.github/workflows/make_linux_python.yml new file mode 100644 index 0000000000..85978ff42f --- /dev/null +++ b/.github/workflows/make_linux_python.yml @@ -0,0 +1,30 @@ +name: Make Linux Python + +on: [push, pull_request] + +jobs: + # Building using the github runner environement directly. + make: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Install python3 venv + run: sudo apt-get install python3-venv + - name: Check cmake + run: cmake --version + - 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: Build third party + run: make third_party -j4 + - name: Build C++ + run: make cc -j4 + - name: Build Python + run: make python -j4 + - name: Test + run: make test_python -j4 + - name: Create wheel package + run: make package_python diff --git a/.github/workflows/make_macos_cpp.yml b/.github/workflows/make_macos_cpp.yml new file mode 100644 index 0000000000..47507cf71e --- /dev/null +++ b/.github/workflows/make_macos_cpp.yml @@ -0,0 +1,19 @@ +name: Make MacOS C++ + +on: [push, pull_request] + +jobs: + make: + runs-on: macos-latest + steps: + - uses: actions/checkout@v2 + - name: Check make + run: make --version + - name: Build third party + run: make third_party -j4 + - name: Build C++ + run: make cc -j4 + - name: Test + run: make test_cc + - name: Install + run: make install_cc DESTDIR=install diff --git a/.github/workflows/make_macos_dotnet.yml b/.github/workflows/make_macos_dotnet.yml new file mode 100644 index 0000000000..2c31078c20 --- /dev/null +++ b/.github/workflows/make_macos_dotnet.yml @@ -0,0 +1,28 @@ +name: Make MacOS .Net + +on: [push, pull_request] + +jobs: + # Building using the github runner environement directly. + make: + runs-on: macos-latest + steps: + - uses: actions/checkout@v2 + - name: Check make + run: make --version + - name: Swig install + run: brew install swig + - name: Check swig + run: swig -version + - name: Check dotnet + run: dotnet --info + - name: Build third party + run: make third_party -j4 + - name: Build C++ + run: make cc -j4 + - name: Build .Net + run: make dotnet -j4 + - name: Test + run: make test_dotnet -j4 + - name: Create nuget packages + run: make package_dotnet diff --git a/.github/workflows/make_macos_java.yml b/.github/workflows/make_macos_java.yml new file mode 100644 index 0000000000..faa8497bff --- /dev/null +++ b/.github/workflows/make_macos_java.yml @@ -0,0 +1,28 @@ +name: Make MacOS Java + +on: [push, pull_request] + +jobs: + # Building using the github runner environement directly. + make: + runs-on: macos-latest + steps: + - uses: actions/checkout@v2 + - name: Check make + run: make --version + - name: Swig install + run: brew install swig + - name: Check swig + run: swig -version + - name: Check java + run: java -version + - name: Build third party + run: make third_party -j4 + - name: Build C++ + run: make cc -j4 + - name: Build Java + run: make java -j4 + - name: Test + run: make test_java -j4 + - name: Create maven package + run: make package_java diff --git a/.github/workflows/make_macos_python.yml b/.github/workflows/make_macos_python.yml new file mode 100644 index 0000000000..d26bbc0091 --- /dev/null +++ b/.github/workflows/make_macos_python.yml @@ -0,0 +1,28 @@ +name: Make MacOS Python + +on: [push, pull_request] + +jobs: + # Building using the github runner environement directly. + make: + runs-on: macos-latest + steps: + - uses: actions/checkout@v2 + - name: Check make + run: make --version + - name: Swig install + run: brew install swig + - name: Check swig + run: swig -version + - name: Update Path + run: echo "$HOME/Library/Python/3.9/bin" >> $GITHUB_PATH + - name: Build third party + run: make third_party -j4 + - name: Build C++ + run: make cc -j4 + - name: Build Python + run: make python -j4 + - name: Test + run: make test_python -j4 + - name: Create wheel package + run: make package_python diff --git a/.github/workflows/make_windows_cpp.yml b/.github/workflows/make_windows_cpp.yml new file mode 100644 index 0000000000..30c69845dd --- /dev/null +++ b/.github/workflows/make_windows_cpp.yml @@ -0,0 +1,20 @@ +name: Make Windows C++ + +on: [push, pull_request] + +jobs: + # Building using the github runner environement directly. + make: + runs-on: windows-latest + steps: + - uses: actions/checkout@v2 + - name: Check make + run: make --version + - name: Build third party + run: make third_party -j4 + - name: Build C++ + run: make cc -j4 + - name: Test + run: make test_cc + - name: Install + run: make install_cc DESTDIR=install diff --git a/.github/workflows/make_windows_dotnet.yml b/.github/workflows/make_windows_dotnet.yml new file mode 100644 index 0000000000..cb697c9c5c --- /dev/null +++ b/.github/workflows/make_windows_dotnet.yml @@ -0,0 +1,31 @@ +name: Make Windows .Net + +on: [push, pull_request] + +jobs: + # Building using the github runner environement directly. + make: + runs-on: windows-latest + steps: + - uses: actions/checkout@v2 + - name: Check make + run: make --version + - name: Install SWIG 4.0.2 + run: | + (New-Object System.Net.WebClient).DownloadFile("http://prdownloads.sourceforge.net/swig/swigwin-4.0.2.zip","swigwin-4.0.2.zip"); + Expand-Archive .\swigwin-4.0.2.zip .; + echo "$((Get-Item .).FullName)/swigwin-4.0.2" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append + - name: Check swig + run: swig -version + - name: Check dotnet + run: dotnet --info + - name: Build third party + run: make third_party -j4 + - name: Build C++ + run: make cc -j4 + - name: Build .Net + run: make dotnet -j4 + - name: Test + run: make test_dotnet -j4 + - name: Create nuget packages + run: make package_dotnet diff --git a/.github/workflows/make_windows_java.yml b/.github/workflows/make_windows_java.yml new file mode 100644 index 0000000000..db5be2b12b --- /dev/null +++ b/.github/workflows/make_windows_java.yml @@ -0,0 +1,31 @@ +name: Make Windows Java + +on: [push, pull_request] + +jobs: + # Building using the github runner environement directly. + make: + runs-on: windows-latest + steps: + - uses: actions/checkout@v2 + - name: Check make + run: make --version + - name: Install SWIG 4.0.2 + run: | + (New-Object System.Net.WebClient).DownloadFile("http://prdownloads.sourceforge.net/swig/swigwin-4.0.2.zip","swigwin-4.0.2.zip"); + Expand-Archive .\swigwin-4.0.2.zip .; + echo "$((Get-Item .).FullName)/swigwin-4.0.2" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append + - name: Check swig + run: swig -version + - name: Check java + run: java -version + - name: Build third party + run: make third_party -j4 + - name: Build C++ + run: make cc -j4 + - name: Build Java + run: make java -j4 + - name: Test + run: make test_java -j4 + - name: Create maven package + run: make package_java diff --git a/.github/workflows/make_windows_python.yml b/.github/workflows/make_windows_python.yml new file mode 100644 index 0000000000..39b40188fb --- /dev/null +++ b/.github/workflows/make_windows_python.yml @@ -0,0 +1,31 @@ +name: Make Windows Python + +on: [push, pull_request] + +jobs: + # Building using the github runner environement directly. + make: + runs-on: windows-latest + steps: + - uses: actions/checkout@v2 + - name: Check make + run: make --version + - name: Install SWIG 4.0.2 + run: | + (New-Object System.Net.WebClient).DownloadFile("http://prdownloads.sourceforge.net/swig/swigwin-4.0.2.zip","swigwin-4.0.2.zip"); + Expand-Archive .\swigwin-4.0.2.zip .; + echo "$((Get-Item .).FullName)/swigwin-4.0.2" | 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/Python39/Scripts" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append + - name: Build third party + run: make third_party -j4 + - name: Build C++ + run: make cc -j4 + - name: Build Python + run: make python -j4 + - name: Test + run: make test_python -j4 + - name: Create wheel package + run: make package_python diff --git a/makefiles/README.md b/makefiles/README.md index aa72289967..8bda4577c2 100644 --- a/makefiles/README.md +++ b/makefiles/README.md @@ -1,4 +1,36 @@ # OR-Tools Makefile Build Instructions +| OS | C++ | Python | Java | .NET | +|:-------- | :---: | :------: | :----: | :----: | +| Linux | [![Status][linux_cpp_svg]][linux_cpp_link] | [![Status][linux_python_svg]][linux_python_link] | [![Status][linux_java_svg]][linux_java_link] | [![Status][linux_dotnet_svg]][linux_dotnet_link] | +| MacOS | [![Status][macos_cpp_svg]][macos_cpp_link] | [![Status][macos_python_svg]][macos_python_link] | [![Status][macos_java_svg]][macos_java_link] | [![Status][macos_dotnet_svg]][macos_dotnet_link] | +| Windows | [![Status][windows_cpp_svg]][windows_cpp_link] | [![Status][windows_python_svg]][windows_python_link] | [![Status][windows_java_svg]][windows_java_link] | [![Status][windows_dotnet_svg]][windows_dotnet_link] | + +[linux_cpp_svg]: https://github.com/google/or-tools/actions/workflows/make_linux_cpp.yml/badge.svg?branch=master +[linux_cpp_link]: https://github.com/google/or-tools/actions/workflows/make_linux_cpp.yml +[linux_python_svg]: https://github.com/google/or-tools/actions/workflows/make_linux_python.yml/badge.svg?branch=master +[linux_python_link]: https://github.com/google/or-tools/actions/workflows/make_linux_python.yml +[linux_java_svg]: https://github.com/google/or-tools/actions/workflows/make_linux_java.yml/badge.svg?branch=master +[linux_java_link]: https://github.com/google/or-tools/actions/workflows/make_linux_java.yml +[linux_dotnet_svg]: https://github.com/google/or-tools/actions/workflows/make_linux_dotnet.yml/badge.svg?branch=master +[linux_dotnet_link]: https://github.com/google/or-tools/actions/workflows/make_linux_dotnet.yml + +[macos_cpp_svg]: https://github.com/google/or-tools/actions/workflows/make_macos_cpp.yml/badge.svg?branch=master +[macos_cpp_link]: https://github.com/google/or-tools/actions/workflows/make_macos_cpp.yml +[macos_python_svg]: https://github.com/google/or-tools/actions/workflows/make_macos_python.yml/badge.svg?branch=master +[macos_python_link]: https://github.com/google/or-tools/actions/workflows/make_macos_python.yml +[macos_java_svg]: https://github.com/google/or-tools/actions/workflows/make_macos_java.yml/badge.svg?branch=master +[macos_java_link]: https://github.com/google/or-tools/actions/workflows/make_macos_java.yml +[macos_dotnet_svg]: https://github.com/google/or-tools/actions/workflows/make_macos_dotnet.yml/badge.svg?branch=master +[macos_dotnet_link]: https://github.com/google/or-tools/actions/workflows/make_macos_dotnet.yml + +[windows_cpp_svg]: https://github.com/google/or-tools/actions/workflows/make_windows_cpp.yml/badge.svg?branch=master +[windows_cpp_link]: https://github.com/google/or-tools/actions/workflows/make_windows_cpp.yml +[windows_python_svg]: https://github.com/google/or-tools/actions/workflows/make_windows_python.yml/badge.svg?branch=master +[windows_python_link]: https://github.com/google/or-tools/actions/workflows/make_windows_python.yml +[windows_java_svg]: https://github.com/google/or-tools/actions/workflows/make_windows_java.yml/badge.svg?branch=master +[windows_java_link]: https://github.com/google/or-tools/actions/workflows/make_windows_java.yml +[windows_dotnet_svg]: https://github.com/google/or-tools/actions/workflows/make_windows_dotnet.yml/badge.svg?branch=master +[windows_dotnet_link]: https://github.com/google/or-tools/actions/workflows/make_windows_dotnet.yml Dockers [Alpine, Archlinux, Centos, Debian, Fedora, OpenSuse, Ubuntu]x[C++, Python, Java, .Net]: [![Status][docker_svg]][docker_link]