diff --git a/.github/workflows/build_as_cxx.yml b/.github/workflows/build_as_cxx.yml new file mode 100644 index 000000000..393828f1f --- /dev/null +++ b/.github/workflows/build_as_cxx.yml @@ -0,0 +1,33 @@ +name: build as C++ for S2E + +on: + pull_request: + paths: + - 'c2a_core_main.c' + - 'c2a_core_main.h' + - 'Applications/**' + - 'CmdTlm/**' + - 'Drivers/**' + - 'IfWrapper/**' + - 'System/**' + - 'Examples/minimum_user_for_s2e/CMakeLists.txt' + - 'Examples/minimum_user_for_s2e/src/**' + +jobs: + build_minimum_user: + runs-on: windows-latest + steps: + - uses: actions/checkout@v2 + - name: clone core to src/src_core + run: git clone . ./Examples/minimum_user_for_s2e/src/src_core + + - name: cmake + working-directory: ./Examples/minimum_user_for_s2e + run: | + mkdir build + cd build + cmake .. -A Win32 + + - name: build + working-directory: ./Examples/minimum_user_for_s2e/build + run: cmake --build . diff --git a/.gitignore b/.gitignore index 70ba07862..3612f13a1 100644 --- a/.gitignore +++ b/.gitignore @@ -59,3 +59,4 @@ dkms.conf # for c2a user sample Examples/minimum_user_for_s2e/src/src_core +Examples/minimum_user_for_s2e/build diff --git a/Examples/minimum_user_for_s2e/CMakeLists.txt b/Examples/minimum_user_for_s2e/CMakeLists.txt index 0199e8fdf..c601fde60 100644 --- a/Examples/minimum_user_for_s2e/CMakeLists.txt +++ b/Examples/minimum_user_for_s2e/CMakeLists.txt @@ -2,6 +2,10 @@ cmake_minimum_required(VERSION 3.10) project(C2A) + +include_directories(src) +add_definitions(-DSILS_FW) + set(C2A_SOURCE_FILES # src/src_core/c2a_core_main.c src/src_core/Applications/anomaly_handler.c diff --git a/Examples/minimum_user_for_s2e/CMakeSettings.json b/Examples/minimum_user_for_s2e/CMakeSettings.json new file mode 100644 index 000000000..18553a424 --- /dev/null +++ b/Examples/minimum_user_for_s2e/CMakeSettings.json @@ -0,0 +1,16 @@ +{ + "configurations": [ + { + "name": "Win32", + "generator": "Visual Studio 16 2019", + "configurationType": "Debug", + "inheritEnvironments": [ + "msvc_x86" + ], + "installRoot": "${env.USERPROFILE}\\CMakeBuilds\\${workspaceHash}\\install\\${name}", + "cmakeCommandArgs": "", + "buildCommandArgs": "", + "ctestCommandArgs": "" + } + ] +}