diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index bc6a0da..1d862e0 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -18,11 +18,20 @@ jobs: uses: actions/setup-python@v5 with: python-version: '3.x' - cache: 'pip' - - name: Install dependencies + # cache: 'pip' + - uses: actions/cache@v4 + id: cache-venv + with: + path: venv + key: setup-venv2-${{ runner.os }}-py-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('requirements.txt') }} + restore-keys: | + setup-venv2-${{ runner.os }}-py-${{ steps.setup-python.outputs.python-version }}- + - name: Setup venv run: | - python -m pip install --upgrade pip setuptools wheel - pip install -r requirements.txt + python -m venv venv + venv/Scripts/python.exe -m pip install --upgrade pip setuptools wheel + venv/Scripts/python.exe -m pip install -r requirements.txt + if: steps.cache-venv.outputs.cache-hit != 'true' - uses: ilammy/msvc-dev-cmd@v1 with: arch: win32 @@ -38,7 +47,8 @@ jobs: - name: "cmake install" shell: cmd run: cd build && cmake --install . - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 with: name: flame path: install/ + if-no-files-found: error diff --git a/CMakeLists.txt b/CMakeLists.txt index ad726cd..de00a08 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -8,7 +8,6 @@ option(USE_CONFIGURE_DATE "Add configure date marker in output build") # generate pdb to use debuggers with release builds string(APPEND CMAKE_EXE_LINKER_FLAGS_RELEASE " /debug") -find_package(Python3 COMPONENTS Interpreter REQUIRED) # force using python through venv if(EXISTS ${CMAKE_CURRENT_LIST_DIR}/venv/Scripts/python.exe) set(Python3_EXECUTABLE "${CMAKE_CURRENT_LIST_DIR}/venv/Scripts/python.exe") @@ -16,6 +15,7 @@ if(EXISTS ${CMAKE_CURRENT_LIST_DIR}/venv/Scripts/python.exe) execute_process(COMMAND ${Python3_EXECUTABLE} -c "import git" RESULT_VARIABLE EXIT_CODE OUTPUT_QUIET) else () # create venv + find_package(Python3 COMPONENTS Interpreter REQUIRED) execute_process(COMMAND_ECHO STDOUT COMMAND ${Python3_EXECUTABLE} -m venv ${CMAKE_CURRENT_LIST_DIR}/venv ) set(Python3_EXECUTABLE "${CMAKE_CURRENT_LIST_DIR}/venv/Scripts/python.exe") set(EXIT_CODE 1) @@ -86,9 +86,6 @@ set(OUTPUT_SUFFIX "-${VER_PRODUCT_NUMBER}.${VER_PRODUCT_VERSION}.${VER_BUILD_NUM if(CONFIGURE_DATE) string(APPEND OUTPUT_SUFFIX "-${CONFIGURE_DATE}") endif () -if(GIT_SHA1) - string(APPEND OUTPUT_SUFFIX "-${GIT_SHORT_SHA1}") -endif() add_subdirectory(src) install(TARGETS dkii_flame RUNTIME DESTINATION ".") diff --git a/apply_patches.py b/apply_patches.py index 3fad33f..54da123 100644 --- a/apply_patches.py +++ b/apply_patches.py @@ -56,6 +56,9 @@ def main(): repo = git.Repo.init(repo_dir, initial_branch='main') except git.exc.GitError: repo = git.Repo.init(repo_dir, initial_branch='main') + with repo.config_writer() as w: + w.set_value("user", "name", "ember") + w.set_value("user", "email", "ember@users.noreply.github.com") os.chdir(repo.working_dir) # repo.git.am("--3way", *[f"../patches/{file.name}" for file in patches]) diff --git a/rebuild_patches.py b/rebuild_patches.py index a277ac2..4bc85aa 100644 --- a/rebuild_patches.py +++ b/rebuild_patches.py @@ -30,7 +30,7 @@ def cleanup_line(line: str): def cleanup_patch(file: pathlib.Path): - print('cleanup ', file) + print('cleanup', file) with open(file, 'r') as f: lines = f.readlines()