Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure tracked generated files are rebuilt in tests #35

Merged
merged 1 commit into from
Aug 26, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion .github/workflows/msbuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
Loading