From cadb3612e042de43a8155a31b713f386b37765e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adri=C3=A1n=20Insaurralde=20Avalos?= Date: Fri, 27 Oct 2023 04:42:51 -0300 Subject: [PATCH 1/2] fix building OndselSolver as submodule in FreeCAD --- CMakeLists.txt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index bc49d4a..fca0a81 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -585,8 +585,9 @@ set(ONDSELSOLVER_HEADERS OndselSolver/ZTranslation.h ) -target_sources(OndselSolver PUBLIC "${ONDSELSOLVER_SRC}") -target_sources(OndselSolver PUBLIC "${ONDSELSOLVER_HEADERS}") +target_sources(OndselSolver PRIVATE + "${ONDSELSOLVER_SRC}" + "${ONDSELSOLVER_HEADERS}") set_target_properties(OndselSolver PROPERTIES VERSION ${PROJECT_VERSION} From 45f9feb83c2651b9086a48277362580cd91508ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adri=C3=A1n=20Insaurralde=20Avalos?= Date: Fri, 27 Oct 2023 04:43:23 -0300 Subject: [PATCH 2/2] add github action to push submodules updates on a FreeCAD branch --- .github/workflows/push-freecad.yml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 .github/workflows/push-freecad.yml diff --git a/.github/workflows/push-freecad.yml b/.github/workflows/push-freecad.yml new file mode 100644 index 0000000..83056ee --- /dev/null +++ b/.github/workflows/push-freecad.yml @@ -0,0 +1,25 @@ +name: push-freecad-submodule +on: + push: + +jobs: + push-submodule: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + with: + repository: Ondsel-Development/FreeCAD + ref: OndselSolver-testing + submodules: true + token: ${{ secrets.TOKEN }} + + - run: | + cd src/3rdParty/OndselSolver + git fetch origin $GITHUB_REF + git checkout $GITHUB_SHA + + - run: | + git config --global user.name 'github-actions[bot]' + git config --global user.email '41898282+github-actions[bot]@users.noreply.github.com' + git commit -am "Update OndselSolver submodule to $GITHUB_SHA" + git push \ No newline at end of file