Update sa settings #128
This file contains hidden or 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@v4 | |
- 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-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@v4 | |
- name: Generate cache key | |
shell: bash | |
run: git submodule > '.github/.cache-key' | |
- name: Cache packages | |
uses: actions/cache@v4 | |
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: | | |
# The OpenSSL config package in apple ci job is break | |
if [ -e /opt/homebrew/lib/cmake/OpenSSL ]; then | |
rm -rf /opt/homebrew/lib/cmake/OpenSSL || true | |
fi | |
if [[ "x$USE_CC" =~ xclang.* ]]; then | |
bash ci/do_ci.sh clang.test ; | |
else | |
bash ci/do_ci.sh ssl.openssl ; | |
fi | |
vs2022_build: # job id, can be any string | |
name: "Visual Studio 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 | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Generate cache key | |
shell: bash | |
run: git submodule > '.github/.cache-key' | |
- name: Cache packages | |
uses: actions/cache@v4 | |
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@v4 | |
# - name: Generate cache key | |
# shell: bash | |
# run: git submodule > '.github/.cache-key' | |
# - name: Cache packages | |
# uses: actions/cache@v4 | |
# 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@v4 | |
- name: Generate cache key | |
shell: bash | |
run: git submodule > '.github/.cache-key' | |
- name: Cache packages | |
uses: actions/cache@v4 | |
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@v3 | |
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@v3 | |
with: | |
category: "/language:cpp" |