Adding repo secret for CI actions
Some checks failed
power-graph.yml / Adding repo secret for CI actions (push) Has been cancelled
Some checks failed
power-graph.yml / Adding repo secret for CI actions (push) Has been cancelled
This commit is contained in:
parent
9a1e0286a6
commit
e958a42bbc
2 changed files with 35 additions and 24 deletions
|
|
@ -11,39 +11,25 @@ jobs:
|
||||||
plot:
|
plot:
|
||||||
runs-on: [self-hosted]
|
runs-on: [self-hosted]
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repo
|
- name: Check out repository
|
||||||
run: |
|
uses: https://data.forgejo.org/actions/checkout@v4
|
||||||
git clone https://mentalnet.xyz/forgejo/markmental/amd-telemetry.git .
|
with:
|
||||||
echo "✅ Repository checked out"
|
token: ${{ secrets.PAT_READ_REPO }}
|
||||||
|
fetch-depth: 0
|
||||||
|
show-progress: true
|
||||||
|
|
||||||
- name: Install Python deps
|
- name: Install Python dependencies
|
||||||
run: |
|
run: |
|
||||||
sudo apt update
|
sudo apt update
|
||||||
sudo apt install -y python3 python3-pip
|
sudo apt install -y python3 python3-pip
|
||||||
pip install matplotlib pandas
|
pip3 install matplotlib pandas
|
||||||
|
|
||||||
- name: Generate power graph
|
- name: Generate power graph
|
||||||
run: |
|
run: |
|
||||||
python3 - <<'EOF'
|
python3 plot_power.py # (script placed in your repo)
|
||||||
import pandas as pd, matplotlib.pyplot as plt
|
|
||||||
df = pd.read_csv('power_log.csv', names=['time','apu','gpu','total'])
|
|
||||||
plt.figure(figsize=(10,5))
|
|
||||||
plt.plot(df['time'], df['apu'], label='APU Power (W)', color='orange')
|
|
||||||
plt.plot(df['time'], df['gpu'], label='GPU Power (W)', color='green')
|
|
||||||
plt.plot(df['time'], df['total'], label='Total (W)', color='blue', linewidth=1.5)
|
|
||||||
plt.xlabel('Time')
|
|
||||||
plt.ylabel('Watts')
|
|
||||||
plt.title('AMD TUF Power Log')
|
|
||||||
plt.legend()
|
|
||||||
plt.xticks(rotation=45)
|
|
||||||
plt.tight_layout()
|
|
||||||
plt.grid(True, alpha=0.3)
|
|
||||||
plt.savefig('power_graph.png', dpi=120)
|
|
||||||
print('✅ Graph generated: power_graph.png')
|
|
||||||
EOF
|
|
||||||
|
|
||||||
- name: Upload graph artifact
|
- name: Upload graph artifact
|
||||||
uses: actions/upload-artifact@v3
|
uses: https://data.forgejo.org/actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: power-graph
|
name: power-graph
|
||||||
path: power_graph.png
|
path: power_graph.png
|
||||||
|
|
|
||||||
|
|
@ -17,3 +17,28 @@ timestamp,apu_w,gpu_w,total_w,apu_temp,gpu_temp
|
||||||
2025-11-05T17:48:00-05:00,20.01,9.00,29.01,72.0,68.0
|
2025-11-05T17:48:00-05:00,20.01,9.00,29.01,72.0,68.0
|
||||||
2025-11-05T17:48:01-05:00,59.06,9.00,68.06,72.0,68.0
|
2025-11-05T17:48:01-05:00,59.06,9.00,68.06,72.0,68.0
|
||||||
2025-11-05T17:48:02-05:00,53.22,10.00,63.22,73.0,68.0
|
2025-11-05T17:48:02-05:00,53.22,10.00,63.22,73.0,68.0
|
||||||
|
2025-11-05T18:00:36-05:00,4.14,9.00,13.14,73.0,68.0
|
||||||
|
2025-11-05T18:00:37-05:00,57.16,9.00,66.16,73.0,68.0
|
||||||
|
2025-11-05T18:00:38-05:00,36.22,11.00,47.22,73.0,68.0
|
||||||
|
2025-11-05T18:00:39-05:00,57.07,10.00,67.07,72.0,68.0
|
||||||
|
2025-11-05T18:00:40-05:00,14.22,9.00,23.22,73.0,68.0
|
||||||
|
2025-11-05T18:00:41-05:00,59.11,9.00,68.11,73.0,68.0
|
||||||
|
2025-11-05T18:00:42-05:00,34.09,10.00,44.09,75.0,68.0
|
||||||
|
2025-11-05T18:00:43-05:00,57.17,11.00,68.17,72.0,68.0
|
||||||
|
2025-11-05T18:00:44-05:00,53.15,9.00,62.15,72.0,68.0
|
||||||
|
2025-11-05T18:00:45-05:00,7.11,9.00,16.11,72.0,68.0
|
||||||
|
2025-11-05T18:00:46-05:00,41.16,9.00,50.16,73.0,68.0
|
||||||
|
2025-11-05T18:00:47-05:00,14.17,9.00,23.17,72.0,68.0
|
||||||
|
2025-11-05T18:00:48-05:00,45.11,9.00,54.11,73.0,68.0
|
||||||
|
2025-11-05T18:00:50-05:00,57.09,9.00,66.09,73.0,68.0
|
||||||
|
2025-11-05T18:00:51-05:00,1.15,9.00,10.15,73.0,68.0
|
||||||
|
2025-11-05T18:00:52-05:00,57.00,9.00,66.00,73.0,68.0
|
||||||
|
2025-11-05T18:00:53-05:00,56.23,10.00,66.23,73.0,68.0
|
||||||
|
2025-11-05T18:00:54-05:00,7.17,9.00,16.17,73.0,68.0
|
||||||
|
2025-11-05T18:00:55-05:00,60.01,9.00,69.01,73.0,68.0
|
||||||
|
2025-11-05T18:00:56-05:00,47.02,9.00,56.02,74.0,68.0
|
||||||
|
2025-11-05T18:00:57-05:00,18.03,9.00,27.03,73.0,68.0
|
||||||
|
2025-11-05T18:00:58-05:00,49.19,9.00,58.19,72.0,68.0
|
||||||
|
2025-11-05T18:00:59-05:00,30.06,9.00,39.06,72.0,68.0
|
||||||
|
2025-11-05T18:01:00-05:00,2.22,10.00,12.22,72.0,68.0
|
||||||
|
2025-11-05T18:01:01-05:00,17.20,9.00,26.20,73.0,68.0
|
||||||
|
|
|
||||||
|
Loading…
Add table
Add a link
Reference in a new issue