Skip to content

Commit

Permalink
ci: Added C++23 builds to the CI matrix
Browse files Browse the repository at this point in the history
  • Loading branch information
mpusz committed Oct 17, 2023
1 parent 1230eb6 commit e89861c
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 47 deletions.
44 changes: 20 additions & 24 deletions .github/workflows/ci-conan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,105 +35,100 @@ env:

jobs:
build:
name: ${{ matrix.config.name }} ${{ matrix.build_type }}
name: "C++${{ matrix.std }} ${{ matrix.config.name }} ${{ matrix.build_type }}"
runs-on: ${{ matrix.config.os }}
strategy:
fail-fast: false
matrix:
config:
# - {
# name: "Windows MSVC 14.2",
# name: "MSVC 14.2",
# os: windows-2019,
# compiler: { type: VISUAL, version: 16, cc: "", cxx: "", std: 20 },
# compiler: { type: VISUAL, version: 16, cc: "", cxx: "" },
# conan-config: "-c user.build:skip_la=True",
# }
# - {
# name: "Windows MSVC 14.3",
# name: "MSVC 14.3",
# os: windows-2022,
# compiler: { type: MSVC, version: 193, cc: "", cxx: "", std: 23 },
# compiler: { type: MSVC, version: 193, cc: "", cxx: "" },
# conan-config: "",
# }
- {
name: "Ubuntu GCC-11",
name: "GCC-11",
os: ubuntu-22.04,
compiler:
{
type: GCC,
version: 11,
cc: "gcc-11",
cxx: "g++-11",
std: 20,
},
conan-config: "",
}
- {
name: "Ubuntu GCC-12",
name: "GCC-12",
os: ubuntu-22.04,
compiler:
{
type: GCC,
version: 12,
cc: "gcc-12",
cxx: "g++-12",
std: 20,
},
conan-config: "",
}
- {
name: "Ubuntu GCC-13",
name: "GCC-13",
os: ubuntu-22.04,
compiler:
{
type: GCC,
version: 13,
cc: "gcc-13",
cxx: "g++-13",
std: 20,
},
conan-config: "",
}
- {
name: "Ubuntu Clang-16 + libc++",
name: "Clang-16",
os: ubuntu-22.04,
compiler:
{
type: CLANG,
version: 16,
cc: "clang-16",
cxx: "clang++-16",
std: 20,
},
lib: "libc++",
conan-config: "",
}
- {
name: "Ubuntu Clang-17 + libc++",
name: "Clang-17",
os: ubuntu-22.04,
compiler:
{
type: CLANG,
version: 17,
cc: "clang-17",
cxx: "clang++-17",
std: 20,
},
lib: "libc++",
conan-config: "",
}
# - {
# name: "MacOS Apple Clang 13",
# name: "Apple Clang 13",
# os: macos-11,
# compiler:
# {
# type: APPLE_CLANG,
# version: "13.0",
# cc: "clang",
# cxx: "clang++",
# std: 20,
# },
# conan-config: "",
# }
build_type: ["Release", "Debug"]
std: [20, 23]

