Skip to content

Commit

Permalink
[YJ] knitro branch sqaush
Browse files Browse the repository at this point in the history
  • Loading branch information
yoannjanvier committed Oct 18, 2024
1 parent 3ed2b2d commit a095a4b
Show file tree
Hide file tree
Showing 1,350 changed files with 59,508 additions and 24,976 deletions.
4 changes: 4 additions & 0 deletions .bazelignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,7 @@ install_make
build_cross
dependencies/install
dependencies/sources
temp_cpp
temp_dotnet
temp_java
temp_python
15 changes: 12 additions & 3 deletions .bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ build --apple_platform_type=macos
build --enable_platform_specific_config

build:linux --cxxopt="-std=c++17" --cxxopt=-Wno-sign-compare --host_cxxopt="-std=c++17" --host_cxxopt=-Wno-sign-compare
build:macos --cxxopt="-std=c++17" --cxxopt=-Wno-sign-compare --cxxopt=-mmacos-version-min=10.15 --features=-supports_dynamic_linker
build:macos --host_cxxopt="-std=c++17" --host_cxxopt=-Wno-sign-compare --host_cxxopt=-mmacos-version-min=10.15
build:macos --cxxopt="-std=c++17" --cxxopt=-Wno-sign-compare --cxxopt=-mmacos-version-min=10.15 --cxxopt=-Wno-dangling-field --features=-supports_dynamic_linker
build:macos --host_cxxopt="-std=c++17" --host_cxxopt=-Wno-sign-compare --host_cxxopt=-mmacos-version-min=10.15 --host_cxxopt=-Wno-dangling-field
build:windows --cxxopt="/std:c++20" --host_cxxopt="/std:c++20"

# Enable the runfiles symlink tree on Windows. This makes it possible to build
Expand All @@ -37,7 +37,16 @@ build:windows --enable_runfiles
# build --subcommands=pretty_print

# Print test logs for failed tests.
test --test_output=errors
test --test_output=errors --test_timeout_filters=-eternal

# Put user-specific options in .bazelrc.user
try-import %workspace%/.bazelrc.user

# asan
build:asan --strip=never
build:asan --copt -fsanitize=address
build:asan --copt -DADDRESS_SANITIZER
build:asan --copt -O1
build:asan --copt -g
build:asan --copt -fno-omit-frame-pointer
build:asan --linkopt -fsanitize=address
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# ref: https://toolchains.bootlin.com/
name: aarch64 Toolchain

