Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
ngrodzitski committed Nov 7, 2023
1 parent ab9e5ff commit 31232fd
Showing 1 changed file with 161 additions and 148 deletions.
309 changes: 161 additions & 148 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,116 +9,123 @@ on:
pull_request:

jobs:
Build-Windows:
# The type of runner that the job will run on
name: ${{ matrix.config.name }} (${{ matrix.build_type }}, ${{ matrix.config.cxx }}, C++${{ matrix.cppstd }})
runs-on: ${{ matrix.config.os }}
strategy:
fail-fast: false
matrix:
config:
- name: "Windows Latest MSVC"
# https://github.com/actions/runner-images/blob/main/images/win/Windows2022-Readme.md
os: windows-latest
cc: "cl"
cxx: "cl"
generator: "Visual Studio 17 2022"
build_type:
- Release
- Debug
cppstd:
- 17
- 20
env:
CXX: ${{ matrix.config.cxx }}
RESTINIO_BUILD_DIR: _build_${{ matrix.config.cxx }}_cppstd${{ matrix.cppstd }}_${{ matrix.build_type }}

steps:
- uses: actions/checkout@v3

- name: Print env
run: |
echo github.event.action: ${{ github.event.action }}
echo github.event_name: ${{ github.event_name }}
- name: Install dependencies
run: |
gem install Mxx_ru
- name: Configure
shell: bash
run: |
mxxruexternals
cd dev
cmake \
-B $RESTINIO_BUILD_DIR \
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \
-DRESTINIO_EXPLICIT_CPPSTD=${{ matrix.cppstd }} \
-DRESTINIO_TEST_SUFFIX=" [cpp${{ matrix.cppstd }}_${{ matrix.build_type }}]" \
-G "${{ matrix.config.generator }}"
- name: Build
working-directory: ./dev
shell: bash
run: |
cmake \
--build $RESTINIO_BUILD_DIR \
--config ${{ matrix.build_type }} \
--verbose
- name: Test
shell: bash
working-directory: ./dev
run: |
ctest \
-T test \
-C ${{ matrix.build_type }} \
--test-dir $RESTINIO_BUILD_DIR \
--output-on-failure \
--no-compress-output
# Build-Windows:
# # The type of runner that the job will run on
# name: ${{ matrix.config.name }} (${{ matrix.build_type }}, ${{ matrix.config.cxx }}, C++${{ matrix.cppstd }})
# runs-on: ${{ matrix.config.os }}
# strategy:
# fail-fast: false
# matrix:
# config:
# - name: "Windows Latest MSVC"
# # https://github.com/actions/runner-images/blob/main/images/win/Windows2022-Readme.md
# os: windows-latest
# cc: "cl"
# cxx: "cl"
# generator: "Visual Studio 17 2022"
# build_type:
# - Release
# - Debug
# cppstd:
# - 17
# - 20
# env:
# CXX: ${{ matrix.config.cxx }}
# RESTINIO_BUILD_DIR: _build_${{ matrix.config.cxx }}_cppstd${{ matrix.cppstd }}_${{ matrix.build_type }}

# steps:
# - uses: actions/checkout@v3

# - name: Print env
# run: |
# echo github.event.action: ${{ github.event.action }}
# echo github.event_name: ${{ github.event_name }}

# - name: Install dependencies
# run: |
# gem install Mxx_ru

# - name: Configure
# shell: bash
# run: |
# mxxruexternals
# cd dev
# cmake \
# -B $RESTINIO_BUILD_DIR \
# -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \
# -DRESTINIO_EXPLICIT_CPPSTD=${{ matrix.cppstd }} \
# -DRESTINIO_TEST_SUFFIX=" [cpp${{ matrix.cppstd }}_${{ matrix.build_type }}]" \
# -G "${{ matrix.config.generator }}"
# - name: Build
# working-directory: ./dev
# shell: bash
# run: |
# cmake \
# --build $RESTINIO_BUILD_DIR \
# --config ${{ matrix.build_type }} \
# --verbose
# - name: Test
# shell: bash
# working-directory: ./dev
# run: |
# ctest \
# -T test \
# -C ${{ matrix.build_type }} \
# --test-dir $RESTINIO_BUILD_DIR \
# --output-on-failure \
# --no-compress-output

Build-Linux:
# The type of runner that the job will run on
name: Ubuntu-22.04 (${{ matrix.compiler.cname }}, ${{ matrix.build_type }}, C++${{ matrix.compiler.cppstd }})
name: Ubuntu-22.04 (${{ matrix.build_settings.cname }}, ${{ matrix.build_type }}, C++${{ matrix.build_settings.cppstd }}, {{matrix.build_settings.asio_source}} asio)
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
compiler:
build_settings:
- cname: gcc-9
cxxname: g++-9
ar: gcc-ar-9
cppstd: 17
asio_source: standalone

- cname: gcc-12
cxxname: g++-12
ar: gcc-ar-12
cppstd: 17
- cname: gcc-12
cxxname: g++-12
ar: gcc-ar-12
cppstd: 20

- cname: clang-13
cxxname: clang++-13
ar: llvm-ar-13
cppstd: 17

- cname: clang-15
cxxname: clang++-15
ar: llvm-ar-15
- cname: gcc-9
cxxname: g++-9
ar: gcc-ar-9
cppstd: 17
- cname: clang-15
cxxname: clang++-15
ar: llvm-ar-15
cppstd: 20
asio_source: boost

# - cname: gcc-12
# cxxname: g++-12
# ar: gcc-ar-12
# cppstd: 17
# - cname: gcc-12
# cxxname: g++-12
# ar: gcc-ar-12
# cppstd: 20

