Skip to content

Commit

Permalink
ci: workflow cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
Mizux committed Oct 13, 2023
1 parent 80e30db commit 743ee5f
Show file tree
Hide file tree
Showing 15 changed files with 475 additions and 431 deletions.
18 changes: 9 additions & 9 deletions .github/workflows/amd64_docker_bazel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
31 changes: 15 additions & 16 deletions .github/workflows/amd64_freebsd_cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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 }}
26 changes: 15 additions & 11 deletions .github/workflows/amd64_linux_bazel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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/...
110 changes: 40 additions & 70 deletions .github/workflows/amd64_linux_cmake_coinor_off.yml
Original file line number Diff line number Diff line change
@@ -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:
native:
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 -j
- 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 -j
- name: Install
run: cmake --build build --config Release --target install -v -- DESTDIR=install
run: >
cmake --build build
--config Release
--target install
-v -j
-- DESTDIR=install
67 changes: 42 additions & 25 deletions .github/workflows/amd64_linux_cmake_cpp.yml
Original file line number Diff line number Diff line change
@@ -1,35 +1,52 @@
# ref: https://github.com/actions/runner-images
name: amd64 Linux CMake C++

on: [push, pull_request, workflow_dispatch]

# Building using the github runner environement directly.
jobs:
# Building using the github runner environement directly.
linux:
runs-on: ubuntu-latest
native:
strategy:
matrix:
build: [
["Unix Makefiles", "Release"],
["Ninja", "Release"],
["Ninja Multi-Config", "Release"]
cmake: [
{generator: "Unix Makefiles", config: "Release"},
{generator: "Ninja", config: "Release"},
{generator: "Ninja Multi-Config", config: "Release"},
]
fail-fast: false
env:
GENERATOR: ${{ matrix.build[0] }}
BUILD_TYPE: ${{ matrix.build[1] }}
name: Linux • ${{ matrix.cmake.generator }} • C++
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Ninja
run: |
sudo apt-get update
sudo apt-get install ninja-build
- name: Check cmake
run: cmake --version
- name: Configure
run: cmake -S. -Bbuild -G "$GENERATOR" -DCMAKE_BUILD_TYPE="$BUILD_TYPE" -DBUILD_DEPS=ON -DCMAKE_INSTALL_PREFIX=install
- name: Build
run: cmake --build build --config "$BUILD_TYPE" --target all -v
- name: Test
run: CTEST_OUTPUT_ON_FAILURE=1 cmake --build build --config "$BUILD_TYPE" --target test -v
- name: Install
run: cmake --build build --config "$BUILD_TYPE" --target install -v
- uses: actions/checkout@v4
- name: Install Ninja
run: |
sudo apt-get update
sudo apt-get install ninja-build
- name: Check cmake
run: cmake --version
- name: Configure
run: >
cmake -S. -Bbuild
-G "$GENERATOR"
-DCMAKE_BUILD_TYPE="$BUILD_TYPE"
-DBUILD_DEPS=ON
-DCMAKE_INSTALL_PREFIX=install
- name: Build
run: >
cmake --build build
--config "$BUILD_TYPE"
--target all
-v -j
- name: Test
run: >
CTEST_OUTPUT_ON_FAILURE=1
cmake --build build
--config "$BUILD_TYPE"
--target test
-v -j
- name: Install
run: >
cmake --build build
--config "$BUILD_TYPE"
--target install
-v -j
Loading

0 comments on commit 743ee5f

Please sign in to comment.