env:
CC: ${{ matrix.config.compiler.cc }}
Expand All @@ -147,17 +142,18 @@ jobs:
cache-name: cache-conan-data
with:
path: ~/.conan2/p
key: build-${{ matrix.config.os }}-${{ matrix.build_type }}-${{ matrix.config.compiler.type }}-${{ matrix.config.compiler.version }}-${{ matrix.config.lib }}
key: build-${{ matrix.config.os }}-${{ matrix.config.compiler.type }}-${{ matrix.config.lib }}-${{ matrix.build_type }}-${{ matrix.config.compiler.version }}-${{ matrix.std }}
restore-keys: |
build-${{ matrix.config.os }}-${{ matrix.build_type }}-${{ matrix.config.compiler.type }}-${{ matrix.config.compiler.version }}-${{ matrix.config.lib }}
build-${{ matrix.config.os }}-${{ matrix.build_type }}-${{ matrix.config.compiler.type }}-${{ matrix.config.compiler.version }}-
build-${{ matrix.config.os }}-${{ matrix.build_type }}-${{ matrix.config.compiler.type }}-
build-${{ matrix.config.os }}-${{ matrix.build_type }}-
build-${{ matrix.config.os }}-${{ matrix.config.compiler.type }}-${{ matrix.config.lib }}-${{ matrix.build_type }}-${{ matrix.config.compiler.version }}-${{ matrix.std }}
build-${{ matrix.config.os }}-${{ matrix.config.compiler.type }}-${{ matrix.config.lib }}-${{ matrix.build_type }}-${{ matrix.config.compiler.version }}-
build-${{ matrix.config.os }}-${{ matrix.config.compiler.type }}-${{ matrix.config.lib }}-${{ matrix.build_type }}-
build-${{ matrix.config.os }}-${{ matrix.config.compiler.type }}-${{ matrix.config.lib }}-
build-${{ matrix.config.os }}-${{ matrix.config.compiler.type }}-
build-${{ matrix.config.os }}-
- uses: hendrikmuhs/ccache-action@v1.2
if: runner.os == 'Linux'
with:
key: ${{ matrix.config.os }}-${{ matrix.config.compiler.type }}-${{ matrix.config.compiler.version }}-${{ matrix.config.lib }}-${{ matrix.build_type }}
key: ${{ matrix.config.os }}-${{ matrix.config.compiler.type }}-${{ matrix.config.lib }}-${{ matrix.build_type }}-${{ matrix.config.compiler.version }}-${{ matrix.std }}
max-size: 50M
- name: Install gcc-13
if: matrix.config.compiler.type == 'GCC' && matrix.config.compiler.version == '13'
Expand Down Expand Up @@ -212,7 +208,7 @@ jobs:
if [[ "${{ matrix.config.compiler.type }}" == "CLANG" ]]; then
sed -i.backup '/^\[settings\]$/,/^\[/ s/^compiler.libcxx=.*/compiler.libcxx=${{ matrix.config.lib }}/' ~/.conan2/profiles/default
fi
sed -i.backup '/^\[settings\]$/,/^\[/ s/^compiler.cppstd=.*/compiler.cppstd=${{ matrix.config.compiler.std }}/' ~/.conan2/profiles/default
sed -i.backup '/^\[settings\]$/,/^\[/ s/^compiler.cppstd=.*/compiler.cppstd=${{ matrix.std }}/' ~/.conan2/profiles/default
sed -i.backup '/^\[settings\]$/,/^\[/ s/^build_type=.*/build_type=${{ matrix.build_type }}/' ~/.conan2/profiles/default
conan profile show -pr default
- name: Create Conan package
Expand Down
42 changes: 19 additions & 23 deletions .github/workflows/ci-test-package-cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,98 +36,93 @@ on:

jobs:
test_package:
name: ${{ matrix.config.name }} ${{ matrix.build_type }}
name: "C++${{ matrix.std }} ${{ matrix.config.name }} ${{ matrix.build_type }}"
runs-on: ${{ matrix.config.os }}
strategy:
fail-fast: false
matrix:
config:
# - {
# name: "Windows MSVC 14.2",
# name: "MSVC 14.2",
# os: windows-2019,
# compiler: { type: VISUAL, version: 16, cc: "", cxx: "", std: 20 },
# compiler: { type: VISUAL, version: 16, cc: "", cxx: "" },
# }
# - {
# name: "Windows MSVC 14.3",
# name: "MSVC 14.3",
# os: windows-2022,
# compiler: { type: MSVC, version: 193, cc: "", cxx: "", std: 23 },
# compiler: { type: MSVC, version: 193, cc: "", cxx: "" },
# }
- {
name: "Ubuntu GCC-11",
name: "GCC-11",
os: ubuntu-22.04,
compiler:
{
type: GCC,
version: 11,
cc: "gcc-11",
cxx: "g++-11",
std: 20,
},
}
- {
name: "Ubuntu GCC-12",
name: "GCC-12",
os: ubuntu-22.04,
compiler:
{
type: GCC,
version: 12,
cc: "gcc-12",
cxx: "g++-12",
std: 20,
},
}
- {
name: "Ubuntu GCC-13",
name: "GCC-13",
os: ubuntu-22.04,
compiler:
{
type: GCC,
version: 13,
cc: "gcc-13",
cxx: "g++-13",
std: 20,
},
}
- {
name: "Ubuntu Clang-16 + libc++",
name: "Clang-16",
os: ubuntu-22.04,
compiler:
{
type: CLANG,
version: 16,
cc: "clang-16",
cxx: "clang++-16",
std: 20,
},
lib: "libc++",
}
- {
name: "Ubuntu Clang-17 + libc++",
name: "Clang-17",
os: ubuntu-22.04,
compiler:
{
type: CLANG,
version: 17,
cc: "clang-17",
cxx: "clang++-17",
std: 20,
},
lib: "libc++",
conan-config: "",
}
# - {
# name: "MacOS Apple Clang 13",
# name: "Apple Clang 13",
# os: macos-11,
# compiler:
# {
# type: APPLE_CLANG,
# version: "13.0",
# cc: "clang",
# cxx: "clang++",
# std: 20,
# },
# }
build_type: ["Release", "Debug"]
std: [20, 23]

