Skip to content

add cpu info #691

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

Merged
merged 2 commits into from
Jun 8, 2025
Merged
Show file tree
Hide file tree
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
13 changes: 13 additions & 0 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,19 @@ jobs:
uses: actions/checkout@v4
with:
submodules: recursive
- name: Print CPU information
run: |
echo "=== CPU Information ==="
if command -v lscpu >/dev/null 2>&1; then
echo "--- lscpu output ---"
lscpu
else
echo "--- Fallback CPU info ---"
cat /proc/cpuinfo 2>/dev/null || echo "CPU info not available"
fi
echo "Runner OS: $RUNNER_OS"
echo "Runner Architecture: ${{ runner.arch }}"
echo "========================"
- name: install dependencies
run: sudo .install/install_script.sh
- name: run codecov
Expand Down
13 changes: 13 additions & 0 deletions .github/workflows/event-pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,19 @@ jobs:
uses: actions/checkout@v4
with:
submodules: recursive
- name: Print CPU information
run: |
echo "=== CPU Information ==="
if command -v lscpu >/dev/null 2>&1; then
echo "--- lscpu output ---"
lscpu
else
echo "--- Fallback CPU info ---"
cat /proc/cpuinfo 2>/dev/null || echo "CPU info not available"
fi
echo "Runner OS: $RUNNER_OS"
echo "Runner Architecture: ${{ runner.arch }}"
echo "========================"
- name: setup python
uses: actions/setup-python@v5
with:
Expand Down
20 changes: 20 additions & 0 deletions .github/workflows/task-unit-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,26 @@ jobs:
uses: actions/checkout@v4
with:
submodules: recursive
- name: Print CPU information
Copy link
Preview

Copilot AI Jun 8, 2025

Choose a reason for hiding this comment

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

The 'Print CPU information' step is duplicated across three workflows. Consider refactoring it into a reusable composite action to reduce duplication and simplify future maintenance.

Copilot uses AI. Check for mistakes.

run: |
echo "=== CPU Information ==="
if command -v lscpu >/dev/null 2>&1; then
echo "--- lscpu output ---"
lscpu
elif [[ "$RUNNER_OS" == "macOS" ]] || command -v sysctl >/dev/null 2>&1; then
echo "--- macOS CPU info ---"
sysctl -n machdep.cpu.brand_string 2>/dev/null || echo "CPU brand: N/A"
sysctl -n machdep.cpu.core_count 2>/dev/null || echo "Core count: N/A"
sysctl -n machdep.cpu.thread_count 2>/dev/null || echo "Thread count: N/A"
sysctl -n machdep.cpu.vendor 2>/dev/null || echo "CPU vendor: N/A"
sysctl -n machdep.cpu.features 2>/dev/null || echo "CPU features: N/A"
else
echo "--- Fallback CPU info ---"
cat /proc/cpuinfo 2>/dev/null || echo "CPU info not available"
fi
echo "Runner OS: $RUNNER_OS"
echo "Runner Architecture: ${{ runner.arch }}"
echo "========================"
- name: install dependencies
run: .install/install_script.sh ${{ !inputs.container && 'sudo' || '' }}
- name: Set Artifact Name
Expand Down
Loading