diff --git a/.github/common/msvs_file_check.py b/.github/common/msvs_vfproj_check.py similarity index 55% rename from .github/common/msvs_file_check.py rename to .github/common/msvs_vfproj_check.py index b644ea4480c..b5b1f165080 100644 --- a/.github/common/msvs_file_check.py +++ b/.github/common/msvs_vfproj_check.py @@ -27,26 +27,45 @@ def get_msvs_files(vfproj_file): return msvs_files -if __name__ == "__main__": - - # get list of source files and files in msvs project files - src_files = get_source_files("src") - msvs_files = [] - for vfproj in ["./msvs/mf6core.vfproj", "./msvs/mf6.vfproj"]: - msvs_files.extend(get_msvs_files(vfproj)) - - print(f"Verifying src files are in msvs project files...") +def check_files(name, src_files, msvs_files): + print(f"Verifying {name} src files are referenced in msvs project files...") number_failures = 0 for f in src_files: if f not in msvs_files: print(f"{f} not found in msvs project file") number_failures += 1 - print(f"Verifying msvs project files are in src folder...") + print(f"Verifying {name} files referenced in msvs project files are in src folder...") for f in msvs_files: if f not in src_files: print(f"{f} not found in src folder") number_failures += 1 - assert number_failures == 0, "msvs project files not up to date..." - print ("msvs project files appear up to date...") \ No newline at end of file + return number_failures + + +def check_mf6(): + # get list of source files and files referenced in msvs project files + src_files = get_source_files("src") + msvs_files = [] + for vfproj in ["./msvs/mf6core.vfproj", "./msvs/mf6.vfproj"]: + msvs_files.extend(get_msvs_files(vfproj)) + number_failures = check_files("MF6", src_files, msvs_files) + assert number_failures == 0, "MF6 msvs project files not up to date..." + + +def check_bmi(): + # get list of source files and files referenced in msvs project files + src_files = get_source_files("srcbmi") + msvs_files = [] + for vfproj in ["./msvs/mf6bmi.vfproj"]: + msvs_files.extend(get_msvs_files(vfproj)) + number_failures = check_files("BMI", src_files, msvs_files) + assert number_failures == 0, "BMI msvs project files not up to date..." + + +if __name__ == "__main__": + + check_mf6() + check_bmi() + print ("msvs project (vfproj) files appear up-to-date...") \ No newline at end of file diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 80c0864c2e9..fe957fc087e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -61,7 +61,7 @@ jobs: - name: Check Fortran source formatting run: python .github/common/fortran_format_check.py - - name: Check msvs project files are valid + - name: Check msvs project files run: python .github/common/msvs_file_check.py build: