From 919ab33eec96382614cea85ca54b6bb3b047a77d Mon Sep 17 00:00:00 2001 From: sksat Date: Mon, 22 Nov 2021 19:21:03 +0900 Subject: [PATCH 1/7] add option for build C2A only --- Examples/minimum_user_for_s2e/CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) 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 From 43127b71d238ab3221f9e2ebe7e13e0c2f4a216a Mon Sep 17 00:00:00 2001 From: sksat Date: Mon, 22 Nov 2021 19:27:03 +0900 Subject: [PATCH 2/7] add build minimum example on actions --- .github/workflows/build.yml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 000000000..5587fc948 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,22 @@ +name: build + +on: push + +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 .. + + - name: build + working-directory: ./Examples/minimum_user_for_s2e/build + run: cmake --build . From 065447d7d8589c7a9e1739b55e569474bf8ef557 Mon Sep 17 00:00:00 2001 From: sksat Date: Mon, 22 Nov 2021 19:39:17 +0900 Subject: [PATCH 3/7] fix build CI trigger --- .github/workflows/build.yml | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 5587fc948..14e500bea 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,6 +1,17 @@ name: build -on: push +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: From 093fb23ee0199fbd732815127cc350f3293802f9 Mon Sep 17 00:00:00 2001 From: sksat Date: Mon, 22 Nov 2021 20:58:06 +0900 Subject: [PATCH 4/7] rename workflow file --- .github/workflows/{build.yml => build_as_cxx.yml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .github/workflows/{build.yml => build_as_cxx.yml} (100%) diff --git a/.github/workflows/build.yml b/.github/workflows/build_as_cxx.yml similarity index 100% rename from .github/workflows/build.yml rename to .github/workflows/build_as_cxx.yml From 5b6b43bbff6e09a7ef611a9c889f40a079d28ee5 Mon Sep 17 00:00:00 2001 From: sksat Date: Mon, 22 Nov 2021 21:08:46 +0900 Subject: [PATCH 5/7] add CMake settings from S2E --- .github/workflows/build_as_cxx.yml | 4 ++-- .../minimum_user_for_s2e/CMakeSettings.json | 18 ++++++++++++++++++ 2 files changed, 20 insertions(+), 2 deletions(-) create mode 100644 Examples/minimum_user_for_s2e/CMakeSettings.json diff --git a/.github/workflows/build_as_cxx.yml b/.github/workflows/build_as_cxx.yml index 14e500bea..ce5c24246 100644 --- a/.github/workflows/build_as_cxx.yml +++ b/.github/workflows/build_as_cxx.yml @@ -1,4 +1,4 @@ -name: build +name: build as C++ for S2E on: pull_request: @@ -26,7 +26,7 @@ jobs: run: | mkdir build cd build - cmake .. + cmake .. -G "Visual Studio 16 2019" -A Win32 -DCMAKE_CONFIGURATION_TYPES:STRING="Debug" - name: build working-directory: ./Examples/minimum_user_for_s2e/build diff --git a/Examples/minimum_user_for_s2e/CMakeSettings.json b/Examples/minimum_user_for_s2e/CMakeSettings.json new file mode 100644 index 000000000..cd6c22ac1 --- /dev/null +++ b/Examples/minimum_user_for_s2e/CMakeSettings.json @@ -0,0 +1,18 @@ +{ + "configurations": [ + { + "name": "Win32", + "generator": "Visual Studio 16 2019", + "configurationType": "Debug", + "inheritEnvironments": [ + "msvc_x86" + ], + //"buildRoot": "${env.USERPROFILE}\\CMakeBuilds\\${workspaceHash}\\build\\${name}", + "buildRoot": "${thisFileDir}\\CMakeBuilds", + "installRoot": "${env.USERPROFILE}\\CMakeBuilds\\${workspaceHash}\\install\\${name}", + "cmakeCommandArgs": "", + "buildCommandArgs": "", + "ctestCommandArgs": "" + } + ] +} From f87e33c08150af28b8fded9a494be099ae1d4f6f Mon Sep 17 00:00:00 2001 From: sksat Date: Mon, 22 Nov 2021 21:44:44 +0900 Subject: [PATCH 6/7] fix CMake config --- .github/workflows/build_as_cxx.yml | 2 +- Examples/minimum_user_for_s2e/CMakeSettings.json | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/build_as_cxx.yml b/.github/workflows/build_as_cxx.yml index ce5c24246..393828f1f 100644 --- a/.github/workflows/build_as_cxx.yml +++ b/.github/workflows/build_as_cxx.yml @@ -26,7 +26,7 @@ jobs: run: | mkdir build cd build - cmake .. -G "Visual Studio 16 2019" -A Win32 -DCMAKE_CONFIGURATION_TYPES:STRING="Debug" + cmake .. -A Win32 - name: build working-directory: ./Examples/minimum_user_for_s2e/build diff --git a/Examples/minimum_user_for_s2e/CMakeSettings.json b/Examples/minimum_user_for_s2e/CMakeSettings.json index cd6c22ac1..18553a424 100644 --- a/Examples/minimum_user_for_s2e/CMakeSettings.json +++ b/Examples/minimum_user_for_s2e/CMakeSettings.json @@ -7,8 +7,6 @@ "inheritEnvironments": [ "msvc_x86" ], - //"buildRoot": "${env.USERPROFILE}\\CMakeBuilds\\${workspaceHash}\\build\\${name}", - "buildRoot": "${thisFileDir}\\CMakeBuilds", "installRoot": "${env.USERPROFILE}\\CMakeBuilds\\${workspaceHash}\\install\\${name}", "cmakeCommandArgs": "", "buildCommandArgs": "", From aeb7962d90a01991fba46f2f942810cc9bfb3cb4 Mon Sep 17 00:00:00 2001 From: Ryo Suzumoto Date: Tue, 23 Nov 2021 00:22:27 +0900 Subject: [PATCH 7/7] Update .gitignore --- .gitignore | 1 + 1 file changed, 1 insertion(+) 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