Add workflow to test add_subdirectory integration
This commit is contained in:
parent
7989209e5b
commit
651782343e
60
.github/workflows/cmake-integration.yml
vendored
60
.github/workflows/cmake-integration.yml
vendored
@ -41,6 +41,21 @@ jobs:
|
|||||||
cmake .. -DCMAKE_BUILD_TYPE=Debug
|
cmake .. -DCMAKE_BUILD_TYPE=Debug
|
||||||
make
|
make
|
||||||
./main
|
./main
|
||||||
|
test-linux-add_subdirectory:
|
||||||
|
runs-on: ubuntu-22.04
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- name: build
|
||||||
|
run: |
|
||||||
|
cd ..
|
||||||
|
cp -rv cpptrace/test/add_subdirectory-integration .
|
||||||
|
cp -rv cpptrace add_subdirectory-integration
|
||||||
|
mkdir add_subdirectory-integration/build
|
||||||
|
cd add_subdirectory-integration/build
|
||||||
|
cmake .. -DCMAKE_BUILD_TYPE=Debug
|
||||||
|
make
|
||||||
|
./main
|
||||||
|
|
||||||
test-macos-fetchcontent:
|
test-macos-fetchcontent:
|
||||||
runs-on: macos-13
|
runs-on: macos-13
|
||||||
steps:
|
steps:
|
||||||
@ -73,6 +88,21 @@ jobs:
|
|||||||
cmake .. -DCMAKE_BUILD_TYPE=Debug
|
cmake .. -DCMAKE_BUILD_TYPE=Debug
|
||||||
make
|
make
|
||||||
./main
|
./main
|
||||||
|
test-macos-add_subdirectory:
|
||||||
|
runs-on: macos-13
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- name: test
|
||||||
|
run: |
|
||||||
|
cd ..
|
||||||
|
cp -rv cpptrace/test/add_subdirectory-integration .
|
||||||
|
cp -rv cpptrace add_subdirectory-integration
|
||||||
|
mkdir add_subdirectory-integration/build
|
||||||
|
cd add_subdirectory-integration/build
|
||||||
|
cmake .. -DCMAKE_BUILD_TYPE=Debug
|
||||||
|
make
|
||||||
|
./main
|
||||||
|
|
||||||
test-mingw-fetchcontent:
|
test-mingw-fetchcontent:
|
||||||
runs-on: windows-2019
|
runs-on: windows-2019
|
||||||
steps:
|
steps:
|
||||||
@ -87,6 +117,20 @@ jobs:
|
|||||||
cmake .. -DCMAKE_BUILD_TYPE=Debug -DCPPTRACE_TAG="$tag" -DCMAKE_BUILD_TYPE=g++ "-GUnix Makefiles"
|
cmake .. -DCMAKE_BUILD_TYPE=Debug -DCPPTRACE_TAG="$tag" -DCMAKE_BUILD_TYPE=g++ "-GUnix Makefiles"
|
||||||
make
|
make
|
||||||
.\main.exe
|
.\main.exe
|
||||||
|
test-mingw-add_subdirectory:
|
||||||
|
runs-on: windows-2019
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- name: test
|
||||||
|
run: |
|
||||||
|
cd ..
|
||||||
|
cp -Recurse cpptrace/test/add_subdirectory-integration .
|
||||||
|
cp -Recurse cpptrace add_subdirectory-integration
|
||||||
|
mkdir add_subdirectory-integration/build
|
||||||
|
cd add_subdirectory-integration/build
|
||||||
|
cmake .. -DCMAKE_BUILD_TYPE=Debug -DCMAKE_BUILD_TYPE=g++ "-GUnix Makefiles"
|
||||||
|
make
|
||||||
|
.\main.exe
|
||||||
test-windows-fetchcontent:
|
test-windows-fetchcontent:
|
||||||
runs-on: windows-2019
|
runs-on: windows-2019
|
||||||
steps:
|
steps:
|
||||||
@ -103,3 +147,19 @@ jobs:
|
|||||||
cmake .. -DCMAKE_BUILD_TYPE=Debug -DCPPTRACE_TAG="$tag"
|
cmake .. -DCMAKE_BUILD_TYPE=Debug -DCPPTRACE_TAG="$tag"
|
||||||
msbuild demo_project.sln
|
msbuild demo_project.sln
|
||||||
.\Debug\main.exe
|
.\Debug\main.exe
|
||||||
|
test-windows-add_subdirectory:
|
||||||
|
runs-on: windows-2019
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- name: Enable Developer Command Prompt
|
||||||
|
uses: ilammy/msvc-dev-cmd@v1.10.0
|
||||||
|
- name: test
|
||||||
|
run: |
|
||||||
|
cd ..
|
||||||
|
cp -Recurse cpptrace/test/add_subdirectory-integration .
|
||||||
|
cp -Recurse cpptrace add_subdirectory-integration
|
||||||
|
mkdir add_subdirectory-integration/build
|
||||||
|
cd add_subdirectory-integration/build
|
||||||
|
cmake .. -DCMAKE_BUILD_TYPE=Debug
|
||||||
|
msbuild demo_project.sln
|
||||||
|
.\Debug\main.exe
|
||||||
|
|||||||
8
test/add_subdirectory-integration/CMakeLists.txt
Normal file
8
test/add_subdirectory-integration/CMakeLists.txt
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
cmake_minimum_required(VERSION 3.8)
|
||||||
|
|
||||||
|
project(demo_project VERSION 0.0.1 LANGUAGES CXX)
|
||||||
|
|
||||||
|
add_executable(main main.cpp)
|
||||||
|
|
||||||
|
add_subdirectory(cpptrace)
|
||||||
|
target_link_libraries(main cpptrace)
|
||||||
13
test/add_subdirectory-integration/main.cpp
Normal file
13
test/add_subdirectory-integration/main.cpp
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
#include <cpptrace/cpptrace.hpp>
|
||||||
|
|
||||||
|
void trace() {
|
||||||
|
cpptrace::print_trace();
|
||||||
|
}
|
||||||
|
|
||||||
|
void foo(int) {
|
||||||
|
trace();
|
||||||
|
}
|
||||||
|
|
||||||
|
int main() {
|
||||||
|
foo(0);
|
||||||
|
}
|
||||||
@ -11,4 +11,3 @@ void foo(int) {
|
|||||||
int main() {
|
int main() {
|
||||||
foo(0);
|
foo(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -11,4 +11,3 @@ void foo(int) {
|
|||||||
int main() {
|
int main() {
|
||||||
foo(0);
|
foo(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user