Fix yaml runner
All checks were successful
Punisher CI/CD Advanced / build-and-test (push) Successful in 42s
All checks were successful
Punisher CI/CD Advanced / build-and-test (push) Successful in 42s
This commit is contained in:
@@ -1,22 +1,39 @@
|
||||
name: Punisher CI/CD
|
||||
name: Punisher CI/CD Advanced
|
||||
on: [push]
|
||||
|
||||
jobs:
|
||||
build-and-test:
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
# Questa immagine è lo standard professionale per i runner Gitea/Act
|
||||
image: catthehacker/ubuntu:act-latest
|
||||
options: --memory=128mb --cpus=0.5
|
||||
options: --memory=128mb --cpus=0.5 # Limite di sicurezza per la VPS
|
||||
steps:
|
||||
- name: Checkout del codice
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Installazione dipendenze (se mancano)
|
||||
run: apt-get update && apt-get install -y build-essential
|
||||
- name: Setup Strumenti di Analisi
|
||||
run: |
|
||||
apt-get update
|
||||
apt-get install -y build-essential valgrind curl
|
||||
|
||||
- name: Compilazione Professionale
|
||||
run: make build
|
||||
|
||||
- name: Esecuzione Sandbox
|
||||
run: make run
|
||||
- name: Analisi Memoria e Esecuzione Sandbox
|
||||
# Valgrind monitora ogni byte allocato. Se superi i 128MB o sballi un puntatore, lo vedrai qui.
|
||||
run: |
|
||||
valgrind --leak-check=full \
|
||||
--show-leak-kinds=all \
|
||||
--track-origins=yes \
|
||||
--verbose \
|
||||
--log-file=valgrind_report.txt \
|
||||
./lab_app > output.log 2>&1 || echo "CRASH DETECTED" >> output.log
|
||||
|
||||
- name: Invio Report a n8n
|
||||
# Inviamo sia l'output del programma che il report della memoria
|
||||
if: always() # Eseguito anche se il codice crasha
|
||||
run: |
|
||||
LOG_CONTENT=$(cat output.log valgrind_report.txt | base64 -w 0)
|
||||
curl -X POST -H "Content-Type: application/json" \
|
||||
-d "{\"project\":\"${{ github.repository }}\", \"status\":\"finished\", \"log\":\"$LOG_CONTENT\"}" \
|
||||
https://n8n.thepunisher-lab.duckdns.org/webhook/LOG_REPORT_ID
|
||||
Reference in New Issue
Block a user