Skip to content

feat: readme

feat: readme #62

Workflow file for this run

# yaml-language-server: $schema=https://json-schema.org/draft-07/schema#
name: Test
on:
push:
pull_request:
jobs:
test:
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
- macos-latest
tool:
- cmake
- bazel
compiler:
- gcc
- clang
compiler_version:
- 12
- 15
exclude:
- compiler: gcc
compiler_version: 15
- compiler: clang
compiler_version: 12
# not support yet
- os: macos-latest
tool: cmake
compiler: gcc
compiler_version: 12
runs-on: ${{ matrix.os }}
steps:
- name: Checkout codebase
uses: actions/checkout@v3
- name: Setup bazel
if: matrix.tool == 'bazel'
uses: jwlawson/actions-setup-bazel@v1
with:
bazel-version: "latest"
- name: Setup cmake
if: matrix.tool == 'cmake'
uses: jwlawson/actions-setup-cmake@v1
with:
cmake-version: "latest"
- name: Setup Clang
if: matrix.compiler == 'clang'
uses: KyleMayes/install-llvm-action@v1
with:
version: ${{ matrix.compiler_version }}
- name: Set Clang Compiler Env
if: matrix.compiler == 'clang'
run: |
echo "CC=${LLVM_PATH}/bin/clang" >> $GITHUB_ENV
echo "CXX=${LLVM_PATH}/bin/clang++" >> $GITHUB_ENV
- name: Setup GCC
uses: Dup4/actions-setup-gcc@v1
if: matrix.compiler == 'gcc'
with:
version: ${{ matrix.compiler_version }}
- name: Build And Test Use Cmake
if: matrix.tool == 'cmake'
run: |
make tests
make unittest
make benchmark
- name: Build And Test Use Bazel
if: matrix.tool == 'bazel'
run: |
make bazel_ut
make bazel_bench