Update to fix fmtlib 10.1.0 #103
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "main" | |
on: # @see https://help.github.com/en/articles/events-that-trigger-workflows#webhook-events | |
push: | |
branches: # Array of patterns that match refs/heads | |
- master # Push events on master branch | |
- main | |
pull_request: | |
branches: [main] | |
jobs: | |
format: | |
name: Format | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: CI Job | |
shell: bash | |
run: | | |
bash ci/do_ci.sh format ; | |
unix_build: # job id, can be any string | |
name: Unix Build | |
# This job runs on Linux | |
strategy: | |
matrix: | |
include: | |
- os: ubuntu-latest | |
triplet: x64-linux | |
cc: gcc | |
- os: ubuntu-20.04 | |
triplet: x64-linux | |
cc: gcc-4.8 | |
- os: ubuntu-latest | |
triplet: x64-linux | |
cc: clang-latest | |
- os: macos-latest | |
triplet: x64-osx | |
cc: clang-latest | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Generate cache key | |
shell: bash | |
run: git submodule > '.github/.cache-key' | |
- name: Cache packages | |
uses: actions/cache@v3 | |
with: | |
path: | | |
third_party/install | |
key: ${{ matrix.os }}-${{ matrix.cc }}-${{ hashFiles('.github/.cache-key') }} | |
- name: Build & Test | |
shell: bash | |
env: | |
USE_CC: ${{ matrix.cc }} | |
VCPKG_TARGET_TRIPLET: ${{ matrix.triplet }} | |
run: | | |
if [[ "xgcc-4.8" == "x$USE_CC" ]]; then | |
sudo apt-add-repository 'deb http://archive.ubuntu.com/ubuntu/ xenial main' | |
sudo apt-add-repository 'deb http://archive.ubuntu.com/ubuntu/ xenial universe' | |
sudo apt-get update ; | |
sudo apt-get install --no-install-recommends --no-install-suggests -y g++-4.8 ; | |
bash ci/do_ci.sh gcc.legacy.test ; | |
elif [[ "x$USE_CC" =~ xclang.* ]]; then | |
bash ci/do_ci.sh clang.test ; | |
else | |
bash ci/do_ci.sh ssl.openssl ; | |
fi | |
vs2019_2022_build: # job id, can be any string | |
name: "Visual Studio 2019/2022 Build" | |
strategy: | |
matrix: | |
include: | |
- os: windows-latest | |
generator: "Visual Studio 17 2022" | |
build_shared_libs: "ON" | |
platform: x64 | |
- os: windows-latest | |
generator: "Visual Studio 17 2022" | |
build_shared_libs: "OFF" | |
platform: x64 | |
- os: windows-2019 | |
generator: "Visual Studio 16 2019" | |
build_shared_libs: "OFF" | |
platform: x64 | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Generate cache key | |
shell: bash | |
run: git submodule > '.github/.cache-key' | |
- name: Cache packages | |
uses: actions/cache@v3 | |
with: | |
path: | | |
third_party/install | |
key: ${{ matrix.os }}-shared-${{ matrix.build_shared_libs }}-${{ hashFiles('.github/.cache-key') }} | |
- name: Build & Test | |
shell: pwsh | |
env: | |
CMAKE_GENERATOR: ${{ matrix.generator }} | |
CMAKE_PLATFORM: ${{ matrix.platform }} | |
BUILD_SHARED_LIBS: ${{ matrix.build_shared_libs }} | |
CONFIGURATION: RelWithDebInfo | |
run: | | |
pwsh ci/do_ci.ps1 "msvc.2019+.test" ; | |
mingw_build: # job id, can be any string | |
name: MinGW Build | |
strategy: | |
matrix: | |
include: | |
- os: windows-latest | |
build_shared_libs: "ON" | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Generate cache key | |
shell: bash | |
run: git submodule > '.github/.cache-key' | |
- name: Cache packages | |
uses: actions/cache@v3 | |
with: | |
path: | | |
third_party/install | |
C:/msys64/var/cache/pacman/pkg | |
key: ${{ matrix.os }}-mingw-shared-${{ matrix.build_shared_libs }}-${{ hashFiles('.github/.cache-key') }} | |
- name: Build & Test | |
shell: bash | |
env: | |
BUILD_SHARED_LIBS: ${{ matrix.build_shared_libs }} | |
run: | | |
C:/msys64/msys2_shell.cmd -mingw64 -defterm -no-start -here -lc "ci/do_ci.sh msys2.mingw.test" | |
codeql: # job id, can be any string | |
name: CodeQL | |
# This job runs on Linux | |
strategy: | |
matrix: | |
include: | |
- os: ubuntu-latest | |
triplet: x64-linux | |
cc: gcc | |
gcov_flags: "--coverage -fprofile-arcs -ftest-coverage" | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Generate cache key | |
shell: bash | |
run: git submodule > '.github/.cache-key' | |
- name: Cache packages | |
uses: actions/cache@v3 | |
with: | |
path: | | |
third_party/install | |
key: ${{ matrix.os }}-coverage-${{ hashFiles('.github/.cache-key') }} | |
- name: Configure | |
shell: bash | |
env: | |
USE_CC: ${{ matrix.cc }} | |
VCPKG_TARGET_TRIPLET: ${{ matrix.triplet }} | |
GCOV_FLAGS: "${{ matrix.gcov_flags }}" | |
run: | | |
bash ci/do_ci.sh codeql.configure | |
- name: Initialize CodeQL | |
uses: github/codeql-action/init@v2 | |
with: | |
config-file: ./.github/codeql/codeql-config.yml | |
- name: Build | |
shell: bash | |
env: | |
USE_CC: ${{ matrix.cc }} | |
run: | | |
bash ci/do_ci.sh codeql.build | |
- name: Perform CodeQL Analysis | |
uses: github/codeql-action/analyze@v2 | |
with: | |
category: "/language:cpp" |