From 4a1b4c1e8828fab249e7bc2db68d0da74e339384 Mon Sep 17 00:00:00 2001 From: Kyle Benesch <4b796c65+github@gmail.com> Date: Mon, 26 Aug 2024 14:50:59 -0700 Subject: [PATCH] Clean generated files Current builds were assuming that generated files are already built based on their timestamps, which prevents testing newly updated generated files. This manually deletes the generated files to be tested. --- .github/workflows/msbuild.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/msbuild.yml b/.github/workflows/msbuild.yml index 27212f9..ffc8afc 100644 --- a/.github/workflows/msbuild.yml +++ b/.github/workflows/msbuild.yml @@ -12,6 +12,8 @@ on: env: # Path to the solution file relative to the root of the project. SOLUTION_FILE_PATH: build\Incursion.sln + # Generated files to clean and check + GENERATED_FILES: src/tokens.cpp src/yygram.cpp inc/yygram.h permissions: contents: read @@ -37,13 +39,18 @@ jobs: 7z x libtcod-*.zip popd + - name: Clean generated files + if: matrix.platform == 'Win32' && matrix.configuration == 'Debug' + shell: bash + run: rm -v ${{env.GENERATED_FILES}} + - name: Build # Add additional options to the MSBuild command line here (like platform or verbosity level). # See https://docs.microsoft.com/visualstudio/msbuild/msbuild-command-line-reference run: msbuild /m /p:Configuration=${{matrix.configuration}} /p:Platform=${{matrix.platform}} ${{env.SOLUTION_FILE_PATH}} - name: Verify generated files - run: git diff --exit-code src/tokens.cpp src/yygram.cpp inc/yygram.h + run: git diff --exit-code ${{env.GENERATED_FILES}} - name: Copy binaries to project root shell: bash