-
Notifications
You must be signed in to change notification settings - Fork 151
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix and improve CI Testing of database shader (#245)
- Loading branch information
1 parent
2f7460f
commit f162d0d
Showing
2 changed files
with
28 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import os | ||
import sys | ||
import argparse | ||
import subprocess | ||
|
||
if __name__ == '__main__': | ||
parser = argparse.ArgumentParser(description='run SPIRV-Database in CI') | ||
# Main reason for passing dir in is so GitHub Actions can group things, otherwise logs get VERY long for a single action | ||
parser.add_argument('--dir', action='store', required=True, type=str, help='path to SPIR-V files') | ||
args = parser.parse_args() | ||
|
||
root_dir = os.path.abspath(os.path.join(os.path.dirname(__file__), '..')) | ||
exe_path = os.path.join(root_dir, 'bin/spirv-reflect') | ||
|
||
for currentpath, folders, files in os.walk(args.dir): | ||
for file in files: | ||
spirv_file = os.path.join(currentpath, file) | ||
command = f'{exe_path} {spirv_file} -ci' | ||
exit_code = subprocess.call(command.split()) | ||
if exit_code != 0: | ||
print(f'ERROR for {spirv_file}') | ||
sys.exit(1) |