ci: Add github workflow for Makefile based build

This commit is contained in:
Corentin Le Molgat
2021-09-17 09:08:32 +02:00
parent de098cd136
commit 3781b8511d
13 changed files with 354 additions and 0 deletions

20
.github/workflows/make_linux_cpp.yml vendored Normal file
View File

@@ -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

28
.github/workflows/make_linux_dotnet.yml vendored Normal file
View File

@@ -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

28
.github/workflows/make_linux_java.yml vendored Normal file
View File

@@ -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

30
.github/workflows/make_linux_python.yml vendored Normal file
View File

@@ -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

19
.github/workflows/make_macos_cpp.yml vendored Normal file
View File

@@ -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

28
.github/workflows/make_macos_dotnet.yml vendored Normal file
View File

@@ -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

28
.github/workflows/make_macos_java.yml vendored Normal file
View File

@@ -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

28
.github/workflows/make_macos_python.yml vendored Normal file
View File

@@ -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

20
.github/workflows/make_windows_cpp.yml vendored Normal file
View File

@@ -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

View File

@@ -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

31
.github/workflows/make_windows_java.yml vendored Normal file
View File

@@ -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

View File

@@ -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

View File

@@ -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]