Skip to content

Commit

Permalink
[TEMP] Debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
alliepiper committed May 19, 2024
1 parent c23720e commit 1881af3
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 4 deletions.
6 changes: 5 additions & 1 deletion .github/actions/workflow-results/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,11 @@ runs:
continue-on-error: true
shell: bash --noprofile --norc -euo pipefail {0}
run: |
echo "Generating job summary..."
echo "Generating execution summary..."
echo "::group::Job artifacts"
pwd
find jobs
echo "::endgroup::"
python3 "${GITHUB_ACTION_PATH}/prepare-execution-summary.py" workflow/workflow.json results/job_times.json
- name: Prepare final summary
Expand Down
16 changes: 13 additions & 3 deletions .github/actions/workflow-results/prepare-execution-summary.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,12 @@ def extract_jobs(workflow):
@functools.lru_cache(maxsize=None)
def get_sccache_stats(job_id):
sccache_file = f'jobs/{job_id}/sccache_stats.json'
print()
print(f'Checking for file {sccache_file}, job {job_id}')
if os.path.exists(sccache_file):
print(f'Found file {sccache_file}')
with open(sccache_file) as f:
print(f.read())
with open(sccache_file) as f:
return json.load(f)
return None
Expand Down Expand Up @@ -76,7 +81,12 @@ def update_summary_entry(entry, job, job_times=None):
entry['job_time'] += job_time
entry['step_time'] += command_time

sccache_stats = get_sccache_stats(job["id"])
try:
sccache_stats = get_sccache_stats(job["id"])
except:
print(f'Error getting sccache stats for job:\n{job}')
raise

if sccache_stats:
sccache_stats = sccache_stats['stats']
requests = sccache_stats.get('compile_requests', 0)
Expand Down Expand Up @@ -183,13 +193,13 @@ def get_summary_stats(summary):
percent = int(100 * passed / total) if total > 0 else 0
fail_string = f'Pass: {percent:>3}%/{total}'

stats = f'{fail_string:<21}'
stats = f'{fail_string:<14}'

if 'job_time' in summary and total > 0 and summary['job_time'] > 0:
job_time = summary['job_time']
total_job_duration = format_seconds(job_time)
avg_job_duration = format_seconds(job_time / total)
stats += f' | Total Time: {total_job_duration:>7} | Avg Time: {avg_job_duration:>6}'
stats += f' | Total Time: {total_job_duration:>7} | Avg Time: {avg_job_duration:>7}'

if 'sccache' in summary:
sccache = summary['sccache']
Expand Down
3 changes: 3 additions & 0 deletions ci/matrix.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@ workflows:
# - {jobs: ['build'], project['thrust'], std: 17, ctk: *ctk_curr, cxx: [*gcc12, *llvm16]}
#
override:
- {jobs: ['test'], project: ['libcudacxx', 'thrust'], std: '17', cxx: [*gcc12, *llvm16]}
- {jobs: ['build'], project: ['libcudacxx', 'thrust'], std: '17', cxx: *msvc2022}
- {jobs: ['infra'], project: 'cccl', ctk: *ctk_11_1, cxx: [*gcc-oldest, *llvm-oldest]}

pull_request:
# default_projects: nvcc
Expand Down

0 comments on commit 1881af3

Please sign in to comment.