From 7ca2c7de84b182123331b1a83e3d9e7950e57cfd Mon Sep 17 00:00:00 2001 From: mario4tier Date: Tue, 14 Jan 2025 19:01:35 -0500 Subject: [PATCH] CI: Remove vcvaralls.bat call in GHA. Done by package.py instead. --- .github/workflows/dev-nightly-tests.yml | 10 +++++----- .github/workflows/main-nightly-tests.yml | 10 +++++----- scripts/package.py | 11 ++++++++++- 3 files changed, 20 insertions(+), 11 deletions(-) diff --git a/.github/workflows/dev-nightly-tests.yml b/.github/workflows/dev-nightly-tests.yml index 5d63550a..114ec210 100644 --- a/.github/workflows/dev-nightly-tests.yml +++ b/.github/workflows/dev-nightly-tests.yml @@ -56,10 +56,10 @@ jobs: if: runner.os == 'Windows' shell: cmd run: | - call "C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe" -latest -products * -requires Microsoft.Component.MSBuild -find MSBuild\**\Bin\MSBuild.exe > msbuild_path.txt - set /p MSBUILD_PATH=> %GITHUB_ENV% + :: call "C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe" -latest -products * -requires Microsoft.Component.MSBuild -find MSBuild\**\Bin\MSBuild.exe > msbuild_path.txt + :: set /p MSBUILD_PATH=> %GITHUB_ENV% echo PYTHON=python >> %GITHUB_ENV% - name: Build dist assets (Windows x64) @@ -68,7 +68,7 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} shell: cmd run: | - call "%VCVARSALL%" x64 + :: call "%VCVARSALL%" x64 dotnet tool install --global wix set PATH=%PATH%;%USERPROFILE%\.dotnet\tools wix extension add --global WixToolset.UI.wixext diff --git a/.github/workflows/main-nightly-tests.yml b/.github/workflows/main-nightly-tests.yml index 56d662dc..8d0c17c7 100644 --- a/.github/workflows/main-nightly-tests.yml +++ b/.github/workflows/main-nightly-tests.yml @@ -58,10 +58,10 @@ jobs: if: runner.os == 'Windows' shell: cmd run: | - call "C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe" -latest -products * -requires Microsoft.Component.MSBuild -find MSBuild\**\Bin\MSBuild.exe > msbuild_path.txt - set /p MSBUILD_PATH=> %GITHUB_ENV% + :: call "C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe" -latest -products * -requires Microsoft.Component.MSBuild -find MSBuild\**\Bin\MSBuild.exe > msbuild_path.txt + :: set /p MSBUILD_PATH=> %GITHUB_ENV% echo PYTHON=python >> %GITHUB_ENV% - name: Build dist assets (Windows x64) @@ -70,7 +70,7 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} shell: cmd run: | - call "%VCVARSALL%" x64 + :: call "%VCVARSALL%" x64 dotnet tool install --global wix set PATH=%PATH%;%USERPROFILE%\.dotnet\tools wix extension add --global WixToolset.UI.wixext diff --git a/scripts/package.py b/scripts/package.py index 2ad59f81..5a5e82ba 100755 --- a/scripts/package.py +++ b/scripts/package.py @@ -712,6 +712,13 @@ def update_package_digest(root_dir: str, results: dict, sources_digest: str, bui print(f"Error: {asset_file_name} not successfully build.") fatal_error = True + + # If a github action, then reflect that the bot user did process that digest. + # The behavior is different for local devs for which we prefer to minimize rebuilds... + git_user_name = get_git_user_name() + if os.getenv('GITHUB_ACTIONS') == 'true': + pdigest.builder_id = git_user_name + # Double check with some simple rules: # - tests should never be "pass" if the build was not successful. # - If a digest says the build was successful, then the md5 and sources_digest should always match. @@ -741,7 +748,9 @@ def update_package_digest(root_dir: str, results: dict, sources_digest: str, bui pdigest.clear_tests() if pdigest != pdigest_copy: - print(f"Info: {asset_file_name} digest file updated.") + # Writing a change, and keep track of the user that made it. + pdigest.builder_id = git_user_name + print(f"Info: {asset_file_name} digest file updated by {git_user_name}") pdigest.write() if fatal_error: