File tree Expand file tree Collapse file tree 3 files changed +47
-0
lines changed Expand file tree Collapse file tree 3 files changed +47
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : CI
2
+
3
+ on :
4
+ push :
5
+ pull_request :
6
+ schedule :
7
+ - cron : ' 0 0 * * 0' # Runs every Sunday at midnight
8
+
9
+ jobs :
10
+ build :
11
+ name : Build and Test
12
+ runs-on : ubuntu-latest
13
+
14
+ steps :
15
+ - uses : actions/checkout@v4
16
+
17
+ - name : Install dependencies
18
+ run : sudo apt-get update && sudo apt-get install -y build-essential
19
+
20
+ - name : Run make all and wait for Sent
21
+ run : make wait-for-sent
22
+
23
+ - name : Archive all.txt logs
24
+ if : always()
25
+ uses : actions/upload-artifact@v3
26
+ with :
27
+ path : /quickstart/docker/all.txt
Original file line number Diff line number Diff line change 8
8
9
9
# VSCode
10
10
.vscode /settings.json
11
+
12
+ # Docker logs for CI
13
+ docker /all.log
Original file line number Diff line number Diff line change @@ -22,6 +22,23 @@ yamcs-simulator: yamcs-up ## run yamcs simulator
22
22
yamcs-shell : # # shell into yamcs container
23
23
docker compose up -d && docker compose exec yamcs bash
24
24
25
+ wait-for-sent : yamcs-up # # run make all and wait up to 10 minutes for "Sent:" in the output
26
+ @echo " Running make all and waiting for 'Sent:' in the output..." && \
27
+ nohup $(MAKE ) all > all.log 2>&1 & \
28
+ pid=$$ ! ; \
29
+ timeout=600; \
30
+ while ! grep -q " Sent:" all.log; do \
31
+ sleep 1; \
32
+ timeout=$$((timeout - 1 ) ); \
33
+ if [ $$ timeout -le 0 ]; then \
34
+ echo " Timeout waiting for 'Sent:' in the output" ; \
35
+ kill $$ pid; \
36
+ exit 1; \
37
+ fi ; \
38
+ done ; \
39
+ echo " Found 'Sent:' in the output" ; \
40
+ kill $$ pid
41
+
25
42
help :
26
43
@printf " \033[37m%-30s\033[0m %s\n" " #----------------------------------------------------------------------------------"
27
44
@printf " \033[37m%-30s\033[0m %s\n" " # Makefile "
You can’t perform that action at this time.
0 commit comments