# - cname: clang-13
# cxxname: clang++-13
# ar: llvm-ar-13
# cppstd: 17

# - cname: clang-15
# cxxname: clang++-15
# ar: llvm-ar-15
# cppstd: 17
# - cname: clang-15
# cxxname: clang++-15
# ar: llvm-ar-15
# cppstd: 20

build_type:
- Release
- Debug
# - Debug
env:
CC: ${{ matrix.compiler.cname }}
CXX: ${{ matrix.compiler.cxxname }}
AR: ${{ matrix.compiler.ar }}
RESTINIO_BUILD_DIR: _build_${{ matrix.compiler.cname }}_cpp${{ matrix.compiler.cppstd }}_${{ matrix.build_type }}
CC: ${{ matrix.build_settings.cname }}
CXX: ${{ matrix.build_settings.cxxname }}
AR: ${{ matrix.build_settings.ar }}
RESTINIO_BUILD_DIR: _build_${{ matrix.build_settings.cname }}_cpp${{ matrix.build_settings.cppstd }}_${{ matrix.build_type }}_{{matrix.build_settings.asio_source}}_asio
steps:
- uses: actions/checkout@v3

Expand All @@ -131,60 +138,10 @@ jobs:
run: |
sudo gem install Mxx_ru
- name: Configure
shell: bash
run: |
mxxruexternals
cd dev
cmake \
-B ${RESTINIO_BUILD_DIR} \
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \
-DRESTINIO_EXPLICIT_CPPSTD=${{ matrix.compiler.cppstd }} \
-DRESTINIO_TEST_SUFFIX=" [${{ matrix.compiler.cname }}_cpp${{ matrix.compiler.cppstd }}_${{ matrix.build_type }}]"
- name: Build
working-directory: ./dev
shell: bash
run: |
cmake \
--build $RESTINIO_BUILD_DIR \
--verbose
- name: Test
shell: bash
working-directory: ./dev
run: |
ctest \
-T test \
--test-dir $RESTINIO_BUILD_DIR \
--output-on-failure \
--no-compress-output
Build-Macos:
# The type of runner that the job will run on
name: macos-12 (${{ matrix.build_type }}, C++${{ matrix.cppstd }})
runs-on: macos-12
strategy:
fail-fast: false
matrix:
cppstd:
- 17
- 20
build_type:
- Release
- Debug
env:
RESTINIO_BUILD_DIR: _build_cpp${{ matrix.cppstd }}_${{ matrix.build_type }}
steps:
- uses: actions/checkout@v3

- name: Print env
- name: Install Boost
if: ${{ matrix.build_settings.asio_source == 'boost' }}
run: |
echo github.event.action: ${{ github.event.action }}
echo github.event_name: ${{ github.event_name }}
- name: Install dependencies
run: |
gem install Mxx_ru
sudo apt-get update && sudo apt-get install -y libboost-all-dev
- name: Configure
shell: bash
Expand All @@ -194,8 +151,9 @@ jobs:
cmake \
-B ${RESTINIO_BUILD_DIR} \
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \
-DRESTINIO_EXPLICIT_CPPSTD=${{ matrix.cppstd }} \
-DRESTINIO_TEST_SUFFIX=" [cpp${{ matrix.cppstd }}_${{ matrix.build_type }}]"
-DRESTINIO_EXPLICIT_CPPSTD=${{ matrix.build_settings.cppstd }} \
-DRESTINIO_ASIO_SOURCE=${{matrix.build_settings.asio_source}} \
-DRESTINIO_TEST_SUFFIX=" [${{ matrix.build_settings.cname }}_cpp${{ matrix.build_settings.cppstd }}_${{ matrix.build_type }}]"
- name: Build
working-directory: ./dev
shell: bash
Expand All @@ -212,3 +170,58 @@ jobs:
--test-dir $RESTINIO_BUILD_DIR \
--output-on-failure \
--no-compress-output
# Build-Macos:
# # The type of runner that the job will run on
# name: macos-12 (${{ matrix.build_type }}, C++${{ matrix.cppstd }})
# runs-on: macos-12
# strategy:
# fail-fast: false
# matrix:
# cppstd:
# - 17
# - 20
# build_type:
# - Release
# - Debug
# env:
# RESTINIO_BUILD_DIR: _build_cpp${{ matrix.cppstd }}_${{ matrix.build_type }}
# steps:
# - uses: actions/checkout@v3

# - name: Print env
# run: |
# echo github.event.action: ${{ github.event.action }}
# echo github.event_name: ${{ github.event_name }}

# - name: Install dependencies
# run: |
# gem install Mxx_ru

# - name: Configure
# shell: bash
# run: |
# mxxruexternals
# cd dev
# cmake \
# -B ${RESTINIO_BUILD_DIR} \
# -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \
# -DRESTINIO_EXPLICIT_CPPSTD=${{ matrix.cppstd }} \
# -DRESTINIO_TEST_SUFFIX=" [cpp${{ matrix.cppstd }}_${{ matrix.build_type }}]"
# - name: Build
# working-directory: ./dev
# shell: bash
# run: |
# cmake \
# --build $RESTINIO_BUILD_DIR \
# --verbose
# - name: Test
# shell: bash
# working-directory: ./dev
# run: |
# ctest \
# -T test \
# --test-dir $RESTINIO_BUILD_DIR \
# --output-on-failure \
# --no-compress-output

0 comments on commit 31232fd

Please sign in to comment.