env:
CC: ${{ matrix.config.compiler.cc }}
Expand All @@ -146,12 +141,13 @@ jobs:
cache-name: cache-conan-data
with:
path: ~/.conan2/p
key: build-${{ matrix.config.os }}-${{ matrix.build_type }}-${{ matrix.config.compiler.type }}-${{ matrix.config.compiler.version }}-${{ matrix.config.lib }}
key: build-${{ matrix.config.os }}-${{ matrix.config.compiler.type }}-${{ matrix.config.lib }}-${{ matrix.build_type }}-${{ matrix.config.compiler.version }}-${{ matrix.std }}
restore-keys: |
build-${{ matrix.config.os }}-${{ matrix.build_type }}-${{ matrix.config.compiler.type }}-${{ matrix.config.compiler.version }}-${{ matrix.config.lib }}
build-${{ matrix.config.os }}-${{ matrix.build_type }}-${{ matrix.config.compiler.type }}-${{ matrix.config.compiler.version }}-
build-${{ matrix.config.os }}-${{ matrix.build_type }}-${{ matrix.config.compiler.type }}-
build-${{ matrix.config.os }}-${{ matrix.build_type }}-
build-${{ matrix.config.os }}-${{ matrix.config.compiler.type }}-${{ matrix.config.lib }}-${{ matrix.build_type }}-${{ matrix.config.compiler.version }}-${{ matrix.std }}
build-${{ matrix.config.os }}-${{ matrix.config.compiler.type }}-${{ matrix.config.lib }}-${{ matrix.build_type }}-${{ matrix.config.compiler.version }}-
build-${{ matrix.config.os }}-${{ matrix.config.compiler.type }}-${{ matrix.config.lib }}-${{ matrix.build_type }}-
build-${{ matrix.config.os }}-${{ matrix.config.compiler.type }}-${{ matrix.config.lib }}-
build-${{ matrix.config.os }}-${{ matrix.config.compiler.type }}-
build-${{ matrix.config.os }}-
- name: Install gcc-13
if: matrix.config.compiler.type == 'GCC' && matrix.config.compiler.version == '13'
Expand Down Expand Up @@ -206,7 +202,7 @@ jobs:
if [[ "${{ matrix.config.compiler.type }}" == "CLANG" ]]; then
sed -i.backup '/^\[settings\]$/,/^\[/ s/^compiler.libcxx=.*/compiler.libcxx=${{ matrix.config.lib }}/' ~/.conan2/profiles/default
fi
sed -i.backup '/^\[settings\]$/,/^\[/ s/^compiler.cppstd=.*/compiler.cppstd=${{ matrix.config.compiler.std }}/' ~/.conan2/profiles/default
sed -i.backup '/^\[settings\]$/,/^\[/ s/^compiler.cppstd=.*/compiler.cppstd=${{ matrix.std }}/' ~/.conan2/profiles/default
sed -i.backup '/^\[settings\]$/,/^\[/ s/^build_type=.*/build_type=${{ matrix.build_type }}/' ~/.conan2/profiles/default
conan profile show -pr default
- name: Install Conan dependencies
Expand Down

0 comments on commit e89861c

Please sign in to comment.