From 74340503966c545b73972024842bb3c68c3d8536 Mon Sep 17 00:00:00 2001 From: ArkadiuszMichalski <2730894+ArkadiuszMichalski@users.noreply.github.com> Date: Tue, 23 Apr 2024 16:13:37 +0200 Subject: [PATCH 01/27] Update CI_build.yml --- .github/workflows/CI_build.yml | 69 +++++++++++++++++++++++++++------- 1 file changed, 55 insertions(+), 14 deletions(-) diff --git a/.github/workflows/CI_build.yml b/.github/workflows/CI_build.yml index 5a5c238f3219..cac5faff1703 100644 --- a/.github/workflows/CI_build.yml +++ b/.github/workflows/CI_build.yml @@ -1,6 +1,10 @@ name: CI_build on: [push, pull_request] +env: + PYTHON_ALLOW_CACHE: true + MSYS2_ALLOW_UPDATE: true + MSYS2_ALLOW_CACHE: true jobs: before_build: @@ -9,6 +13,8 @@ jobs: outputs: result: ${{ steps.filter.outputs.result }} matrix: ${{ steps.filter.outputs.matrix }} + title: ${{ steps.filter.outputs.title }} + python: ${{ steps.filter.outputs.python }} steps: - name: Checkout repo @@ -40,6 +46,7 @@ jobs: } $commit_title = ($commit_message -split "[\r\n]+")[0] + Write-Output "title=$commit_title" >> $env:GITHUB_OUTPUT $files_modified = @(git diff --name-only HEAD~1) $files_needwork_all = @($files_modified | Where-Object {$_ -notmatch "\.(xml|$files_nowork)$|$folders_nowork|$folders_onejob" -or $_ -match "($files_needwork)$"}) @@ -58,18 +65,9 @@ jobs: Write-Output "result=OK" >> $env:GITHUB_OUTPUT } else { - Write-Output "XML validation mode`n" + Write-Output "Run only XML validation step" if (@($files_modified | Where-Object {$_ -match $folders_onejob}).length -eq 0) { - python -m pip install requests rfc3987 pywin32 lxml - python PowerEditor\Test\xmlValidator\validator_xml.py - if ($LastExitCode -eq 0) { - Write-Output "`nAll XML files are valid.`n" - Write-Output "result=OK" >> $env:GITHUB_OUTPUT - } - else { - Write-Output "`nSome XML files are invalid.`n" - $host.SetShouldExit($LastExitCode) - } + Write-Output "result=XML" >> $env:GITHUB_OUTPUT } else { Write-Output "Run only one Win32/Debug job" @@ -87,11 +85,54 @@ jobs: Write-Output "Run standard jobs" } + if ($Env:PYTHON_ALLOW_CACHE -eq "true"){ + $python = ((python -V) -split " ")[1] + $requests = (Invoke-RestMethod https://pypi.org/pypi/requests/json).info.version + $rfc3987 = (Invoke-RestMethod https://pypi.org/pypi/rfc3987/json).info.version + $pywin32 = (Invoke-RestMethod https://pypi.org/pypi/pywin32/json).info.version + $lxml = (Invoke-RestMethod https://pypi.org/pypi/lxml/json).info.version + Write-Output "python=python_$python-rfc3987_$rfc3987-pywin32_$pywin32-lxml_$lxml" >> $env:GITHUB_OUTPUT + } + + - name: Restore Python cache + if: env.PYTHON_ALLOW_CACHE == 'true' && steps.filter.outputs.result == 'XML' + uses: actions/cache/restore@v4 + id: cache + with: + path: 'D:\.cache\python' + key: ${{ runner.os }}-${{ steps.filter.outputs.python }} + + - name: Install Python modules + # && jak sprawdzić czy istnieje cache o danym key? + if: env.PYTHON_ALLOW_CACHE == 'true' + run: python -m pip install --target D:\.cache\python requests rfc3987 pywin32 lxml + + - name: XML validation + if: steps.filter.outputs.result == 'XML' + run: | + $Env:PYTHONPATH="D:\.cache\python" + python PowerEditor\Test\xmlValidator\validator_xml.py + if ($LastExitCode -eq 0) { + Write-Output "`nAll XML files are valid.`n" + + } + else { + Write-Output "`nSome XML files are invalid.`n" + $host.SetShouldExit($LastExitCode) + } + + - name: Save Python cache + if: env.PYTHON_ALLOW_CACHE == 'true' && steps.cache.outputs.cache-hit != 'true' + uses: actions/cache/save@v4 + with: + path: 'D:\.cache\python' + key: ${{ runner.os }}-${{ steps.filter.outputs.python }} + build_windows: runs-on: windows-latest needs: before_build - if: needs.before_build.outputs.result == '' || needs.before_build.outputs.result == 'ONEJOB' + if: (needs.before_build.outputs.result == '' || needs.before_build.outputs.result == 'ONEJOB') && 0 strategy: fail-fast: false matrix: ${{ fromJSON(needs.before_build.outputs.matrix) }} @@ -212,7 +253,7 @@ jobs: runs-on: windows-latest needs: before_build - if: needs.before_build.outputs.result == '' + if: needs.before_build.outputs.result == '' && 0 strategy: matrix: include: @@ -266,7 +307,7 @@ jobs: runs-on: windows-latest needs: before_build - if: needs.before_build.outputs.result == '' + if: needs.before_build.outputs.result == '' && 0 strategy: fail-fast: false matrix: From 65aed4bd81eee401ca9e6ad49459184003a10976 Mon Sep 17 00:00:00 2001 From: ArkadiuszMichalski <2730894+ArkadiuszMichalski@users.noreply.github.com> Date: Tue, 23 Apr 2024 16:16:32 +0200 Subject: [PATCH 02/27] Update CI_build.yml --- .github/workflows/CI_build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/CI_build.yml b/.github/workflows/CI_build.yml index cac5faff1703..7d13b78c2590 100644 --- a/.github/workflows/CI_build.yml +++ b/.github/workflows/CI_build.yml @@ -95,7 +95,7 @@ jobs: } - name: Restore Python cache - if: env.PYTHON_ALLOW_CACHE == 'true' && steps.filter.outputs.result == 'XML' + if: env.PYTHON_ALLOW_CACHE == 'true' && steps.filter.outputs.result == 'XML' uses: actions/cache/restore@v4 id: cache with: From c22e5cc7b8cb9a63f37ac65adeacaefe8968ddf5 Mon Sep 17 00:00:00 2001 From: ArkadiuszMichalski <2730894+ArkadiuszMichalski@users.noreply.github.com> Date: Tue, 23 Apr 2024 16:21:41 +0200 Subject: [PATCH 03/27] [xml]Update CI_build.yml --- .github/workflows/CI_build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/CI_build.yml b/.github/workflows/CI_build.yml index 7d13b78c2590..cac5faff1703 100644 --- a/.github/workflows/CI_build.yml +++ b/.github/workflows/CI_build.yml @@ -95,7 +95,7 @@ jobs: } - name: Restore Python cache - if: env.PYTHON_ALLOW_CACHE == 'true' && steps.filter.outputs.result == 'XML' + if: env.PYTHON_ALLOW_CACHE == 'true' && steps.filter.outputs.result == 'XML' uses: actions/cache/restore@v4 id: cache with: From 86cb3726ae60484fcf80c2664e77e2ad26573263 Mon Sep 17 00:00:00 2001 From: ArkadiuszMichalski <2730894+ArkadiuszMichalski@users.noreply.github.com> Date: Tue, 23 Apr 2024 16:24:09 +0200 Subject: [PATCH 04/27] [force xml]Update CI_build.yml --- .github/workflows/CI_build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/CI_build.yml b/.github/workflows/CI_build.yml index cac5faff1703..7d13b78c2590 100644 --- a/.github/workflows/CI_build.yml +++ b/.github/workflows/CI_build.yml @@ -95,7 +95,7 @@ jobs: } - name: Restore Python cache - if: env.PYTHON_ALLOW_CACHE == 'true' && steps.filter.outputs.result == 'XML' + if: env.PYTHON_ALLOW_CACHE == 'true' && steps.filter.outputs.result == 'XML' uses: actions/cache/restore@v4 id: cache with: From 7203c8c13df92ccad643be848e0f6646e5f49d7d Mon Sep 17 00:00:00 2001 From: ArkadiuszMichalski <2730894+ArkadiuszMichalski@users.noreply.github.com> Date: Tue, 23 Apr 2024 17:20:55 +0200 Subject: [PATCH 05/27] Update CI_build.yml --- .github/workflows/CI_build.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/CI_build.yml b/.github/workflows/CI_build.yml index 7d13b78c2590..16f4593549f2 100644 --- a/.github/workflows/CI_build.yml +++ b/.github/workflows/CI_build.yml @@ -91,7 +91,10 @@ jobs: $rfc3987 = (Invoke-RestMethod https://pypi.org/pypi/rfc3987/json).info.version $pywin32 = (Invoke-RestMethod https://pypi.org/pypi/pywin32/json).info.version $lxml = (Invoke-RestMethod https://pypi.org/pypi/lxml/json).info.version - Write-Output "python=python_$python-rfc3987_$rfc3987-pywin32_$pywin32-lxml_$lxml" >> $env:GITHUB_OUTPUT + $key = python_$python-rfc3987_$rfc3987-pywin32_$pywin32-lxml_$lxml + Write-Output "python=$key" >> $env:GITHUB_OUTPUT + $needPythonCache = ((Invoke-WebRequest ${{ github.api_url }}/repos/${{ github.repository }}/actions/caches).content -notmatch "${{ runner.os }}-$key") + Write-Output "needPythonCache=$needPythonCache" >> $env:GITHUB_OUTPUT } - name: Restore Python cache @@ -105,7 +108,9 @@ jobs: - name: Install Python modules # && jak sprawdzić czy istnieje cache o danym key? if: env.PYTHON_ALLOW_CACHE == 'true' - run: python -m pip install --target D:\.cache\python requests rfc3987 pywin32 lxml + run: | + Write-Output ${{ steps.filter.outputs.needPythonCache }} + #python -m pip install --target D:\.cache\python requests rfc3987 pywin32 lxml - name: XML validation if: steps.filter.outputs.result == 'XML' From 4c1375658a61dd8108b71ff48946e3d3ac70dff2 Mon Sep 17 00:00:00 2001 From: ArkadiuszMichalski <2730894+ArkadiuszMichalski@users.noreply.github.com> Date: Tue, 23 Apr 2024 17:22:04 +0200 Subject: [PATCH 06/27] Update CI_build.yml --- .github/workflows/CI_build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/CI_build.yml b/.github/workflows/CI_build.yml index 16f4593549f2..0e6a5315b66c 100644 --- a/.github/workflows/CI_build.yml +++ b/.github/workflows/CI_build.yml @@ -91,7 +91,7 @@ jobs: $rfc3987 = (Invoke-RestMethod https://pypi.org/pypi/rfc3987/json).info.version $pywin32 = (Invoke-RestMethod https://pypi.org/pypi/pywin32/json).info.version $lxml = (Invoke-RestMethod https://pypi.org/pypi/lxml/json).info.version - $key = python_$python-rfc3987_$rfc3987-pywin32_$pywin32-lxml_$lxml + $key = "python_$python-rfc3987_$rfc3987-pywin32_$pywin32-lxml_$lxml" Write-Output "python=$key" >> $env:GITHUB_OUTPUT $needPythonCache = ((Invoke-WebRequest ${{ github.api_url }}/repos/${{ github.repository }}/actions/caches).content -notmatch "${{ runner.os }}-$key") Write-Output "needPythonCache=$needPythonCache" >> $env:GITHUB_OUTPUT From a07e4055002f1dfbe9297d74016484e4e76d2409 Mon Sep 17 00:00:00 2001 From: ArkadiuszMichalski <2730894+ArkadiuszMichalski@users.noreply.github.com> Date: Tue, 23 Apr 2024 17:25:08 +0200 Subject: [PATCH 07/27] Update CI_build.yml --- .github/workflows/CI_build.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/CI_build.yml b/.github/workflows/CI_build.yml index 0e6a5315b66c..9afa348f7953 100644 --- a/.github/workflows/CI_build.yml +++ b/.github/workflows/CI_build.yml @@ -95,6 +95,11 @@ jobs: Write-Output "python=$key" >> $env:GITHUB_OUTPUT $needPythonCache = ((Invoke-WebRequest ${{ github.api_url }}/repos/${{ github.repository }}/actions/caches).content -notmatch "${{ runner.os }}-$key") Write-Output "needPythonCache=$needPythonCache" >> $env:GITHUB_OUTPUT + + Write-Output (Invoke-WebRequest ${{ github.api_url }}/repos/${{ github.repository }}/actions/caches).content + Write-Output "${{ runner.os }}-$key" + Write-Output $needPythonCache + } - name: Restore Python cache From dff9b35aa9a093bec87736ca4c92d1444c5ed193 Mon Sep 17 00:00:00 2001 From: ArkadiuszMichalski <2730894+ArkadiuszMichalski@users.noreply.github.com> Date: Tue, 23 Apr 2024 17:31:33 +0200 Subject: [PATCH 08/27] Update CI_build.yml --- .github/workflows/CI_build.yml | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/.github/workflows/CI_build.yml b/.github/workflows/CI_build.yml index 9afa348f7953..e36b76fe967a 100644 --- a/.github/workflows/CI_build.yml +++ b/.github/workflows/CI_build.yml @@ -95,11 +95,6 @@ jobs: Write-Output "python=$key" >> $env:GITHUB_OUTPUT $needPythonCache = ((Invoke-WebRequest ${{ github.api_url }}/repos/${{ github.repository }}/actions/caches).content -notmatch "${{ runner.os }}-$key") Write-Output "needPythonCache=$needPythonCache" >> $env:GITHUB_OUTPUT - - Write-Output (Invoke-WebRequest ${{ github.api_url }}/repos/${{ github.repository }}/actions/caches).content - Write-Output "${{ runner.os }}-$key" - Write-Output $needPythonCache - } - name: Restore Python cache @@ -112,10 +107,9 @@ jobs: - name: Install Python modules # && jak sprawdzić czy istnieje cache o danym key? - if: env.PYTHON_ALLOW_CACHE == 'true' + if: env.PYTHON_ALLOW_CACHE == 'true' && steps.filter.outputs.needPythonCache == 'true' run: | - Write-Output ${{ steps.filter.outputs.needPythonCache }} - #python -m pip install --target D:\.cache\python requests rfc3987 pywin32 lxml + python -m pip install --target D:\.cache\python requests rfc3987 pywin32 lxml - name: XML validation if: steps.filter.outputs.result == 'XML' @@ -132,7 +126,7 @@ jobs: } - name: Save Python cache - if: env.PYTHON_ALLOW_CACHE == 'true' && steps.cache.outputs.cache-hit != 'true' + if: env.PYTHON_ALLOW_CACHE == 'true' && steps.filter.outputs.needPythonCache == 'true' uses: actions/cache/save@v4 with: path: 'D:\.cache\python' From 448ab25d62e8bfd6d7643eae58016a2c471ac01b Mon Sep 17 00:00:00 2001 From: ArkadiuszMichalski <2730894+ArkadiuszMichalski@users.noreply.github.com> Date: Tue, 23 Apr 2024 17:33:12 +0200 Subject: [PATCH 09/27] Update CI_build.yml --- .github/workflows/CI_build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/CI_build.yml b/.github/workflows/CI_build.yml index e36b76fe967a..bcce7f495224 100644 --- a/.github/workflows/CI_build.yml +++ b/.github/workflows/CI_build.yml @@ -29,7 +29,7 @@ jobs: $folders_nowork = "\.github/ISSUE_TEMPLATE" $files_nowork = "md|txt|log|ini" $files_needwork = "CMakeLists\.txt" - + $matrix_all = 'matrix={"build_configuration": ["Release", "Debug"], "build_platform": ["x64", "Win32", "ARM64"]}' $matrix_onejob = 'matrix={"build_configuration": ["Debug"], "build_platform": ["Win32"]}' Write-Output $matrix_all >> $env:GITHUB_OUTPUT From 4ad8770c2b9296edbe4660942b5296b087dd6a68 Mon Sep 17 00:00:00 2001 From: ArkadiuszMichalski <2730894+ArkadiuszMichalski@users.noreply.github.com> Date: Tue, 23 Apr 2024 17:34:54 +0200 Subject: [PATCH 10/27] [force xml]Update CI_build.yml --- .github/workflows/CI_build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/CI_build.yml b/.github/workflows/CI_build.yml index bcce7f495224..e36b76fe967a 100644 --- a/.github/workflows/CI_build.yml +++ b/.github/workflows/CI_build.yml @@ -29,7 +29,7 @@ jobs: $folders_nowork = "\.github/ISSUE_TEMPLATE" $files_nowork = "md|txt|log|ini" $files_needwork = "CMakeLists\.txt" - + $matrix_all = 'matrix={"build_configuration": ["Release", "Debug"], "build_platform": ["x64", "Win32", "ARM64"]}' $matrix_onejob = 'matrix={"build_configuration": ["Debug"], "build_platform": ["Win32"]}' Write-Output $matrix_all >> $env:GITHUB_OUTPUT From 1b6b61e7318b337ce11ebd9c1b821276dcbfb6ae Mon Sep 17 00:00:00 2001 From: ArkadiuszMichalski <2730894+ArkadiuszMichalski@users.noreply.github.com> Date: Tue, 23 Apr 2024 17:38:28 +0200 Subject: [PATCH 11/27] [force xml] Update CI_build.yml --- .github/workflows/CI_build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/CI_build.yml b/.github/workflows/CI_build.yml index e36b76fe967a..9669fbc301da 100644 --- a/.github/workflows/CI_build.yml +++ b/.github/workflows/CI_build.yml @@ -2,7 +2,7 @@ name: CI_build on: [push, pull_request] env: - PYTHON_ALLOW_CACHE: true + PYTHON_ALLOW_CACHE: false MSYS2_ALLOW_UPDATE: true MSYS2_ALLOW_CACHE: true From a80e63782e3766c1598db6dc06a4a1b3e43951fc Mon Sep 17 00:00:00 2001 From: ArkadiuszMichalski <2730894+ArkadiuszMichalski@users.noreply.github.com> Date: Tue, 23 Apr 2024 17:47:18 +0200 Subject: [PATCH 12/27] [force xml] Update CI_build.yml --- .github/workflows/CI_build.yml | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/.github/workflows/CI_build.yml b/.github/workflows/CI_build.yml index 9669fbc301da..d9e37cd19ee9 100644 --- a/.github/workflows/CI_build.yml +++ b/.github/workflows/CI_build.yml @@ -97,7 +97,7 @@ jobs: Write-Output "needPythonCache=$needPythonCache" >> $env:GITHUB_OUTPUT } - - name: Restore Python cache + - name: Restore Python modules from cache if: env.PYTHON_ALLOW_CACHE == 'true' && steps.filter.outputs.result == 'XML' uses: actions/cache/restore@v4 id: cache @@ -105,16 +105,27 @@ jobs: path: 'D:\.cache\python' key: ${{ runner.os }}-${{ steps.filter.outputs.python }} - - name: Install Python modules - # && jak sprawdzić czy istnieje cache o danym key? + - name: Install Python modules for cache if: env.PYTHON_ALLOW_CACHE == 'true' && steps.filter.outputs.needPythonCache == 'true' run: | python -m pip install --target D:\.cache\python requests rfc3987 pywin32 lxml + + - name: Save Python modules to cache + if: env.PYTHON_ALLOW_CACHE == 'true' && steps.filter.outputs.needPythonCache == 'true' + uses: actions/cache/save@v4 + with: + path: 'D:\.cache\python' + key: ${{ runner.os }}-${{ steps.filter.outputs.python }} - name: XML validation if: steps.filter.outputs.result == 'XML' run: | - $Env:PYTHONPATH="D:\.cache\python" + if ($Env:PYTHON_ALLOW_CACHE -eq "true") { + $Env:PYTHONPATH="D:\.cache\python" + } + else { + python -m pip install requests rfc3987 pywin32 lxml + } python PowerEditor\Test\xmlValidator\validator_xml.py if ($LastExitCode -eq 0) { Write-Output "`nAll XML files are valid.`n" @@ -125,13 +136,6 @@ jobs: $host.SetShouldExit($LastExitCode) } - - name: Save Python cache - if: env.PYTHON_ALLOW_CACHE == 'true' && steps.filter.outputs.needPythonCache == 'true' - uses: actions/cache/save@v4 - with: - path: 'D:\.cache\python' - key: ${{ runner.os }}-${{ steps.filter.outputs.python }} - build_windows: runs-on: windows-latest From 5e00a8f049b384af0ed389118ace804e6e2ab3fb Mon Sep 17 00:00:00 2001 From: ArkadiuszMichalski <2730894+ArkadiuszMichalski@users.noreply.github.com> Date: Tue, 23 Apr 2024 17:48:52 +0200 Subject: [PATCH 13/27] [force xml] Update CI_build.yml --- .github/workflows/CI_build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/CI_build.yml b/.github/workflows/CI_build.yml index d9e37cd19ee9..2e0a5da26009 100644 --- a/.github/workflows/CI_build.yml +++ b/.github/workflows/CI_build.yml @@ -2,7 +2,7 @@ name: CI_build on: [push, pull_request] env: - PYTHON_ALLOW_CACHE: false + PYTHON_ALLOW_CACHE: true MSYS2_ALLOW_UPDATE: true MSYS2_ALLOW_CACHE: true From 347edd77d922db25e33c7940e0d19b8c46bcfaa0 Mon Sep 17 00:00:00 2001 From: ArkadiuszMichalski <2730894+ArkadiuszMichalski@users.noreply.github.com> Date: Tue, 23 Apr 2024 17:50:50 +0200 Subject: [PATCH 14/27] Update CI_build.yml --- .github/workflows/CI_build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/CI_build.yml b/.github/workflows/CI_build.yml index 2e0a5da26009..b5ed64b5a453 100644 --- a/.github/workflows/CI_build.yml +++ b/.github/workflows/CI_build.yml @@ -97,7 +97,7 @@ jobs: Write-Output "needPythonCache=$needPythonCache" >> $env:GITHUB_OUTPUT } - - name: Restore Python modules from cache + - name: Restore Python modules for cache if: env.PYTHON_ALLOW_CACHE == 'true' && steps.filter.outputs.result == 'XML' uses: actions/cache/restore@v4 id: cache @@ -110,7 +110,7 @@ jobs: run: | python -m pip install --target D:\.cache\python requests rfc3987 pywin32 lxml - - name: Save Python modules to cache + - name: Save Python modules for cache if: env.PYTHON_ALLOW_CACHE == 'true' && steps.filter.outputs.needPythonCache == 'true' uses: actions/cache/save@v4 with: From 6a0cf8e684605410c7b97bf0c62f08b614d115a4 Mon Sep 17 00:00:00 2001 From: ArkadiuszMichalski <2730894+ArkadiuszMichalski@users.noreply.github.com> Date: Tue, 23 Apr 2024 17:52:25 +0200 Subject: [PATCH 15/27] Update CI_build.yml --- .github/workflows/CI_build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/CI_build.yml b/.github/workflows/CI_build.yml index b5ed64b5a453..a88047220f2e 100644 --- a/.github/workflows/CI_build.yml +++ b/.github/workflows/CI_build.yml @@ -29,7 +29,7 @@ jobs: $folders_nowork = "\.github/ISSUE_TEMPLATE" $files_nowork = "md|txt|log|ini" $files_needwork = "CMakeLists\.txt" - + $matrix_all = 'matrix={"build_configuration": ["Release", "Debug"], "build_platform": ["x64", "Win32", "ARM64"]}' $matrix_onejob = 'matrix={"build_configuration": ["Debug"], "build_platform": ["Win32"]}' Write-Output $matrix_all >> $env:GITHUB_OUTPUT From 5c3e8faefcbbf397a3208166960ac364d9c1d94b Mon Sep 17 00:00:00 2001 From: ArkadiuszMichalski <2730894+ArkadiuszMichalski@users.noreply.github.com> Date: Tue, 23 Apr 2024 17:57:11 +0200 Subject: [PATCH 16/27] Update CI_build.yml --- .github/workflows/CI_build.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/CI_build.yml b/.github/workflows/CI_build.yml index a88047220f2e..016a81cdc981 100644 --- a/.github/workflows/CI_build.yml +++ b/.github/workflows/CI_build.yml @@ -97,7 +97,7 @@ jobs: Write-Output "needPythonCache=$needPythonCache" >> $env:GITHUB_OUTPUT } - - name: Restore Python modules for cache + - name: \[cache\] Restore Python modules if: env.PYTHON_ALLOW_CACHE == 'true' && steps.filter.outputs.result == 'XML' uses: actions/cache/restore@v4 id: cache @@ -105,12 +105,12 @@ jobs: path: 'D:\.cache\python' key: ${{ runner.os }}-${{ steps.filter.outputs.python }} - - name: Install Python modules for cache + - name: \[cache\] Install Python modules if: env.PYTHON_ALLOW_CACHE == 'true' && steps.filter.outputs.needPythonCache == 'true' run: | python -m pip install --target D:\.cache\python requests rfc3987 pywin32 lxml - - name: Save Python modules for cache + - name: \[cache\] Save Python modules if: env.PYTHON_ALLOW_CACHE == 'true' && steps.filter.outputs.needPythonCache == 'true' uses: actions/cache/save@v4 with: From 9a4cc705a4e56da6377627916ce805c66a90cda1 Mon Sep 17 00:00:00 2001 From: ArkadiuszMichalski <2730894+ArkadiuszMichalski@users.noreply.github.com> Date: Tue, 23 Apr 2024 17:58:42 +0200 Subject: [PATCH 17/27] Update CI_build.yml --- .github/workflows/CI_build.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/CI_build.yml b/.github/workflows/CI_build.yml index 016a81cdc981..18b6aa981808 100644 --- a/.github/workflows/CI_build.yml +++ b/.github/workflows/CI_build.yml @@ -97,7 +97,7 @@ jobs: Write-Output "needPythonCache=$needPythonCache" >> $env:GITHUB_OUTPUT } - - name: \[cache\] Restore Python modules + - name: [cache] Restore Python modules if: env.PYTHON_ALLOW_CACHE == 'true' && steps.filter.outputs.result == 'XML' uses: actions/cache/restore@v4 id: cache @@ -105,12 +105,12 @@ jobs: path: 'D:\.cache\python' key: ${{ runner.os }}-${{ steps.filter.outputs.python }} - - name: \[cache\] Install Python modules + - name: [cache] Install Python modules if: env.PYTHON_ALLOW_CACHE == 'true' && steps.filter.outputs.needPythonCache == 'true' run: | python -m pip install --target D:\.cache\python requests rfc3987 pywin32 lxml - - name: \[cache\] Save Python modules + - name: [cache] Save Python modules if: env.PYTHON_ALLOW_CACHE == 'true' && steps.filter.outputs.needPythonCache == 'true' uses: actions/cache/save@v4 with: From cdb128a09ee9a064763b5276223a50dbb0802027 Mon Sep 17 00:00:00 2001 From: ArkadiuszMichalski <2730894+ArkadiuszMichalski@users.noreply.github.com> Date: Tue, 23 Apr 2024 18:03:06 +0200 Subject: [PATCH 18/27] Update CI_build.yml --- .github/workflows/CI_build.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/CI_build.yml b/.github/workflows/CI_build.yml index 18b6aa981808..8e9ecdde6585 100644 --- a/.github/workflows/CI_build.yml +++ b/.github/workflows/CI_build.yml @@ -85,7 +85,7 @@ jobs: Write-Output "Run standard jobs" } - if ($Env:PYTHON_ALLOW_CACHE -eq "true"){ + if ($Env:PYTHON_ALLOW_CACHE -eq "true") { $python = ((python -V) -split " ")[1] $requests = (Invoke-RestMethod https://pypi.org/pypi/requests/json).info.version $rfc3987 = (Invoke-RestMethod https://pypi.org/pypi/rfc3987/json).info.version @@ -97,7 +97,7 @@ jobs: Write-Output "needPythonCache=$needPythonCache" >> $env:GITHUB_OUTPUT } - - name: [cache] Restore Python modules + - name: (cache) Restore Python modules if: env.PYTHON_ALLOW_CACHE == 'true' && steps.filter.outputs.result == 'XML' uses: actions/cache/restore@v4 id: cache @@ -105,12 +105,12 @@ jobs: path: 'D:\.cache\python' key: ${{ runner.os }}-${{ steps.filter.outputs.python }} - - name: [cache] Install Python modules + - name: (cache) Install Python modules if: env.PYTHON_ALLOW_CACHE == 'true' && steps.filter.outputs.needPythonCache == 'true' run: | python -m pip install --target D:\.cache\python requests rfc3987 pywin32 lxml - - name: [cache] Save Python modules + - name: (cache) Save Python modules if: env.PYTHON_ALLOW_CACHE == 'true' && steps.filter.outputs.needPythonCache == 'true' uses: actions/cache/save@v4 with: From 5b954914c45d458349a15e895799e6b9ccd23c5b Mon Sep 17 00:00:00 2001 From: ArkadiuszMichalski <2730894+ArkadiuszMichalski@users.noreply.github.com> Date: Tue, 23 Apr 2024 18:04:05 +0200 Subject: [PATCH 19/27] [force xml] Update CI_build.yml --- .github/workflows/CI_build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/CI_build.yml b/.github/workflows/CI_build.yml index 8e9ecdde6585..49928dcb2cfa 100644 --- a/.github/workflows/CI_build.yml +++ b/.github/workflows/CI_build.yml @@ -15,7 +15,7 @@ jobs: matrix: ${{ steps.filter.outputs.matrix }} title: ${{ steps.filter.outputs.title }} python: ${{ steps.filter.outputs.python }} - + steps: - name: Checkout repo uses: actions/checkout@v4 From 62d550fba4d89b1cc3d5fe4ced7b77a0644a7e60 Mon Sep 17 00:00:00 2001 From: ArkadiuszMichalski <2730894+ArkadiuszMichalski@users.noreply.github.com> Date: Tue, 23 Apr 2024 20:12:40 +0200 Subject: [PATCH 20/27] Update CI_build.yml --- .github/workflows/CI_build.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/CI_build.yml b/.github/workflows/CI_build.yml index 49928dcb2cfa..63b0cc7a51c1 100644 --- a/.github/workflows/CI_build.yml +++ b/.github/workflows/CI_build.yml @@ -91,9 +91,9 @@ jobs: $rfc3987 = (Invoke-RestMethod https://pypi.org/pypi/rfc3987/json).info.version $pywin32 = (Invoke-RestMethod https://pypi.org/pypi/pywin32/json).info.version $lxml = (Invoke-RestMethod https://pypi.org/pypi/lxml/json).info.version - $key = "python_$python-rfc3987_$rfc3987-pywin32_$pywin32-lxml_$lxml" + $key = "${{ runner.os }}-python_$python-rfc3987_$rfc3987-pywin32_$pywin32-lxml_$lxml" Write-Output "python=$key" >> $env:GITHUB_OUTPUT - $needPythonCache = ((Invoke-WebRequest ${{ github.api_url }}/repos/${{ github.repository }}/actions/caches).content -notmatch "${{ runner.os }}-$key") + $needPythonCache = ((Invoke-WebRequest ${{ github.api_url }}/repos/${{ github.repository }}/actions/caches).content -notmatch "$key") Write-Output "needPythonCache=$needPythonCache" >> $env:GITHUB_OUTPUT } @@ -103,7 +103,7 @@ jobs: id: cache with: path: 'D:\.cache\python' - key: ${{ runner.os }}-${{ steps.filter.outputs.python }} + key: ${{ steps.filter.outputs.python }} - name: (cache) Install Python modules if: env.PYTHON_ALLOW_CACHE == 'true' && steps.filter.outputs.needPythonCache == 'true' @@ -115,7 +115,7 @@ jobs: uses: actions/cache/save@v4 with: path: 'D:\.cache\python' - key: ${{ runner.os }}-${{ steps.filter.outputs.python }} + key: ${{ steps.filter.outputs.python }} - name: XML validation if: steps.filter.outputs.result == 'XML' From 8ea5095296d5c7a649b810b0f6346a945eb07c0a Mon Sep 17 00:00:00 2001 From: ArkadiuszMichalski <2730894+ArkadiuszMichalski@users.noreply.github.com> Date: Tue, 23 Apr 2024 20:13:43 +0200 Subject: [PATCH 21/27] [force xml]Update CI_build.yml --- .github/workflows/CI_build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/CI_build.yml b/.github/workflows/CI_build.yml index 63b0cc7a51c1..5b49af2d8dd3 100644 --- a/.github/workflows/CI_build.yml +++ b/.github/workflows/CI_build.yml @@ -5,7 +5,7 @@ env: PYTHON_ALLOW_CACHE: true MSYS2_ALLOW_UPDATE: true MSYS2_ALLOW_CACHE: true - + jobs: before_build: From b8e7ac72cfe25aa9aaf57330ab99887df6c29d17 Mon Sep 17 00:00:00 2001 From: ArkadiuszMichalski <2730894+ArkadiuszMichalski@users.noreply.github.com> Date: Tue, 23 Apr 2024 20:34:57 +0200 Subject: [PATCH 22/27] [force none]Update CI_build.yml --- .github/workflows/CI_build.yml | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/.github/workflows/CI_build.yml b/.github/workflows/CI_build.yml index 5b49af2d8dd3..1b972ed63e28 100644 --- a/.github/workflows/CI_build.yml +++ b/.github/workflows/CI_build.yml @@ -21,6 +21,7 @@ jobs: uses: actions/checkout@v4 with: fetch-depth: ${{ github.event_name == 'pull_request' && 2 || 0 }} + - name: Commit filtering id: filter run: | @@ -63,6 +64,7 @@ jobs: if (@($files_modified | Where-Object {$_ -notmatch "\.($files_nowork)$|$folders_nowork"}).length -eq 0 -or $commit_title -match "\[force none\]") { Write-Output "Changed files on this commit don't require any additional tasks.`n" Write-Output "result=OK" >> $env:GITHUB_OUTPUT + Exit } else { Write-Output "Run only XML validation step" @@ -111,7 +113,7 @@ jobs: python -m pip install --target D:\.cache\python requests rfc3987 pywin32 lxml - name: (cache) Save Python modules - if: env.PYTHON_ALLOW_CACHE == 'true' && steps.filter.outputs.needPythonCache == 'true' + if: env.PYTHON_ALLOW_CACHE == 'true' && steps.filter.outputs.needPythonCache == 'true' && github.event_name == 'push' uses: actions/cache/save@v4 with: path: 'D:\.cache\python' @@ -140,7 +142,7 @@ jobs: runs-on: windows-latest needs: before_build - if: (needs.before_build.outputs.result == '' || needs.before_build.outputs.result == 'ONEJOB') && 0 + if: (needs.before_build.outputs.result == '' || needs.before_build.outputs.result == 'ONEJOB') strategy: fail-fast: false matrix: ${{ fromJSON(needs.before_build.outputs.matrix) }} @@ -198,14 +200,26 @@ jobs: name: Notepad++.MSVC.${{ matrix.build_platform}}.${{ matrix.build_configuration}} path: PowerEditor\visual.net\${{ matrix.build_configuration}}\Notepad++.exe + - name: (cache) Restore Python modules + if: matrix.build_platform == 'Win32' && matrix.build_configuration == 'Debug' && env.PYTHON_ALLOW_CACHE == 'true' + uses: actions/cache/restore@v4 + id: cache + with: + path: 'D:\.cache\python' + key: ${{ needs.before_build.outputs.python }} + - name: Run xml validation test for Win32 / Debug only if: matrix.build_platform == 'Win32' && matrix.build_configuration == 'Debug' working-directory: .\ run: | - python -m pip install requests rfc3987 pywin32 lxml + if ($Env:PYTHON_ALLOW_CACHE -eq "true") { + $Env:PYTHONPATH="D:\.cache\python" + } + else { + python -m pip install requests rfc3987 pywin32 lxml + } python PowerEditor\Test\xmlValidator\validator_xml.py - - name: Run FunctionList and UrlDetection Tests for Win32 / Debug only if: matrix.build_platform == 'Win32' && matrix.build_configuration == 'Debug' working-directory: .\ From 58af01e193a88e54f8f6031bbf45aafbb399403e Mon Sep 17 00:00:00 2001 From: ArkadiuszMichalski <2730894+ArkadiuszMichalski@users.noreply.github.com> Date: Tue, 23 Apr 2024 20:36:14 +0200 Subject: [PATCH 23/27] [force one]Update CI_build.yml --- .github/workflows/CI_build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/CI_build.yml b/.github/workflows/CI_build.yml index 1b972ed63e28..da594d4c76a0 100644 --- a/.github/workflows/CI_build.yml +++ b/.github/workflows/CI_build.yml @@ -8,7 +8,7 @@ env: jobs: before_build: - + runs-on: windows-latest outputs: result: ${{ steps.filter.outputs.result }} From 4a8cea924defa678fda82dc835d29b97a652945a Mon Sep 17 00:00:00 2001 From: ArkadiuszMichalski <2730894+ArkadiuszMichalski@users.noreply.github.com> Date: Tue, 23 Apr 2024 20:41:58 +0200 Subject: [PATCH 24/27] [force one]Update CI_build.yml --- .github/workflows/CI_build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/CI_build.yml b/.github/workflows/CI_build.yml index da594d4c76a0..1b972ed63e28 100644 --- a/.github/workflows/CI_build.yml +++ b/.github/workflows/CI_build.yml @@ -8,7 +8,7 @@ env: jobs: before_build: - + runs-on: windows-latest outputs: result: ${{ steps.filter.outputs.result }} From 587329b5bc911652f0ae17e3cae0dfc0a6cf1ee9 Mon Sep 17 00:00:00 2001 From: ArkadiuszMichalski <2730894+ArkadiuszMichalski@users.noreply.github.com> Date: Tue, 23 Apr 2024 20:49:14 +0200 Subject: [PATCH 25/27] [force xml] Update CI_build.yml --- .github/workflows/CI_build.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/CI_build.yml b/.github/workflows/CI_build.yml index 1b972ed63e28..d7efdbc54643 100644 --- a/.github/workflows/CI_build.yml +++ b/.github/workflows/CI_build.yml @@ -95,8 +95,8 @@ jobs: $lxml = (Invoke-RestMethod https://pypi.org/pypi/lxml/json).info.version $key = "${{ runner.os }}-python_$python-rfc3987_$rfc3987-pywin32_$pywin32-lxml_$lxml" Write-Output "python=$key" >> $env:GITHUB_OUTPUT - $needPythonCache = ((Invoke-WebRequest ${{ github.api_url }}/repos/${{ github.repository }}/actions/caches).content -notmatch "$key") - Write-Output "needPythonCache=$needPythonCache" >> $env:GITHUB_OUTPUT + $needSavePythonCache = ((Invoke-WebRequest ${{ github.api_url }}/repos/${{ github.repository }}/actions/caches).content -notmatch "$key") + Write-Output "needSavePythonCache=$needSavePythonCache" >> $env:GITHUB_OUTPUT } - name: (cache) Restore Python modules @@ -108,12 +108,12 @@ jobs: key: ${{ steps.filter.outputs.python }} - name: (cache) Install Python modules - if: env.PYTHON_ALLOW_CACHE == 'true' && steps.filter.outputs.needPythonCache == 'true' + if: env.PYTHON_ALLOW_CACHE == 'true' && steps.filter.outputs.needSavePythonCache == 'true' run: | python -m pip install --target D:\.cache\python requests rfc3987 pywin32 lxml - name: (cache) Save Python modules - if: env.PYTHON_ALLOW_CACHE == 'true' && steps.filter.outputs.needPythonCache == 'true' && github.event_name == 'push' + if: env.PYTHON_ALLOW_CACHE == 'true' && steps.filter.outputs.needSavePythonCache == 'true' && github.event_name == 'push' uses: actions/cache/save@v4 with: path: 'D:\.cache\python' From fe39f354fc869bc6a3be909beebba27429559f5a Mon Sep 17 00:00:00 2001 From: ArkadiuszMichalski <2730894+ArkadiuszMichalski@users.noreply.github.com> Date: Tue, 23 Apr 2024 20:50:57 +0200 Subject: [PATCH 26/27] [force none]Update CI_build.yml --- .github/workflows/CI_build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/CI_build.yml b/.github/workflows/CI_build.yml index d7efdbc54643..eb37bfef12c1 100644 --- a/.github/workflows/CI_build.yml +++ b/.github/workflows/CI_build.yml @@ -200,7 +200,7 @@ jobs: name: Notepad++.MSVC.${{ matrix.build_platform}}.${{ matrix.build_configuration}} path: PowerEditor\visual.net\${{ matrix.build_configuration}}\Notepad++.exe - - name: (cache) Restore Python modules + - name: (cache) Restore Python modules for Win32 / Debug if: matrix.build_platform == 'Win32' && matrix.build_configuration == 'Debug' && env.PYTHON_ALLOW_CACHE == 'true' uses: actions/cache/restore@v4 id: cache From 70dc5dd825d6882a5e9a3579d6cdc3379ff63472 Mon Sep 17 00:00:00 2001 From: ArkadiuszMichalski <2730894+ArkadiuszMichalski@users.noreply.github.com> Date: Tue, 23 Apr 2024 20:54:13 +0200 Subject: [PATCH 27/27] Update CI_build.yml --- .github/workflows/CI_build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/CI_build.yml b/.github/workflows/CI_build.yml index eb37bfef12c1..8bf92c184ad4 100644 --- a/.github/workflows/CI_build.yml +++ b/.github/workflows/CI_build.yml @@ -8,7 +8,7 @@ env: jobs: before_build: - + runs-on: windows-latest outputs: result: ${{ steps.filter.outputs.result }}