diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 9a79062..4f1f6cc 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -21,27 +21,13 @@ jobs: - name: Run build result run: ${{ matrix.os == 'windows-latest' && 'build\Debug\hello_world.exe' || 'build/hello_world' }} - use-action-with-specified-source-dir: + use-action-with-specified-dir: runs-on: ubuntu-latest steps: - name: Checkout repository uses: actions/checkout@v3.3.0 - - name: Use this action with specified source directory - uses: ./ - with: - source-dir: test - - - name: Run build result - run: build/hello_world - - use-action-with-specified-build-dir: - runs-on: ubuntu-latest - steps: - - name: Checkout repository - uses: actions/checkout@v3.3.0 - - - name: Use this action with specified build directory + - name: Use this action with specified directory uses: ./ with: source-dir: test @@ -50,7 +36,7 @@ jobs: - name: Run build result run: test/build/hello_world - - name: Check if default build directory is not exist + - name: Check if the default build directory does not exist run: test ! -d build use-action-with-specified-compiler: @@ -86,21 +72,3 @@ jobs: - name: Run build result run: build/${{ matrix.lang == 'C' && 'hello_world_c' || 'hello_world' }} - - use-action-with-additional-args: - runs-on: ubuntu-latest - steps: - - name: Checkout repository - uses: actions/checkout@v3.3.0 - - - name: Use this action with build txt enabled - uses: ./ - with: - source-dir: test - args: -D BUILD_TXT=ON - - - name: Run build result - run: build/hello_world - - - name: Check if the txt result exist - run: cat build/hello_world.txt diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 27c7acd..8e4200e 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -3,7 +3,6 @@ project(test) option(BUILD_C "build hello world in C Language" OFF) option(BUILD_CXX "build hello world in CXX Language" ON) -option(BUILD_TXT "build hello world txt file" OFF) if(BUILD_C) add_executable(hello_world_c hello_world.c) @@ -12,10 +11,3 @@ endif() if(BUILD_CXX) add_executable(hello_world hello_world.cpp) endif() - -if(BUILD_TXT) - add_custom_target( - hello_world_txt ALL - COMMAND echo "Hello world!" >> ${CMAKE_CURRENT_BINARY_DIR}/hello_world.txt - ) -endif()