From 84fb9f8836e4b8e5b2b0661bd6fee8b8a33ffde3 Mon Sep 17 00:00:00 2001 From: Firejox Date: Thu, 18 Apr 2024 09:27:36 +0800 Subject: [PATCH] Add unit test ci --- .github/workflows/unit-test.yml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 .github/workflows/unit-test.yml diff --git a/.github/workflows/unit-test.yml b/.github/workflows/unit-test.yml new file mode 100644 index 0000000..a284058 --- /dev/null +++ b/.github/workflows/unit-test.yml @@ -0,0 +1,28 @@ +name: Unit Test + +on: + push: + paths-ignore: + - '**/README.md' + pull_request: + branches: + - main + paths-ignore: + - '**/README.md' + workflow_dispatch: + +env: + BUILD_TYPE: Release + +jobs: + build_and_test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Configure CMake + run: cmake -B ${{github.workspace}}/build -D CMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} + - name: Build + run: cmake --build ${{github.workspace}}/build + - name: Test + run: cmake --build ${{github.workspace}}/build --target test +