From 0a02a0929f02f86bd6eeec898bd4b112f9211809 Mon Sep 17 00:00:00 2001 From: ivansoft <32499694+ivansoft@users.noreply.github.com> Date: Mon, 10 Mar 2025 17:12:18 +0300 Subject: [PATCH 01/36] Create cmake-single-platform.yml --- .github/workflows/cmake-single-platform.yml | 46 +++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 .github/workflows/cmake-single-platform.yml diff --git a/.github/workflows/cmake-single-platform.yml b/.github/workflows/cmake-single-platform.yml new file mode 100644 index 0000000..2a9fb65 --- /dev/null +++ b/.github/workflows/cmake-single-platform.yml @@ -0,0 +1,46 @@ +# This starter workflow is for a CMake project running on a single platform. There is a different starter workflow if you need cross-platform coverage. +# See: https://github.com/actions/starter-workflows/blob/main/ci/cmake-multi-platform.yml +name: CMake on a single platform + +on: + push: + branches: [ "v5.4.1" ] + pull_request: + branches: [ "v5.4.1" ] + +env: + # Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.) + BUILD_TYPE: Release + GENERATOR: "NMake Makefiles" + +jobs: + build: + # The CMake configure and build commands are platform agnostic and should work equally well on Windows or Mac. + # You can convert this to a matrix build if you need cross-platform coverage. + # See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix + runs-on: windows-latest + + steps: + - uses: actions/checkout@v4 + + - name: Set reusable strings + id: strings + shell: bash + run: | + BUILD_TYPE=${{env.BUILD_TYPE}}; echo "build-output-dir=${{github.workspace}}/cmake-build-${BUILD_TYPE,,}-${{env.RUNNER_ARCH}}" >> "$GITHUB_OUTPUT" + + - name: Configure CMake + # Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make. + # See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type + run: cmake -G ${{env.GENERATOR}} -B ${{steps.strings.outputs.build-output-dir}} -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} --install-prefix ${{github.workspace}} -Wdev --warn-uninitialized --log-context -L + + - name: Build + # Build your program with the given configuration + run: cmake --build ${{steps.strings.outputs.build-output-dir}} --config ${{env.BUILD_TYPE}} + + # - name: Test + # working-directory: ${{github.workspace}}/build + # # Execute tests defined by the CMake configuration. + # # See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail + # run: ctest -C ${{env.BUILD_TYPE}} + From 586ba30bc280cc5432a2567150b0e08e16b72e02 Mon Sep 17 00:00:00 2001 From: ivansoft <32499694+ivansoft@users.noreply.github.com> Date: Mon, 10 Mar 2025 17:23:55 +0300 Subject: [PATCH 02/36] actions bugfix env -> context --- .github/workflows/cmake-single-platform.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/cmake-single-platform.yml b/.github/workflows/cmake-single-platform.yml index 2a9fb65..fcdef57 100644 --- a/.github/workflows/cmake-single-platform.yml +++ b/.github/workflows/cmake-single-platform.yml @@ -11,7 +11,7 @@ on: env: # Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.) BUILD_TYPE: Release - GENERATOR: "NMake Makefiles" + GENERATOR: NMake Makefiles jobs: build: @@ -27,12 +27,12 @@ jobs: id: strings shell: bash run: | - BUILD_TYPE=${{env.BUILD_TYPE}}; echo "build-output-dir=${{github.workspace}}/cmake-build-${BUILD_TYPE,,}-${{env.RUNNER_ARCH}}" >> "$GITHUB_OUTPUT" + BUILD_TYPE=${{env.BUILD_TYPE}}; echo "build-output-dir=${{github.workspace}}/cmake-build-${BUILD_TYPE,,}-${{runner.arch}}" >> "$GITHUB_OUTPUT" - name: Configure CMake # Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make. # See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type - run: cmake -G ${{env.GENERATOR}} -B ${{steps.strings.outputs.build-output-dir}} -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} --install-prefix ${{github.workspace}} -Wdev --warn-uninitialized --log-context -L + run: cmake -G "${{env.GENERATOR}}" -B ${{steps.strings.outputs.build-output-dir}} -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} --install-prefix ${{github.workspace}} -Wdev --warn-uninitialized --log-context -L - name: Build # Build your program with the given configuration From 7df4d5f4e23d4c7c0d72e09b1f6b2868b0260f4b Mon Sep 17 00:00:00 2001 From: ivansoft <32499694+ivansoft@users.noreply.github.com> Date: Mon, 10 Mar 2025 17:28:48 +0300 Subject: [PATCH 03/36] actions bugfix quote cmake args --- .github/workflows/cmake-single-platform.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/cmake-single-platform.yml b/.github/workflows/cmake-single-platform.yml index fcdef57..33daa1b 100644 --- a/.github/workflows/cmake-single-platform.yml +++ b/.github/workflows/cmake-single-platform.yml @@ -27,12 +27,12 @@ jobs: id: strings shell: bash run: | - BUILD_TYPE=${{env.BUILD_TYPE}}; echo "build-output-dir=${{github.workspace}}/cmake-build-${BUILD_TYPE,,}-${{runner.arch}}" >> "$GITHUB_OUTPUT" + BUILD_DIR_NAME=cmake-build-${{env.BUILD_TYPE}}-${{runner.arch}}; echo "build-output-dir=${{github.workspace}}/${BUILD_DIR_NAME,,}" >> "$GITHUB_OUTPUT" - name: Configure CMake # Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make. # See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type - run: cmake -G "${{env.GENERATOR}}" -B ${{steps.strings.outputs.build-output-dir}} -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} --install-prefix ${{github.workspace}} -Wdev --warn-uninitialized --log-context -L + run: cmake -G "${{env.GENERATOR}}" -B ${{steps.strings.outputs.build-output-dir}} -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} --install-prefix "${{github.workspace}}" -Wdev --warn-uninitialized --log-context -L - name: Build # Build your program with the given configuration From 62f200568f64c943dc4fabb0d56b11357f320efe Mon Sep 17 00:00:00 2001 From: ivansoft <32499694+ivansoft@users.noreply.github.com> Date: Mon, 10 Mar 2025 17:31:28 +0300 Subject: [PATCH 04/36] actions bugfix quote cmake args --- .github/workflows/cmake-single-platform.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cmake-single-platform.yml b/.github/workflows/cmake-single-platform.yml index 33daa1b..565e276 100644 --- a/.github/workflows/cmake-single-platform.yml +++ b/.github/workflows/cmake-single-platform.yml @@ -32,7 +32,7 @@ jobs: - name: Configure CMake # Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make. # See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type - run: cmake -G "${{env.GENERATOR}}" -B ${{steps.strings.outputs.build-output-dir}} -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} --install-prefix "${{github.workspace}}" -Wdev --warn-uninitialized --log-context -L + run: cmake -G "${{env.GENERATOR}}" -B "${{steps.strings.outputs.build-output-dir}}" -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} --install-prefix "${{github.workspace}}" -Wdev --warn-uninitialized --log-context -L - name: Build # Build your program with the given configuration From e63524b53dd15684756387a939a626066ed90a75 Mon Sep 17 00:00:00 2001 From: ivansoft <32499694+ivansoft@users.noreply.github.com> Date: Mon, 10 Mar 2025 17:35:06 +0300 Subject: [PATCH 05/36] actions bugfix slash -> backslash --- .github/workflows/cmake-single-platform.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cmake-single-platform.yml b/.github/workflows/cmake-single-platform.yml index 565e276..549bbca 100644 --- a/.github/workflows/cmake-single-platform.yml +++ b/.github/workflows/cmake-single-platform.yml @@ -27,7 +27,7 @@ jobs: id: strings shell: bash run: | - BUILD_DIR_NAME=cmake-build-${{env.BUILD_TYPE}}-${{runner.arch}}; echo "build-output-dir=${{github.workspace}}/${BUILD_DIR_NAME,,}" >> "$GITHUB_OUTPUT" + BUILD_DIR_NAME=cmake-build-${{env.BUILD_TYPE}}-${{runner.arch}}; echo "build-output-dir=${{github.workspace}}\${BUILD_DIR_NAME,,}" >> "$GITHUB_OUTPUT" - name: Configure CMake # Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make. From 3bda8fb3098c413118d92b4499a5fa53caf2a13e Mon Sep 17 00:00:00 2001 From: ivansoft <32499694+ivansoft@users.noreply.github.com> Date: Mon, 10 Mar 2025 17:45:45 +0300 Subject: [PATCH 06/36] actions bugfix revert backslash -> slash --- .github/workflows/cmake-single-platform.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cmake-single-platform.yml b/.github/workflows/cmake-single-platform.yml index 549bbca..565e276 100644 --- a/.github/workflows/cmake-single-platform.yml +++ b/.github/workflows/cmake-single-platform.yml @@ -27,7 +27,7 @@ jobs: id: strings shell: bash run: | - BUILD_DIR_NAME=cmake-build-${{env.BUILD_TYPE}}-${{runner.arch}}; echo "build-output-dir=${{github.workspace}}\${BUILD_DIR_NAME,,}" >> "$GITHUB_OUTPUT" + BUILD_DIR_NAME=cmake-build-${{env.BUILD_TYPE}}-${{runner.arch}}; echo "build-output-dir=${{github.workspace}}/${BUILD_DIR_NAME,,}" >> "$GITHUB_OUTPUT" - name: Configure CMake # Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make. From fa340b6b9cefa6a5a2f7911be22bfbd165f198fd Mon Sep 17 00:00:00 2001 From: ivansoft <32499694+ivansoft@users.noreply.github.com> Date: Mon, 10 Mar 2025 17:52:09 +0300 Subject: [PATCH 07/36] actions bugfix CMAKE_C_COMPILER set up --- .github/workflows/cmake-single-platform.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/cmake-single-platform.yml b/.github/workflows/cmake-single-platform.yml index 565e276..269b5b8 100644 --- a/.github/workflows/cmake-single-platform.yml +++ b/.github/workflows/cmake-single-platform.yml @@ -12,6 +12,8 @@ env: # Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.) BUILD_TYPE: Release GENERATOR: NMake Makefiles + c_compiler: cl + cpp_compiler: cl jobs: build: @@ -32,7 +34,11 @@ jobs: - name: Configure CMake # Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make. # See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type - run: cmake -G "${{env.GENERATOR}}" -B "${{steps.strings.outputs.build-output-dir}}" -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} --install-prefix "${{github.workspace}}" -Wdev --warn-uninitialized --log-context -L + run: > + cmake -G "${{env.GENERATOR}}" -B "${{steps.strings.outputs.build-output-dir}}" --install-prefix "${{github.workspace}}" -Wdev --warn-uninitialized --log-context -L + -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} + -DCMAKE_CXX_COMPILER=${{ env.cpp_compiler }} + -DCMAKE_C_COMPILER=${{ enc.c_compiler }} - name: Build # Build your program with the given configuration From ee8852521622cc6b46abb95692104fc4e70e9df0 Mon Sep 17 00:00:00 2001 From: ivansoft <32499694+ivansoft@users.noreply.github.com> Date: Mon, 10 Mar 2025 17:54:44 +0300 Subject: [PATCH 08/36] typo --- .github/workflows/cmake-single-platform.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cmake-single-platform.yml b/.github/workflows/cmake-single-platform.yml index 269b5b8..a657b85 100644 --- a/.github/workflows/cmake-single-platform.yml +++ b/.github/workflows/cmake-single-platform.yml @@ -38,7 +38,7 @@ jobs: cmake -G "${{env.GENERATOR}}" -B "${{steps.strings.outputs.build-output-dir}}" --install-prefix "${{github.workspace}}" -Wdev --warn-uninitialized --log-context -L -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_CXX_COMPILER=${{ env.cpp_compiler }} - -DCMAKE_C_COMPILER=${{ enc.c_compiler }} + -DCMAKE_C_COMPILER=${{ env.c_compiler }} - name: Build # Build your program with the given configuration From e5554afea7b2f982b1ca7be6460e262c7d9fd6ec Mon Sep 17 00:00:00 2001 From: ivansoft <32499694+ivansoft@users.noreply.github.com> Date: Mon, 10 Mar 2025 17:58:41 +0300 Subject: [PATCH 09/36] actions bugfix run command wrong indentation --- .github/workflows/cmake-single-platform.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/cmake-single-platform.yml b/.github/workflows/cmake-single-platform.yml index a657b85..2d512ca 100644 --- a/.github/workflows/cmake-single-platform.yml +++ b/.github/workflows/cmake-single-platform.yml @@ -36,9 +36,9 @@ jobs: # See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type run: > cmake -G "${{env.GENERATOR}}" -B "${{steps.strings.outputs.build-output-dir}}" --install-prefix "${{github.workspace}}" -Wdev --warn-uninitialized --log-context -L - -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} - -DCMAKE_CXX_COMPILER=${{ env.cpp_compiler }} - -DCMAKE_C_COMPILER=${{ env.c_compiler }} + -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} + -DCMAKE_CXX_COMPILER=${{ env.cpp_compiler }} + -DCMAKE_C_COMPILER=${{ env.c_compiler }} - name: Build # Build your program with the given configuration From 702d3c62f7df961bc85c38183ab3359d3ddf0cc1 Mon Sep 17 00:00:00 2001 From: ivansoft <32499694+ivansoft@users.noreply.github.com> Date: Mon, 10 Mar 2025 18:08:32 +0300 Subject: [PATCH 10/36] actions cmake -S parameter --- .github/workflows/cmake-single-platform.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/cmake-single-platform.yml b/.github/workflows/cmake-single-platform.yml index 2d512ca..2e5e0c7 100644 --- a/.github/workflows/cmake-single-platform.yml +++ b/.github/workflows/cmake-single-platform.yml @@ -37,8 +37,9 @@ jobs: run: > cmake -G "${{env.GENERATOR}}" -B "${{steps.strings.outputs.build-output-dir}}" --install-prefix "${{github.workspace}}" -Wdev --warn-uninitialized --log-context -L -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} - -DCMAKE_CXX_COMPILER=${{ env.cpp_compiler }} - -DCMAKE_C_COMPILER=${{ env.c_compiler }} + -DCMAKE_CXX_COMPILER=${{env.cpp_compiler}} + -DCMAKE_C_COMPILER=${{env.c_compiler}} + -S "${{github.workspace}}" - name: Build # Build your program with the given configuration From 951d7c85ccfa8da06dfd6e4d57d8f13914addff5 Mon Sep 17 00:00:00 2001 From: ivansoft <32499694+ivansoft@users.noreply.github.com> Date: Mon, 10 Mar 2025 18:09:39 +0300 Subject: [PATCH 11/36] actions cmake remove -G generator parameter --- .github/workflows/cmake-single-platform.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cmake-single-platform.yml b/.github/workflows/cmake-single-platform.yml index 2e5e0c7..155c963 100644 --- a/.github/workflows/cmake-single-platform.yml +++ b/.github/workflows/cmake-single-platform.yml @@ -35,7 +35,7 @@ jobs: # Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make. # See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type run: > - cmake -G "${{env.GENERATOR}}" -B "${{steps.strings.outputs.build-output-dir}}" --install-prefix "${{github.workspace}}" -Wdev --warn-uninitialized --log-context -L + cmake -B "${{steps.strings.outputs.build-output-dir}}" --install-prefix "${{github.workspace}}" -Wdev --warn-uninitialized --log-context -L -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_CXX_COMPILER=${{env.cpp_compiler}} -DCMAKE_C_COMPILER=${{env.c_compiler}} From 9b3d324fa2180645b3875df83a1015b12ec08824 Mon Sep 17 00:00:00 2001 From: ivansoft <32499694+ivansoft@users.noreply.github.com> Date: Mon, 10 Mar 2025 18:23:56 +0300 Subject: [PATCH 12/36] debug info --- .github/workflows/cmake-single-platform.yml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/cmake-single-platform.yml b/.github/workflows/cmake-single-platform.yml index 155c963..85d0667 100644 --- a/.github/workflows/cmake-single-platform.yml +++ b/.github/workflows/cmake-single-platform.yml @@ -31,6 +31,14 @@ jobs: run: | BUILD_DIR_NAME=cmake-build-${{env.BUILD_TYPE}}-${{runner.arch}}; echo "build-output-dir=${{github.workspace}}/${BUILD_DIR_NAME,,}" >> "$GITHUB_OUTPUT" + - name: Debug Info + shell: bash + run: | + echo ${{ github.workspace }} + echo ${{ runner.temp }} + echo $(pwd) + echo $(ls -al) + - name: Configure CMake # Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make. # See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type @@ -44,7 +52,7 @@ jobs: - name: Build # Build your program with the given configuration run: cmake --build ${{steps.strings.outputs.build-output-dir}} --config ${{env.BUILD_TYPE}} - + # - name: Test # working-directory: ${{github.workspace}}/build # # Execute tests defined by the CMake configuration. From fb392532e459c7f624d6580a959c963696828c43 Mon Sep 17 00:00:00 2001 From: ivansoft <32499694+ivansoft@users.noreply.github.com> Date: Mon, 10 Mar 2025 18:35:34 +0300 Subject: [PATCH 13/36] include ( CMakePrintSystemInformation ) --- CMakeLists.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 60bdfb0..90e75d2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -4,6 +4,8 @@ set ( CMAKE_C_STANDARD 99 ) set ( CMAKE_C_STANDARD_REQUIRED True ) include( version.cmake ) +include ( CMakePrintSystemInformation ) + add_compile_options( /W4 ) # -Wall set(CMAKE_BUILD_TYPE "Release" CACHE STRING "") From 802439feff4c6ac8e5f9a2d8fb2f3f33c30fe3f9 Mon Sep 17 00:00:00 2001 From: ivansoft <32499694+ivansoft@users.noreply.github.com> Date: Mon, 10 Mar 2025 18:37:51 +0300 Subject: [PATCH 14/36] include ( CMakePrintHelpers ) --- CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 90e75d2..8562488 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -5,6 +5,10 @@ set ( CMAKE_C_STANDARD_REQUIRED True ) include( version.cmake ) include ( CMakePrintSystemInformation ) +include ( CMakePrintHelpers ) +cmake_print_variables ( + CMAKE_CURRENT_SOURCE_DIR + ) add_compile_options( /W4 ) # -Wall From 7a6e0d44d7f90722fa46bce0abbdefe65a397376 Mon Sep 17 00:00:00 2001 From: ivansoft <32499694+ivansoft@users.noreply.github.com> Date: Mon, 10 Mar 2025 18:40:12 +0300 Subject: [PATCH 15/36] PREPEND ${CMAKE_CURRENT_SOURCE_DIR}/ --- CMakeLists.txt | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 8562488..51ef6ea 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -31,12 +31,12 @@ set ( SRC_LUAC luac.c ) set ( INSTALL_HEADERS lua.h luaconf.h lualib.h lauxlib.h lua.hpp ) -list( TRANSFORM SRC_CORE PREPEND "${LUA_DIR}/" ) -list( TRANSFORM SRC_LIB PREPEND "${LUA_DIR}/" ) -list( TRANSFORM SRC_AUX PREPEND "${LUA_DIR}/" ) -list( TRANSFORM SRC_LUA PREPEND "${LUA_DIR}/" ) -list( TRANSFORM SRC_LUAC PREPEND "${LUAC_DIR}/" ) -list( TRANSFORM INSTALL_HEADERS PREPEND "${LUA_DIR}/" ) +list( TRANSFORM SRC_CORE PREPEND "${CMAKE_CURRENT_SOURCE_DIR}/${LUA_DIR}/" ) +list( TRANSFORM SRC_LIB PREPEND "${CMAKE_CURRENT_SOURCE_DIR}/${LUA_DIR}/" ) +list( TRANSFORM SRC_AUX PREPEND "${CMAKE_CURRENT_SOURCE_DIR}/${LUA_DIR}/" ) +list( TRANSFORM SRC_LUA PREPEND "${CMAKE_CURRENT_SOURCE_DIR}/${LUA_DIR}/" ) +list( TRANSFORM SRC_LUAC PREPEND "${CMAKE_CURRENT_SOURCE_DIR}/${LUAC_DIR}/" ) +list( TRANSFORM INSTALL_HEADERS PREPEND "${CMAKE_CURRENT_SOURCE_DIR}/${LUA_DIR}/" ) include_directories ( ${LUA_DIR} ) From a187cc8a72a710d6eab9656ed4bc79ed5e37249b Mon Sep 17 00:00:00 2001 From: ivansoft <32499694+ivansoft@users.noreply.github.com> Date: Mon, 10 Mar 2025 18:47:43 +0300 Subject: [PATCH 16/36] revert PREPEND --- CMakeLists.txt | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 51ef6ea..8562488 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -31,12 +31,12 @@ set ( SRC_LUAC luac.c ) set ( INSTALL_HEADERS lua.h luaconf.h lualib.h lauxlib.h lua.hpp ) -list( TRANSFORM SRC_CORE PREPEND "${CMAKE_CURRENT_SOURCE_DIR}/${LUA_DIR}/" ) -list( TRANSFORM SRC_LIB PREPEND "${CMAKE_CURRENT_SOURCE_DIR}/${LUA_DIR}/" ) -list( TRANSFORM SRC_AUX PREPEND "${CMAKE_CURRENT_SOURCE_DIR}/${LUA_DIR}/" ) -list( TRANSFORM SRC_LUA PREPEND "${CMAKE_CURRENT_SOURCE_DIR}/${LUA_DIR}/" ) -list( TRANSFORM SRC_LUAC PREPEND "${CMAKE_CURRENT_SOURCE_DIR}/${LUAC_DIR}/" ) -list( TRANSFORM INSTALL_HEADERS PREPEND "${CMAKE_CURRENT_SOURCE_DIR}/${LUA_DIR}/" ) +list( TRANSFORM SRC_CORE PREPEND "${LUA_DIR}/" ) +list( TRANSFORM SRC_LIB PREPEND "${LUA_DIR}/" ) +list( TRANSFORM SRC_AUX PREPEND "${LUA_DIR}/" ) +list( TRANSFORM SRC_LUA PREPEND "${LUA_DIR}/" ) +list( TRANSFORM SRC_LUAC PREPEND "${LUAC_DIR}/" ) +list( TRANSFORM INSTALL_HEADERS PREPEND "${LUA_DIR}/" ) include_directories ( ${LUA_DIR} ) From 84a6b44a36eed7df3c06972b3d3ac4ae26fa57a3 Mon Sep 17 00:00:00 2001 From: ivansoft <32499694+ivansoft@users.noreply.github.com> Date: Mon, 10 Mar 2025 18:48:35 +0300 Subject: [PATCH 17/36] actions bugfix checkout with submodules --- .github/workflows/cmake-single-platform.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/cmake-single-platform.yml b/.github/workflows/cmake-single-platform.yml index 85d0667..b0a1b5f 100644 --- a/.github/workflows/cmake-single-platform.yml +++ b/.github/workflows/cmake-single-platform.yml @@ -24,6 +24,8 @@ jobs: steps: - uses: actions/checkout@v4 + with: + submodules: true - name: Set reusable strings id: strings From fb3d1dd94668f5e7426182819958296b2895582b Mon Sep 17 00:00:00 2001 From: ivansoft <32499694+ivansoft@users.noreply.github.com> Date: Mon, 10 Mar 2025 18:50:45 +0300 Subject: [PATCH 18/36] revert -G ${{GENERATOR}} --- .github/workflows/cmake-single-platform.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cmake-single-platform.yml b/.github/workflows/cmake-single-platform.yml index b0a1b5f..e060e61 100644 --- a/.github/workflows/cmake-single-platform.yml +++ b/.github/workflows/cmake-single-platform.yml @@ -45,7 +45,7 @@ jobs: # Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make. # See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type run: > - cmake -B "${{steps.strings.outputs.build-output-dir}}" --install-prefix "${{github.workspace}}" -Wdev --warn-uninitialized --log-context -L + cmake -G ${{GENERATOR}} -B "${{steps.strings.outputs.build-output-dir}}" --install-prefix "${{github.workspace}}" -Wdev --warn-uninitialized --log-context -L -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_CXX_COMPILER=${{env.cpp_compiler}} -DCMAKE_C_COMPILER=${{env.c_compiler}} From 6ca28ce68558bd84fb3a9c5ab66be944b72f865a Mon Sep 17 00:00:00 2001 From: ivansoft <32499694+ivansoft@users.noreply.github.com> Date: Mon, 10 Mar 2025 18:51:50 +0300 Subject: [PATCH 19/36] typo --- .github/workflows/cmake-single-platform.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cmake-single-platform.yml b/.github/workflows/cmake-single-platform.yml index e060e61..b5d7bc9 100644 --- a/.github/workflows/cmake-single-platform.yml +++ b/.github/workflows/cmake-single-platform.yml @@ -45,7 +45,7 @@ jobs: # Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make. # See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type run: > - cmake -G ${{GENERATOR}} -B "${{steps.strings.outputs.build-output-dir}}" --install-prefix "${{github.workspace}}" -Wdev --warn-uninitialized --log-context -L + cmake -G ${{env.GENERATOR}} -B "${{steps.strings.outputs.build-output-dir}}" --install-prefix "${{github.workspace}}" -Wdev --warn-uninitialized --log-context -L -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_CXX_COMPILER=${{env.cpp_compiler}} -DCMAKE_C_COMPILER=${{env.c_compiler}} From 35a75293d18c1baf61c1e09eb3785d4e75a43f4b Mon Sep 17 00:00:00 2001 From: ivansoft <32499694+ivansoft@users.noreply.github.com> Date: Mon, 10 Mar 2025 18:52:47 +0300 Subject: [PATCH 20/36] typo --- .github/workflows/cmake-single-platform.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cmake-single-platform.yml b/.github/workflows/cmake-single-platform.yml index b5d7bc9..3bdeb2f 100644 --- a/.github/workflows/cmake-single-platform.yml +++ b/.github/workflows/cmake-single-platform.yml @@ -45,7 +45,7 @@ jobs: # Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make. # See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type run: > - cmake -G ${{env.GENERATOR}} -B "${{steps.strings.outputs.build-output-dir}}" --install-prefix "${{github.workspace}}" -Wdev --warn-uninitialized --log-context -L + cmake -G "${{env.GENERATOR}}" -B "${{steps.strings.outputs.build-output-dir}}" --install-prefix "${{github.workspace}}" -Wdev --warn-uninitialized --log-context -L -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_CXX_COMPILER=${{env.cpp_compiler}} -DCMAKE_C_COMPILER=${{env.c_compiler}} From 6bd7c999133fa3a611b50995b3052e42990e9317 Mon Sep 17 00:00:00 2001 From: ivansoft <32499694+ivansoft@users.noreply.github.com> Date: Mon, 10 Mar 2025 18:54:33 +0300 Subject: [PATCH 21/36] actions "NMake Makefiles" isn't supported --- .github/workflows/cmake-single-platform.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/cmake-single-platform.yml b/.github/workflows/cmake-single-platform.yml index 3bdeb2f..779230b 100644 --- a/.github/workflows/cmake-single-platform.yml +++ b/.github/workflows/cmake-single-platform.yml @@ -11,7 +11,6 @@ on: env: # Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.) BUILD_TYPE: Release - GENERATOR: NMake Makefiles c_compiler: cl cpp_compiler: cl @@ -45,7 +44,7 @@ jobs: # Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make. # See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type run: > - cmake -G "${{env.GENERATOR}}" -B "${{steps.strings.outputs.build-output-dir}}" --install-prefix "${{github.workspace}}" -Wdev --warn-uninitialized --log-context -L + cmake -B "${{steps.strings.outputs.build-output-dir}}" --install-prefix "${{github.workspace}}" -Wdev --warn-uninitialized --log-context -L -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_CXX_COMPILER=${{env.cpp_compiler}} -DCMAKE_C_COMPILER=${{env.c_compiler}} From 792bb2253d8a5bb30685ef2d98762658a8d0a4ad Mon Sep 17 00:00:00 2001 From: ivansoft <32499694+ivansoft@users.noreply.github.com> Date: Mon, 10 Mar 2025 18:59:35 +0300 Subject: [PATCH 22/36] actions +Install step --- .github/workflows/cmake-single-platform.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/cmake-single-platform.yml b/.github/workflows/cmake-single-platform.yml index 779230b..362c0f3 100644 --- a/.github/workflows/cmake-single-platform.yml +++ b/.github/workflows/cmake-single-platform.yml @@ -53,6 +53,10 @@ jobs: - name: Build # Build your program with the given configuration run: cmake --build ${{steps.strings.outputs.build-output-dir}} --config ${{env.BUILD_TYPE}} + + - name: Install + # Build your program with the given configuration + run: cmake --install ${{steps.strings.outputs.build-output-dir}} # - name: Test # working-directory: ${{github.workspace}}/build From 9c0c0f3f2fde34e3f091186b91de88ab922cd53d Mon Sep 17 00:00:00 2001 From: ivansoft <32499694+ivansoft@users.noreply.github.com> Date: Mon, 10 Mar 2025 19:12:41 +0300 Subject: [PATCH 23/36] actions Zip step --- .github/workflows/cmake-single-platform.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/cmake-single-platform.yml b/.github/workflows/cmake-single-platform.yml index 362c0f3..bee7478 100644 --- a/.github/workflows/cmake-single-platform.yml +++ b/.github/workflows/cmake-single-platform.yml @@ -57,6 +57,11 @@ jobs: - name: Install # Build your program with the given configuration run: cmake --install ${{steps.strings.outputs.build-output-dir}} + + - name: Zip + shell: bash + run: | + zip --junk-paths bin lib include src.lua/README.txt # - name: Test # working-directory: ${{github.workspace}}/build From 2e101afd93673827b0d1e9574df609b5228d5aad Mon Sep 17 00:00:00 2001 From: ivansoft <32499694+ivansoft@users.noreply.github.com> Date: Mon, 10 Mar 2025 19:25:49 +0300 Subject: [PATCH 24/36] Zip -> Compress-Archive --- .github/workflows/cmake-single-platform.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/cmake-single-platform.yml b/.github/workflows/cmake-single-platform.yml index bee7478..b5b5527 100644 --- a/.github/workflows/cmake-single-platform.yml +++ b/.github/workflows/cmake-single-platform.yml @@ -59,10 +59,10 @@ jobs: run: cmake --install ${{steps.strings.outputs.build-output-dir}} - name: Zip - shell: bash - run: | - zip --junk-paths bin lib include src.lua/README.txt - + shell: powershell + run: Compress-Archive -Path bin include lib src.lua\README.txt -Destination artifact.zip + + # - name: Test # working-directory: ${{github.workspace}}/build # # Execute tests defined by the CMake configuration. From 330bf2889e573a923df97938e1b9add123b6767e Mon Sep 17 00:00:00 2001 From: ivansoft <32499694+ivansoft@users.noreply.github.com> Date: Mon, 10 Mar 2025 19:29:06 +0300 Subject: [PATCH 25/36] typo --- .github/workflows/cmake-single-platform.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cmake-single-platform.yml b/.github/workflows/cmake-single-platform.yml index b5b5527..25abc85 100644 --- a/.github/workflows/cmake-single-platform.yml +++ b/.github/workflows/cmake-single-platform.yml @@ -60,7 +60,7 @@ jobs: - name: Zip shell: powershell - run: Compress-Archive -Path bin include lib src.lua\README.txt -Destination artifact.zip + run: Compress-Archive -Path bin,include,lib,src.lua\README.txt -Destination artifact.zip # - name: Test From bcb35a8c2dc447490df8d4c8387c1d4e3716a358 Mon Sep 17 00:00:00 2001 From: ivansoft <32499694+ivansoft@users.noreply.github.com> Date: Mon, 10 Mar 2025 19:36:08 +0300 Subject: [PATCH 26/36] Upload Release Asset --- .github/workflows/cmake-single-platform.yml | 22 +++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/.github/workflows/cmake-single-platform.yml b/.github/workflows/cmake-single-platform.yml index 25abc85..2681f8e 100644 --- a/.github/workflows/cmake-single-platform.yml +++ b/.github/workflows/cmake-single-platform.yml @@ -37,6 +37,7 @@ jobs: run: | echo ${{ github.workspace }} echo ${{ runner.temp }} + echo ${{ github.ref }} echo $(pwd) echo $(ls -al) @@ -62,6 +63,27 @@ jobs: shell: powershell run: Compress-Archive -Path bin,include,lib,src.lua\README.txt -Destination artifact.zip + - name: Create Release + id: create_release + uses: actions/create-release@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + tag_name: ${{ github.ref }} + release_name: Release ${{ github.ref }} + draft: false + prerelease: false + - name: Upload Release Asset + id: upload-release-asset + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps + asset_path: ./artifact.zip + asset_name: artifact.zip + asset_content_type: application/zip + # - name: Test # working-directory: ${{github.workspace}}/build From 57e12d7ebfcc3e8fb95649fb29b42a65e1901357 Mon Sep 17 00:00:00 2001 From: ivansoft <32499694+ivansoft@users.noreply.github.com> Date: Mon, 10 Mar 2025 20:10:36 +0300 Subject: [PATCH 27/36] Cleanup --- .github/workflows/cmake-single-platform.yml | 41 --------------------- 1 file changed, 41 deletions(-) diff --git a/.github/workflows/cmake-single-platform.yml b/.github/workflows/cmake-single-platform.yml index 2681f8e..9393fa2 100644 --- a/.github/workflows/cmake-single-platform.yml +++ b/.github/workflows/cmake-single-platform.yml @@ -1,5 +1,3 @@ -# This starter workflow is for a CMake project running on a single platform. There is a different starter workflow if you need cross-platform coverage. -# See: https://github.com/actions/starter-workflows/blob/main/ci/cmake-multi-platform.yml name: CMake on a single platform on: @@ -9,16 +7,12 @@ on: branches: [ "v5.4.1" ] env: - # Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.) BUILD_TYPE: Release c_compiler: cl cpp_compiler: cl jobs: build: - # The CMake configure and build commands are platform agnostic and should work equally well on Windows or Mac. - # You can convert this to a matrix build if you need cross-platform coverage. - # See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix runs-on: windows-latest steps: @@ -32,18 +26,7 @@ jobs: run: | BUILD_DIR_NAME=cmake-build-${{env.BUILD_TYPE}}-${{runner.arch}}; echo "build-output-dir=${{github.workspace}}/${BUILD_DIR_NAME,,}" >> "$GITHUB_OUTPUT" - - name: Debug Info - shell: bash - run: | - echo ${{ github.workspace }} - echo ${{ runner.temp }} - echo ${{ github.ref }} - echo $(pwd) - echo $(ls -al) - - name: Configure CMake - # Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make. - # See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type run: > cmake -B "${{steps.strings.outputs.build-output-dir}}" --install-prefix "${{github.workspace}}" -Wdev --warn-uninitialized --log-context -L -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} @@ -52,39 +35,15 @@ jobs: -S "${{github.workspace}}" - name: Build - # Build your program with the given configuration run: cmake --build ${{steps.strings.outputs.build-output-dir}} --config ${{env.BUILD_TYPE}} - name: Install - # Build your program with the given configuration run: cmake --install ${{steps.strings.outputs.build-output-dir}} - name: Zip shell: powershell run: Compress-Archive -Path bin,include,lib,src.lua\README.txt -Destination artifact.zip - - name: Create Release - id: create_release - uses: actions/create-release@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - tag_name: ${{ github.ref }} - release_name: Release ${{ github.ref }} - draft: false - prerelease: false - - name: Upload Release Asset - id: upload-release-asset - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps - asset_path: ./artifact.zip - asset_name: artifact.zip - asset_content_type: application/zip - - # - name: Test # working-directory: ${{github.workspace}}/build # # Execute tests defined by the CMake configuration. From 7b8514e4830cf4407c138743283da06b2d177457 Mon Sep 17 00:00:00 2001 From: ivansoft <32499694+ivansoft@users.noreply.github.com> Date: Mon, 10 Mar 2025 20:11:28 +0300 Subject: [PATCH 28/36] Cleanup --- CMakeLists.txt | 6 ------ 1 file changed, 6 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 8562488..60bdfb0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -4,12 +4,6 @@ set ( CMAKE_C_STANDARD 99 ) set ( CMAKE_C_STANDARD_REQUIRED True ) include( version.cmake ) -include ( CMakePrintSystemInformation ) -include ( CMakePrintHelpers ) -cmake_print_variables ( - CMAKE_CURRENT_SOURCE_DIR - ) - add_compile_options( /W4 ) # -Wall set(CMAKE_BUILD_TYPE "Release" CACHE STRING "") From ce4e44bd095b316a527fbea1737ae414afa7ea3e Mon Sep 17 00:00:00 2001 From: ivansoft <32499694+ivansoft@users.noreply.github.com> Date: Mon, 10 Mar 2025 22:12:01 +0300 Subject: [PATCH 29/36] actions +on v5.3.5 branch --- .github/workflows/cmake-single-platform.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/cmake-single-platform.yml b/.github/workflows/cmake-single-platform.yml index 9393fa2..aeafd4f 100644 --- a/.github/workflows/cmake-single-platform.yml +++ b/.github/workflows/cmake-single-platform.yml @@ -2,9 +2,9 @@ name: CMake on a single platform on: push: - branches: [ "v5.4.1" ] + branches: [ "v5.4.1", "v5.3.5" ] pull_request: - branches: [ "v5.4.1" ] + branches: [ "v5.4.1", "v5.3.5" ] env: BUILD_TYPE: Release From 5a53f98bc25655160579366439f8280543fa8c9c Mon Sep 17 00:00:00 2001 From: ivansoft <32499694+ivansoft@users.noreply.github.com> Date: Mon, 10 Mar 2025 22:21:18 +0300 Subject: [PATCH 30/36] actions +release job --- .github/workflows/cmake-single-platform.yml | 23 +++++++++++++-------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/.github/workflows/cmake-single-platform.yml b/.github/workflows/cmake-single-platform.yml index aeafd4f..3f71092 100644 --- a/.github/workflows/cmake-single-platform.yml +++ b/.github/workflows/cmake-single-platform.yml @@ -6,15 +6,15 @@ on: pull_request: branches: [ "v5.4.1", "v5.3.5" ] -env: - BUILD_TYPE: Release - c_compiler: cl - cpp_compiler: cl - jobs: build: runs-on: windows-latest + env: + BUILD_TYPE: Release + c_compiler: cl + cpp_compiler: cl + steps: - uses: actions/checkout@v4 with: @@ -40,13 +40,18 @@ jobs: - name: Install run: cmake --install ${{steps.strings.outputs.build-output-dir}} - - name: Zip - shell: powershell - run: Compress-Archive -Path bin,include,lib,src.lua\README.txt -Destination artifact.zip - # - name: Test # working-directory: ${{github.workspace}}/build # # Execute tests defined by the CMake configuration. # # See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail # run: ctest -C ${{env.BUILD_TYPE}} + + release: + runs-on: windows-latest + needs: build + + steps: + - name: Zip + shell: powershell + run: Compress-Archive -Path bin,include,lib,src.lua\README.txt -Destination artifact.zip From abd2055b6a913f813af2d014af557d2f6f0c79cf Mon Sep 17 00:00:00 2001 From: ivansoft <32499694+ivansoft@users.noreply.github.com> Date: Mon, 10 Mar 2025 22:27:16 +0300 Subject: [PATCH 31/36] default work-directory --- .github/workflows/cmake-single-platform.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/cmake-single-platform.yml b/.github/workflows/cmake-single-platform.yml index 3f71092..7965cae 100644 --- a/.github/workflows/cmake-single-platform.yml +++ b/.github/workflows/cmake-single-platform.yml @@ -6,6 +6,10 @@ on: pull_request: branches: [ "v5.4.1", "v5.3.5" ] +defaults: + run: + working-directory: cmake_lua + jobs: build: runs-on: windows-latest From c7b49c899ece49b36e42c63b471450ccf8d23ba2 Mon Sep 17 00:00:00 2001 From: ivansoft <32499694+ivansoft@users.noreply.github.com> Date: Mon, 10 Mar 2025 22:31:39 +0300 Subject: [PATCH 32/36] revert default work-directory --- .github/workflows/cmake-single-platform.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.github/workflows/cmake-single-platform.yml b/.github/workflows/cmake-single-platform.yml index 7965cae..3f71092 100644 --- a/.github/workflows/cmake-single-platform.yml +++ b/.github/workflows/cmake-single-platform.yml @@ -6,10 +6,6 @@ on: pull_request: branches: [ "v5.4.1", "v5.3.5" ] -defaults: - run: - working-directory: cmake_lua - jobs: build: runs-on: windows-latest From de1e97bbf6678df6476884b8230adf4fdda9a8a8 Mon Sep 17 00:00:00 2001 From: ivansoft <32499694+ivansoft@users.noreply.github.com> Date: Mon, 10 Mar 2025 22:35:59 +0300 Subject: [PATCH 33/36] actions +upload-artifact +download-artifact --- .github/workflows/cmake-single-platform.yml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/.github/workflows/cmake-single-platform.yml b/.github/workflows/cmake-single-platform.yml index 3f71092..648a408 100644 --- a/.github/workflows/cmake-single-platform.yml +++ b/.github/workflows/cmake-single-platform.yml @@ -28,7 +28,7 @@ jobs: - name: Configure CMake run: > - cmake -B "${{steps.strings.outputs.build-output-dir}}" --install-prefix "${{github.workspace}}" -Wdev --warn-uninitialized --log-context -L + cmake -B "${{steps.strings.outputs.build-output-dir}}" --install-prefix "${{github.workspace}}/output" -Wdev --warn-uninitialized --log-context -L -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_CXX_COMPILER=${{env.cpp_compiler}} -DCMAKE_C_COMPILER=${{env.c_compiler}} @@ -45,12 +45,22 @@ jobs: # # Execute tests defined by the CMake configuration. # # See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail # run: ctest -C ${{env.BUILD_TYPE}} + + - uses: actions/upload-artifact@v4 + with: + name: build-output + path: ${{github.workspace}}/output release: runs-on: windows-latest needs: build steps: + - uses: actions/download-artifact@v4 + with: + name: build-output + path: ${{github.workspace}} + - name: Zip shell: powershell run: Compress-Archive -Path bin,include,lib,src.lua\README.txt -Destination artifact.zip From 5aa762927325ae1ce3d8998e003f73e91785c159 Mon Sep 17 00:00:00 2001 From: ivansoft <32499694+ivansoft@users.noreply.github.com> Date: Mon, 10 Mar 2025 22:44:10 +0300 Subject: [PATCH 34/36] actions +step Copy Files --- .github/workflows/cmake-single-platform.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/cmake-single-platform.yml b/.github/workflows/cmake-single-platform.yml index 648a408..fb25ff2 100644 --- a/.github/workflows/cmake-single-platform.yml +++ b/.github/workflows/cmake-single-platform.yml @@ -46,6 +46,11 @@ jobs: # # See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail # run: ctest -C ${{env.BUILD_TYPE}} + - name: Copy Files + shell: bash + run: | + cp -a src.lua/README.txt ${{github.workspace}}/output + - uses: actions/upload-artifact@v4 with: name: build-output From 1f844be37414498e23ced9eef33b6f7fba576651 Mon Sep 17 00:00:00 2001 From: ivansoft <32499694+ivansoft@users.noreply.github.com> Date: Mon, 10 Mar 2025 23:09:48 +0300 Subject: [PATCH 35/36] bash cp -> powershell Copy-Item bash needs cygpath call for paths --- .github/workflows/cmake-single-platform.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/cmake-single-platform.yml b/.github/workflows/cmake-single-platform.yml index fb25ff2..212abf9 100644 --- a/.github/workflows/cmake-single-platform.yml +++ b/.github/workflows/cmake-single-platform.yml @@ -47,9 +47,9 @@ jobs: # run: ctest -C ${{env.BUILD_TYPE}} - name: Copy Files - shell: bash + shell: powershell run: | - cp -a src.lua/README.txt ${{github.workspace}}/output + Copy-Item -Path "src.lua/README.txt" -Destination "${{github.workspace}}/output" - uses: actions/upload-artifact@v4 with: From 66171b38beb09131466accd724a5b4cf9d23877f Mon Sep 17 00:00:00 2001 From: ivansoft <32499694+ivansoft@users.noreply.github.com> Date: Mon, 10 Mar 2025 23:14:50 +0300 Subject: [PATCH 36/36] Release job remove src.lua --- .github/workflows/cmake-single-platform.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cmake-single-platform.yml b/.github/workflows/cmake-single-platform.yml index 212abf9..987801c 100644 --- a/.github/workflows/cmake-single-platform.yml +++ b/.github/workflows/cmake-single-platform.yml @@ -68,5 +68,5 @@ jobs: - name: Zip shell: powershell - run: Compress-Archive -Path bin,include,lib,src.lua\README.txt -Destination artifact.zip + run: Compress-Archive -Path bin,include,lib,README.txt -Destination artifact.zip