Skip to content

Commit 27f0b67

Browse files
authored
Merge branch 'master' into make-clean
2 parents f764c32 + 67b17e0 commit 27f0b67

File tree

3 files changed

+49
-1
lines changed

3 files changed

+49
-1
lines changed

.github/main.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
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

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,6 @@
88

99
# VSCode
1010
.vscode/settings.json
11+
12+
# Docker logs for CI
13+
docker/all.log

docker/Makefile

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,23 @@ clean: | yamcs-down ## remove yamcs build artifacts and docker resources created
4242
rm -rf ../target
4343
$(call print_message,32,Done!)
4444

45+
wait-for-sent: | yamcs-up ## run make all and wait up to 10 minutes for "Sent:" in the output
46+
@echo "Running make all and waiting for 'Sent:' in the output..." && \
47+
nohup $(MAKE) all > all.log 2>&1 & \
48+
pid=$$!; \
49+
timeout=600; \
50+
while ! grep -q "Sent:" all.log; do \
51+
sleep 1; \
52+
timeout=$$((timeout - 1)); \
53+
if [ $$timeout -le 0 ]; then \
54+
echo "Timeout waiting for 'Sent:' in the output"; \
55+
kill $$pid; \
56+
exit 1; \
57+
fi; \
58+
done; \
59+
echo "Found 'Sent:' in the output"; \
60+
kill $$pid
61+
4562
TERM_WIDTH := $(shell tput cols 2>/dev/null || echo 80)
4663

4764
define print_header
@@ -50,9 +67,10 @@ define print_header
5067
@printf '%*s\n' "$(TERM_WIDTH)" '' | tr ' ' '-'
5168
endef
5269

70+
5371
help: ## display this help message
5472
$(call print_header,"Makefile")
5573
@awk 'BEGIN {FS = ":.*##"; printf "\033[36m%-30s\033[0m %s\n", "Target", "Description"} /^[a-zA-Z_-]+:.*?##/ {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' $(MAKEFILE_LIST) | sort
5674

5775
print-%: ## Print any variable (e.g., make print-PYTHON)
58-
@echo $* = $($*)
76+
@echo $* = $($*)

0 commit comments

Comments
 (0)