on: [push, pull_request, workflow_dispatch]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,15 @@ jobs:
install_target: install
},
{
runner: "macos-latest",
runner: "macos-13", # last macos intel based runner
generator: "Xcode",
config: Release,
build_target: ALL_BUILD,
test_target: RUN_TESTS,
install_target: install
},
{
runner: "macos-latest", # macos arm64 based runner
generator: "Xcode",
config: Release,
build_target: ALL_BUILD,
Expand Down
37 changes: 37 additions & 0 deletions .github/not_used/amd64_docker_bazel.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# ref: https://github.com/docker-library/official-images
name: amd64 Docker Bazel

on: [push, pull_request, workflow_dispatch]

jobs:
bazel:
strategy:
matrix:
platform: [amd64] # arm64 riscv64
distro: [
almalinux,
# alpine,
archlinux,
debian,
fedora,
opensuse,
rockylinux,
ubuntu
]
fail-fast: false
name: ${{ matrix.platform }} • ${{ matrix.distro }} • Bazel
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Check docker
run: |
docker info
docker buildx ls
- name: Build env image
run: make --directory=bazel ${{ matrix.platform }}_${{ matrix.distro }}_env
- name: Build devel image
run: make --directory=bazel ${{ matrix.platform }}_${{ matrix.distro }}_devel
- name: Build project
run: make --directory=bazel ${{ matrix.platform }}_${{ matrix.distro }}_build
- name: Test project
run: make --directory=bazel ${{ matrix.platform }}_${{ matrix.distro }}_test
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# ref: https://github.com/actions/runner-images
# ref: https://github.com/docker-library/official-images
name: amd64 Docker CMake

on: [push, pull_request, workflow_dispatch]
Expand All @@ -7,7 +7,7 @@ jobs:
cmake:
strategy:
matrix:
distro: [alpine, archlinux, centos, debian, fedora, opensuse, ubuntu]
distro: [almalinux, alpine, archlinux, debian, fedora, opensuse, rockylinux, ubuntu]
lang: [cpp, python, dotnet, java]
fail-fast: false
name: ${{ matrix.distro }} • CMake • ${{ matrix.lang }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: amd64 FreeBSD CMake

on: [push, pull_request, workflow_dispatch]

# Only macos runner provide virtualisation with vagrant/virtualbox installed.
# Only macos-12 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:
Expand All @@ -21,7 +21,7 @@ jobs:
lang: java
allow_failure: true
name: FreeBSD • CMake • ${{ matrix.lang }}
runs-on: macos-latest
runs-on: macos-12
steps:
- uses: actions/checkout@v4
- name: vagrant version
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ jobs:
- uses: actions/checkout@v4
- name: Check Java
run: java -version
- name: Check mvn
run: mvn --version
- name: Setup Python
uses: actions/setup-python@v4
with:
Expand All @@ -39,6 +41,12 @@ jobs:
sudo apt-get install bazel
- name: Check Bazel
run: bazel version
- name: Change Python in WORKSPACE
run: >
sed
-i
's/\(DEFAULT_PYTHON =\) "3.[0-9]\+"/\1 "${{ matrix.python.version }}"/g'
WORKSPACE
- name: Build
run: >
bazel build
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
run: swig -version
# Install .NET SDKs
- name: Setup .NET 6.0
uses: actions/setup-dotnet@v1
uses: actions/setup-dotnet@v4
with:
dotnet-version: 6.0.x
- name: Check dotnet
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
sudo apt install -y swig
swig -version
- name: Setup .NET 6.0
uses: actions/setup-dotnet@v1
uses: actions/setup-dotnet@v4
with:
dotnet-version: 6.0.x
- name: Check dotnet
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
run: swig -version
# Install .NET SDKs
- name: Setup .NET 6.0
uses: actions/setup-dotnet@v1
uses: actions/setup-dotnet@v4
with:
dotnet-version: 6.0.x
- name: Check dotnet
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
]
fail-fast: false
name: MacOS • Bazel • Python-${{ matrix.python.version }}
runs-on: macos-latest
runs-on: macos-13 # last macos intel based runner
steps:
- uses: actions/checkout@v4
- name: Set Java to OpenJDK 17 (Temurin)
Expand All @@ -32,13 +32,14 @@ jobs:
python-version: ${{ matrix.python.version }}
- name: Check Python
run: python --version
- name: Install Bazel
run: |
brew update
brew unlink bazelisk
brew install bazel
- name: Check Bazel
run: bazel version
- name: Change Python in WORKSPACE
run: >
sed
-i ''
-e 's/\(DEFAULT_PYTHON =\) "3.[0-9]*"/\1 "${{ matrix.python.version }}"/g'
WORKSPACE
- name: Build
run: >
bazel build
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
]
fail-fast: false
name: MacOS • ${{ matrix.cmake.generator }} • C++
runs-on: macos-latest
runs-on: macos-13 # last macos intel based runner
steps:
- uses: actions/checkout@v4
- name: Check cmake
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@ jobs:
]
fail-fast: false
name: MacOS • ${{ matrix.cmake.generator }} • .Net
runs-on: macos-latest
runs-on: macos-13 # last macos intel based runner
steps:
- uses: actions/checkout@v4
- name: Swig install
run: |
brew install swig
swig -version
- name: Setup .NET 6.0
uses: actions/setup-dotnet@v1
uses: actions/setup-dotnet@v4
with:
dotnet-version: 6.0.x
- name: Check dotnet
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
]
fail-fast: false
name: MacOS • ${{ matrix.cmake.generator }} • Java
runs-on: macos-latest
runs-on: macos-13 # last macos intel based runner
steps:
- uses: actions/checkout@v4
- name: Swig install
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
]
fail-fast: false
name: MacOS • ${{ matrix.cmake.generator }} • Python-${{ matrix.python.version }}
runs-on: macos-latest
runs-on: macos-13 # last macos intel based runner
steps:
- uses: actions/checkout@v4
- name: Swig install
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,12 @@ jobs:
fail-fast: false
name: Windows • ${{ matrix.cmake.generator }} • .Net
runs-on: windows-latest
env:
CTEST_OUTPUT_ON_FAILURE: 1
steps:
- uses: actions/checkout@v4
- 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: Setup .NET 6.0
uses: actions/setup-dotnet@v1
uses: actions/setup-dotnet@v4
with:
dotnet-version: 6.0.x
- name: Check dotnet
Expand Down
75 changes: 75 additions & 0 deletions .github/not_used/amd64_windows_cmake_java.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
# ref: https://github.com/actions/runner-images
name: amd64 Windows CMake Java

