-
Notifications
You must be signed in to change notification settings - Fork 0
66 lines (60 loc) · 2.13 KB
/
Copy pathci.yml
File metadata and controls
66 lines (60 loc) · 2.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
name: CI
on:
push:
branches: [ main ]
workflow_dispatch:
jobs:
validate:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Check level.dat exists
run: |
if [ -f "00-99_Display/world/BitView_00-99_Display/level.dat" ]; then
echo "✅ level.dat found"
else
echo "❌ level.dat not found"
exit 1
fi
- name: Validate truth table CSV
run: |
python3 << 'EOF'
import csv, sys
path = "00-99_Display/circuit docs/truth table.csv"
try:
with open(path, 'r') as f:
reader = csv.reader(f, delimiter=';')
header = next(reader)
if len(header) < 11:
print(f"❌ Expected at least 11 columns, got {len(header)}")
sys.exit(1)
rows = list(reader)
if len(rows) < 16:
print(f"❌ Expected at least 16 data rows, got {len(rows)}")
sys.exit(1)
for i, row in enumerate(rows):
for col in range(4, 11):
val = row[col].strip().upper()
if val not in ('0', '1', 'X'):
print(f"❌ Row {i+2}, column {col+1}: invalid value '{val}'")
sys.exit(1)
print(f"✅ CSV valid: {len(rows)} rows, {len(header)} columns")
except Exception as e:
print(f"❌ Error reading CSV: {e}")
sys.exit(1)
EOF
- name: Check AND to OR-NOT.md exists
run: |
if [ -f "00-99_Display/circuit docs/AND to OR-NOT.md" ]; then
echo "✅ Documentation found"
else
echo "❌ Documentation missing"
exit 1
fi
- name: Validate world files (advanced)
run: |
if [ -f "tools/validate_world.py" ]; then
python3 tools/validate_world.py
else
echo "⚠️ validate_world.py not found, skipping advanced validation"
fi