resolve code-factor issues #51
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: Tests | |
on: | |
push: | |
branches: | |
- main | |
paths: | |
- 'src/**' | |
- 'examples/**' | |
- 'CMakeLists.txt' | |
- '.github/workflows/test.yml' | |
pull_request: | |
paths: | |
- 'src/**' | |
- 'examples/**' | |
- 'CMakeLists.txt' | |
- '.github/workflows/test.yml' | |
workflow_dispatch: | |
jobs: | |
Test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Repo | |
uses: actions/checkout@v2 | |
- name: Setup Clang | |
uses: egor-tensin/setup-clang@v1 | |
with: | |
version: 16 | |
platform: x64 | |
- name: Setup CMake | |
uses: jwlawson/actions-setup-cmake@v1.13 | |
with: | |
cmake-version: '3.26.0' | |
- name: Build | |
run: | | |
mkdir build | |
mkdir build/flame-route | |
cd build | |
CXX=clang++ CC=clang cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=flame-route .. | |
make -j2 | |
- name: Test | |
run: | | |
bash test/test.sh || exit 1 | |
- name: Generate Artifact | |
run: | | |
cd build | |
make install | |
- name: Upload Artifact | |
uses: actions/upload-artifact@v2 | |
with: | |
name: flame-route | |
path: build/flame-route | |