on: [push, pull_request, workflow_dispatch]

# Building using the github runner environement directly.
jobs:
native:
strategy:
matrix:
cmake: [
{generator: "Visual Studio 17 2022", config: Release, build_target: ALL_BUILD, test_target: RUN_TESTS, install_target: INSTALL},
]
java: [
# see https://endoflife.date/azul-zulu
{distrib: 'zulu', version: '8'}, # 2030/12
{distrib: 'zulu', version: '11'}, # 2026/09
{distrib: 'zulu', version: '17'}, # 2029/09
{distrib: 'zulu', version: '21'}, # 2031/09
# see https://endoflife.date/eclipse-temurin
{distrib: 'temurin', version: '8'}, # 2026/11
{distrib: 'temurin', version: '11'}, # 2027/10
{distrib: 'temurin', version: '17'}, # 2027/10
{distrib: 'temurin', version: '21'}, # 2029/12
# see https://endoflife.date/microsoft-build-of-openjdk
{distrib: 'microsoft', version: '11'}, # 2027/09
{distrib: 'microsoft', version: '17'}, # 2027/09
{distrib: 'microsoft', version: '21'}, # 2028/09
]
fail-fast: false
name: Windows • ${{ matrix.cmake.generator }} • ${{ matrix.java.distrib }}-${{ matrix.java.version }}
runs-on: windows-latest
env:
CTEST_OUTPUT_ON_FAILURE: 1
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: ${{ matrix.java.distrib }}
java-version: ${{ matrix.java.version }}
- name: Update maven
run: |
choco upgrade maven
echo "C:\ProgramData\chocolatey\lib\maven\apache-maven-3.9.9\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
- name: Check java
run: |
java -version
mvn --version
- name: Check cmake
run: cmake --version
- name: Configure
run: >
cmake -S. -Bbuild
-G "${{ matrix.cmake.generator }}"
-DCMAKE_BUILD_TYPE=${{ matrix.cmake.config }}
-DBUILD_CXX_SAMPLES=OFF -DBUILD_CXX_EXAMPLES=OFF
-DBUILD_JAVA=ON
- name: Build
run: >
cmake --build build
--config ${{ matrix.cmake.config }}
--target ${{ matrix.cmake.build_target }}
-v -j2
- name: Test
run: >
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
Original file line number Diff line number Diff line change
Expand Up @@ -20,20 +20,15 @@ jobs:
fail-fast: false
name: Windows • ${{ matrix.cmake.generator }} • Python-${{ matrix.python.version }}
runs-on: windows-latest
env:
CTEST_OUTPUT_ON_FAILURE: 1
steps:
- 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" |
Expand Down
Loading

0 comments on commit a095a4b

Please sign in to comment.