Skip to content

Add memory usage check to GitHub Actions workflow#75

Merged
bqminh merged 16 commits intoiqtree:masterfrom
Hashara:gitworkflow-memcheck
Sep 30, 2025
Merged

Add memory usage check to GitHub Actions workflow#75
bqminh merged 16 commits intoiqtree:masterfrom
Hashara:gitworkflow-memcheck

Conversation

@Hashara
Copy link
Collaborator

@Hashara Hashara commented Jul 3, 2025

No description provided.

@Hashara Hashara requested a review from bqminh July 3, 2025 14:55
@Hashara Hashara self-assigned this Jul 3, 2025
@Hashara Hashara force-pushed the gitworkflow-memcheck branch from 56834e0 to 9fc0606 Compare July 4, 2025 00:41
@Hashara Hashara force-pushed the gitworkflow-memcheck branch from 9fc0606 to c9c09f4 Compare July 4, 2025 00:57
@Hashara Hashara marked this pull request as ready for review July 4, 2025 01:15
Copy link
Member

@bqminh bqminh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

change memory-arg and runtime-arg to column name instead of column ID, easier to read and more general.
Use 'real' time to measure wall-clock time, not user time or log file of iqtree.
Document verify_runtime.sh and verify_memory.sh, what arguments do they take as input.

@Hashara Hashara requested a review from Copilot July 7, 2025 00:31

This comment was marked as outdated.

Hashara added 3 commits July 7, 2025 11:00
update expected_memory.tsv for failing values
update the verify_runtime.sh to check with usr/bin/time
@Hashara Hashara force-pushed the gitworkflow-memcheck branch from f8e84d5 to ee115db Compare July 7, 2025 02:21
@Hashara Hashara force-pushed the gitworkflow-memcheck branch from 1832f84 to 57e62c9 Compare July 7, 2025 03:42
@Hashara Hashara requested a review from Copilot July 7, 2025 03:42
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR integrates memory usage checks into the existing CI workflows alongside runtime checks.

  • Adds verify_memory.sh and verify_memory.ps1 scripts to validate peak memory against thresholds.
  • Refactors verify_runtime.sh/.ps1 and test runners (test_iqtree.sh/.ps1) to log both real time and memory.
  • Updates .github/workflows/ci.yaml to invoke memory verification for each build matrix entry.

Reviewed Changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
test_scripts/verify_runtime.sh Refactored shell runtime check to use named columns and combine logs.
test_scripts/verify_runtime.ps1 Updated PowerShell runtime verification to use column names.
test_scripts/verify_memory.sh New shell script to verify memory usage against thresholds.
test_scripts/verify_memory.ps1 New PowerShell script for memory verification.
test_scripts/test_iqtree.sh Enhanced shell test runner to log both runtime and peak memory.
test_scripts/test_iqtree.ps1 Added Measure-IQTree function to capture time and memory in PowerShell.
test_scripts/test_data/expected_runtime.tsv Added expected runtime threshold data.
test_scripts/test_data/expected_memory.tsv Added expected memory threshold data.
.github/workflows/ci.yaml Modified CI to run memory checks after runtime verification.
Comments suppressed due to low confidence (2)

test_scripts/test_iqtree.sh:19

  • [nitpick] The local variable USER shadows the environment variable of the same name. Renaming it to something like USER_CPU would improve clarity.
    local REAL USER SYS PEAK_MEM MEM_MB

test_scripts/test_iqtree.ps1:78

  • The backtick-quote escaping around -m \"MIX{...}\" seems mismatched and can cause a PowerShell parse error. Consider wrapping the entire command in single quotes or using a here-string to avoid complex escaping.
Measure-IQTree "./build/iqtree3 -s test_scripts/test_data/turtle.fa -m `"MIX{GTR+FO,GTR+FO}`" --link-exchange-rates --prefix test_scripts/test_data/turtle.mix.link -seed $SEED -T 1"

Hashara and others added 2 commits July 7, 2025 14:04
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@Hashara Hashara force-pushed the gitworkflow-memcheck branch from 92511ce to 5dcdf01 Compare July 7, 2025 10:00
Copy link
Member

@bqminh bqminh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks!

@bqminh bqminh merged commit 28c89a5 into iqtree:master Sep 30, 2025
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants