diff --git a/.github/workflows/Tests.yml b/.github/workflows/Tests.yml index 860c926..847e4f0 100644 --- a/.github/workflows/Tests.yml +++ b/.github/workflows/Tests.yml @@ -5,6 +5,7 @@ on: env: build_dir: ${{ github.workspace }}/build + install_test_dir: ${{ github.workspace }}/install-test jobs: test: @@ -37,32 +38,29 @@ jobs: run: ctest --build-config working-directory: ${{ env.build_dir }} - - name: Run install + - name: Run installation run: sudo cmake --install ${{ env.build_dir }} - - name: Prepare install test directory - run: mkdir -p cmake-test - - - name: Run install test + - name: Prepare installation test directory + run: mkdir -p ${{ env.install_test_dir }} + + - name: Test installation run: | cat < main.cpp - #include #include - int main() - { - auto tmpfile = tmp::file("tmp.test"); - std::cout << tmpfile.release().native(); - return 0; + #include + int main() { + std::cout << tmp::file().release().native(); } EOS cat < CMakeLists.txt cmake_minimum_required(VERSION 3.12) - project(cmake-test LANGUAGES CXX) + project(install-test LANGUAGES CXX) find_package(tmp REQUIRED) - add_executable(cmake-test main.cpp) - target_link_libraries(cmake-test tmp::tmp) + add_executable(install-test main.cpp) + target_link_libraries(install-test tmp::tmp) EOS cmake -B . cmake --build . test -f $(./cmake-test) - working-directory: ${{ github.workspace }}/cmake-test + working-directory: ${{ env.install_test_dir }}