Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix test CI issue by calling self test action #217

Merged
merged 24 commits into from
Mar 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
8ea62b9
Checkout pull request HEAD commit
shenxianpeng Mar 21, 2024
ef088eb
Update run-test.yml
shenxianpeng Mar 21, 2024
0b0d864
Update run-test.yml
shenxianpeng Mar 21, 2024
4338b6c
updaste run-test.yml
shenxianpeng Mar 21, 2024
a256283
change pull_request_target to pull_request
shenxianpeng Mar 21, 2024
254ad6a
change git tag command
shenxianpeng Mar 21, 2024
b4b14f7
change pull_request_target to pull_request
shenxianpeng Mar 21, 2024
f1369cf
delete tag before create
shenxianpeng Mar 21, 2024
f4f82c0
change git tag commands
shenxianpeng Mar 21, 2024
d6d704c
cancel previours build when trigger a new build
shenxianpeng Mar 21, 2024
7ff0afe
update step name
shenxianpeng Mar 21, 2024
1c6837a
update concurrency group
shenxianpeng Mar 21, 2024
f18b74d
don't arbitrarily ignore errors
2bndy5 Mar 21, 2024
b6b9bb3
Update run-test.yml
shenxianpeng Mar 21, 2024
aaa1ce7
support workflow_dispatch event
shenxianpeng Mar 21, 2024
44e53dc
add a self test action
shenxianpeng Mar 22, 2024
7150575
Update self-test.yml
shenxianpeng Mar 22, 2024
e2fca40
remove run-test.yml
shenxianpeng Mar 22, 2024
cec7e82
ignore venv folder
shenxianpeng Mar 22, 2024
b0ebdb0
add step-summary to test
shenxianpeng Mar 22, 2024
8bccee6
Update .github/workflows/self-test.yml
shenxianpeng Mar 22, 2024
2574f63
Update .github/workflows/self-test.yml
shenxianpeng Mar 22, 2024
52ba5b9
Update .github/workflows/self-test.yml
shenxianpeng Mar 22, 2024
6d50cb2
Update .github/workflows/self-test.yml
shenxianpeng Mar 22, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 0 additions & 33 deletions .github/workflows/run-test.yml

This file was deleted.

59 changes: 59 additions & 0 deletions .github/workflows/self-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: Self test action

on:
push:
branches: main
paths-ignore: "docs/**"
pull_request:
branches: main
paths-ignore: "docs/**"

jobs:
test:
strategy:
matrix:
os: [ ubuntu-latest, macos-latest, windows-latest ]
clang-version: ['9','10', '11', '12', '13', '14', '15', '16', '17', '18']
fail-fast: false
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Cache the build artifacts
id: cache-build
uses: actions/cache@v4
with:
path: build
key: ${{ runner.os }}-${{ hashFiles('docs/examples/demo/**') }}

- name: Generate compilation database
if: steps.cache-build.outputs.cache-hit != 'true'
run: mkdir build && cmake -Bbuild docs/examples/demo

- name: Self test action
uses: ./
id: linter
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
style: file
files-changed-only: false
# to ignore all build folder contents
ignore: build|venv
database: build
verbosity: debug
version: ${{ matrix.clang-version }}
thread-comments: ${{ matrix.clang-version == '12' && 'update' }}
file-annotations: ${{ runner.os == 'Linux' && matrix.clang-version == '12' }}
step-summary: ${{ matrix.clang-version == '12' }}
extra-args: -std=c++14 -Wall

- name: Fail fast?!
# if: steps.linter.outputs.checks-failed > 0
run: |
echo "some linter checks failed"
echo "${{ steps.linter.outputs.checks-failed }}"
echo "${{ env.checks-failed }}"
# for actual deployment
# run: exit 1
12 changes: 12 additions & 0 deletions docs/examples/demo/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
cmake_minimum_required(VERSION 3.15)

# Set the project name to your project name
project(demo C CXX)

set(CMAKE_EXPORT_COMPILE_COMMANDS ON)

add_executable(demo_app
${CMAKE_BINARY_SOURCE_DIR}demo.hpp
${CMAKE_BINARY_SOURCE_DIR}demo.cpp
)
target_include_directories(demo_app PUBLIC ${CMAKE_BINARY_SOURCE_DIR})
Loading