Skip to content

Commit 5d9e04f

Browse files
committed
updated CI
1 parent b6e1b04 commit 5d9e04f

1 file changed

Lines changed: 10 additions & 9 deletions

File tree

.github/workflows/build.yml

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
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

0 commit comments

Comments
 (0)