File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1111 runs-on : ubuntu-latest
1212
1313 steps :
14- - uses : actions/checkout@v3
14+ - uses : actions/checkout@v4
1515
1616 - name : Install dependencies
1717 run : |
@@ -25,28 +25,29 @@ jobs:
2525
2626 - name : Basic map validation
2727 run : |
28- ./cub3D maps/invalid_map.cub 2>&1 | grep "Error" && exit 1 || echo "Map validation working"
28+ ./cub3D maps/invalid_map.cub 2>&1 | grep "Error" || ( echo "Map validation failed" && exit 1)
2929 ./cub3D maps/valid_map.cub 2>&1 | grep "Error" && exit 1 || echo "Valid map accepted"
3030
31- - name : Run with Valgrind (leak check)
31+ - name : Run with Valgrind
3232 run : |
3333 valgrind --leak-check=full --show-leak-kinds=all --error-exitcode=1 \
3434 --track-origins=yes --log-file=valgrind.log \
35- ./cub3D maps/valid_map.cub
35+ ./cub3D maps/valid_map.cub || true
3636 cat valgrind.log
3737
3838 - name : Output verification
3939 run : |
4040 timeout 5 ./cub3D maps/valid_map.cub > output.log 2>&1 &
4141 sleep 3
4242 grep "Initialization complete" output.log || (echo "Startup failed" && exit 1)
43- killall cub3D
43+ killall cub3D || true
4444
45- - name : Save artifacts on failure
46- if : failure()
47- uses : actions/upload-artifact@v3
45+ - name : Upload debug logs
46+ if : always()
47+ uses : actions/upload-artifact@v4
4848 with :
4949 name : debug-logs
5050 path : |
5151 output.log
52- valgrind.log
52+ valgrind.log
53+ retention-days : 1
You can’t perform that action at this time.
0 commit comments