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 16, 2023
1 parent 40b213f commit f1f3c63
Show file tree
Hide file tree
Showing 23 changed files with 886 additions and 689 deletions.
128 changes: 73 additions & 55 deletions .github/workflows/amd64_cmake_glop_cpp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,64 +2,82 @@ name: amd64 CMake Glop C++

on: [push, pull_request, workflow_dispatch]

# Building using the github runner environement directly.
jobs:
docker:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build env image
run: make --directory=cmake glop_env
- name: Build devel image
run: make --directory=cmake glop_devel
- name: Build project
run: make --directory=cmake glop_build
- name: Test project
run: make --directory=cmake glop_test
- name: Build Install env image
run: make --directory=cmake glop_install_env
- name: Build Install devel image
run: make --directory=cmake glop_install_devel
- name: Build Install
run: make --directory=cmake glop_install_build
- name: Test Install
run: make --directory=cmake glop_install_test
- uses: actions/checkout@v4
- name: Build env image
run: make --directory=cmake glop_env
- name: Build devel image
run: make --directory=cmake glop_devel
- name: Build project
run: make --directory=cmake glop_build
- name: Test project
run: make --directory=cmake glop_test
- name: Build Install env image
run: make --directory=cmake glop_install_env
- name: Build Install devel image
run: make --directory=cmake glop_install_devel
- name: Build Install
run: make --directory=cmake glop_install_build
- name: Test Install
run: make --directory=cmake glop_install_test

linux:
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=OFF -DBUILD_GLOP=ON
- name: Build
run: cmake --build build --config Release --target all -v
- name: Install
run: cmake --build build --config Release --target install -v -- DESTDIR=install

macos:
runs-on: macos-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=OFF -DBUILD_GLOP=ON
- name: Build
run: cmake --build build --target all -v
- name: Install
run: cmake --build build --target install -v -- DESTDIR=install

windows:
runs-on: windows-latest
# ref: https://github.com/actions/runner-images
native:
strategy:
matrix:
cmake: [
{
runner: "ubuntu-latest",
generator: "Unix Makefiles",
config: Release,
build_target: all,
test_target: test,
install_target: install
},
{
runner: "macos-latest",
generator: "Xcode",
config: Release,
build_target: ALL_BUILD,
test_target: RUN_TESTS,
install_target: install
},
{
runner: "windows-latest",
generator: "Visual Studio 17 2022",
config: Release,
build_target: ALL_BUILD,
test_target: RUN_TESTS,
install_target: INSTALL
},
]
fail-fast: false
name: ${{ matrix.cmake.runner }} • CMake • Glop
runs-on: ${{ matrix.cmake.runner }}
steps:
- uses: actions/checkout@v4
- name: Check cmake
run: cmake --version
- name: Configure
run: cmake -S. -Bbuild -G "Visual Studio 17 2022" -DCMAKE_BUILD_TYPE=Release -DBUILD_DEPS=ON -DBUILD_CXX=OFF -DBUILD_GLOP=ON
- name: Build
run: cmake --build build --config Release --target ALL_BUILD -- /maxcpucount
- name: Install
run: cmake --build build --config Release --target INSTALL -- /maxcpucount
- uses: actions/checkout@v4
- name: Check cmake
run: cmake --version
- name: Configure
run: >
cmake -S. -Bbuild
-G "${{ matrix.cmake.generator }}"
-DCMAKE_BUILD_TYPE=${{ matrix.cmake.config }}
-DBUILD_DEPS=ON
-DBUILD_CXX=OFF -DBUILD_GLOP=ON
-DCMAKE_INSTALL_PREFIX=install
- name: Build
run: >
cmake --build build
--config ${{ matrix.cmake.config }}
--target ${{ matrix.cmake.build_target }}
-v -j
- name: Install
run: >
cmake --build build
--config ${{ matrix.cmake.config }}
--target ${{ matrix.cmake.install_target }}
-v -j
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/...
Loading

0 comments on commit f1f3c63

Please sign in to comment.