From 29d5df4062ee0466e8dfc22d3942d33e1409dfd6 Mon Sep 17 00:00:00 2001 From: Alfi Maulana Date: Wed, 20 Mar 2024 22:36:14 +0700 Subject: [PATCH 1/2] ci: checkout `threeal/cpp-starter` as the sample project --- .github/workflows/test.yaml | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 77e7683..7d07808 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -13,7 +13,12 @@ jobs: matrix: os: [windows, ubuntu, macos] steps: - - name: Checkout + - name: Checkout Project + uses: actions/checkout@v4.1.2 + with: + repository: threeal/cpp-starter + + - name: Checkout Action uses: actions/checkout@v4.1.2 with: path: ctest-action @@ -22,14 +27,12 @@ jobs: action.yaml sparse-checkout-cone-mode: false - - name: Prepare Sample Project - run: mv ctest-action/test/* . - - name: Configure and Build Project uses: threeal/cmake-action@v1.3.0 with: - run-build: true generator: Ninja + options: BUILD_TESTING=ON + run-build: true - name: Test Project uses: ./ctest-action @@ -38,7 +41,12 @@ jobs: name: Test Action With Build Config runs-on: windows-latest steps: - - name: Checkout + - name: Checkout Project + uses: actions/checkout@v4.1.2 + with: + repository: threeal/cpp-starter + + - name: Checkout Action uses: actions/checkout@v4.1.2 with: path: ctest-action @@ -47,12 +55,10 @@ jobs: action.yaml sparse-checkout-cone-mode: false - - name: Prepare Sample Project - run: mv ctest-action/test/* . - - name: Configure and Build Project uses: threeal/cmake-action@v1.3.0 with: + options: BUILD_TESTING=ON run-build: true - name: Test Project From 77c44881ae180d2216e74f0af7595dcc312ec205 Mon Sep 17 00:00:00 2001 From: Alfi Maulana Date: Wed, 20 Mar 2024 22:58:30 +0700 Subject: [PATCH 2/2] chore: remove sample project in `test` dir --- .gitignore | 2 -- test/CMakeLists.txt | 6 ------ test/main.cpp | 3 --- 3 files changed, 11 deletions(-) delete mode 100644 test/CMakeLists.txt delete mode 100644 test/main.cpp diff --git a/.gitignore b/.gitignore index 8d0f9d7..df7ea1d 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,2 @@ .* !.git* - -build/ diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt deleted file mode 100644 index ffdcf97..0000000 --- a/test/CMakeLists.txt +++ /dev/null @@ -1,6 +0,0 @@ -cmake_minimum_required(VERSION 3.0) -project(test) - -enable_testing() -add_executable(main main.cpp) -add_test(NAME main COMMAND $) diff --git a/test/main.cpp b/test/main.cpp deleted file mode 100644 index 4cce7f6..0000000 --- a/test/main.cpp +++ /dev/null @@ -1,3 +0,0 @@ -int main() { - return 0; -}