Skip to content

Commit e1ee459

Browse files
committed
github workflow fix?
1 parent 921fbfb commit e1ee459

6 files changed

Lines changed: 113 additions & 1 deletion

File tree

GITHUB_ACTIONS_CHECKLIST.md

Lines changed: 109 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,109 @@
1+
# GitHub Actions Pre-Push Checklist
2+
3+
Before pushing to trigger the GitHub Actions workflow, verify:
4+
5+
## ✅ Files Created
6+
7+
- [x] `.github/workflows/build-executables.yml` - Main workflow
8+
- [x] `.github/workflows/README.md` - Workflow documentation
9+
- [x] `.github/README.md` - GitHub config overview
10+
- [x] `.github/QUICKSTART.md` - Quick start guide
11+
12+
## ✅ Build Script Fixed
13+
14+
- [x] `build_executables.py` - Removed hardcoded path `/workspaces/tinynav`
15+
- [x] Uses `os.path.dirname(os.path.abspath(__file__))` instead
16+
- [x] Tested from different directories
17+
- [x] Works correctly ✓
18+
19+
## ✅ Python Scripts Updated
20+
21+
- [x] `visualize.py` - GIF output, CLI args, Pillow writer
22+
- [x] `download_log.py` - CLI args for port/baud
23+
- [x] `read_serial.py` - CLI args for port/baud/grid
24+
25+
## ✅ Documentation Complete
26+
27+
- [x] `EXECUTABLES_README.md` - Main overview
28+
- [x] `BUILD_EXECUTABLES.md` - Build instructions
29+
- [x] `dist/README.md` - Distribution guide
30+
- [x] `dist/USAGE.md` - CLI reference
31+
- [x] `dist/REQUIREMENTS.txt` - System requirements
32+
33+
## ✅ Executables Built Locally
34+
35+
- [x] Linux executables built successfully
36+
- [x] All executables tested with `--help`
37+
- [x] Sizes: visualize (51MB), download_log (7.6MB), read_serial (42MB)
38+
39+
## ✅ Workflow Validated
40+
41+
- [x] YAML syntax valid (tested with PyYAML)
42+
- [x] Workflow triggers configured correctly
43+
- [x] Artifact packaging configured
44+
- [x] Release integration configured
45+
46+
## 🚀 Ready to Push
47+
48+
All checks passed! You can now:
49+
50+
```bash
51+
git add .
52+
git commit -m "Add GitHub Actions workflow with fixed build script"
53+
git push origin main
54+
```
55+
56+
Then:
57+
1. Go to Actions tab on GitHub
58+
2. Manually trigger "Build Executables" workflow
59+
3. Wait ~10 minutes for completion
60+
4. Download artifacts from completed workflow
61+
62+
## 📝 Expected Workflow Steps
63+
64+
**Linux Build (~5-7 min):**
65+
1. Checkout code
66+
2. Setup Python 3.12
67+
3. Install requirements + PyInstaller
68+
4. Run build_executables.py
69+
5. Test executables (--help)
70+
6. Package as tar.gz
71+
7. Upload artifact
72+
73+
**Windows Build (~6-8 min):**
74+
1. Checkout code
75+
2. Setup Python 3.12
76+
3. Install requirements + PyInstaller + windows-curses
77+
4. Run build_executables.py
78+
5. Test executables (--help)
79+
6. Package as zip
80+
7. Upload artifact
81+
82+
**Summary:**
83+
- Report build status
84+
- Show artifact links
85+
86+
## 🐛 If Build Fails
87+
88+
Check logs for:
89+
- Missing dependencies
90+
- Import errors
91+
- PyInstaller issues
92+
- Test failures
93+
94+
All known issues have been fixed:
95+
- ✓ Hardcoded path removed
96+
- ✓ GIF format instead of MP4
97+
- ✓ All CLI args validated
98+
99+
## 🎉 Success Criteria
100+
101+
Workflow completes successfully when:
102+
- ✅ Both jobs (Linux + Windows) succeed
103+
- ✅ All tests pass (--help commands work)
104+
- ✅ Artifacts are uploaded
105+
- ✅ Summary shows green checkmarks
106+
107+
You should see two downloadable artifacts:
108+
- `tinynav-linux-x86_64` (tar.gz)
109+
- `tinynav-windows-x86_64` (zip)

bin/act

19.4 MB
Binary file not shown.

build_executables.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,11 +51,14 @@ def build_executable(script_name, onefile=True, console=True, hidden_imports=Non
5151
return False
5252

5353
def main():
54-
os.chdir('/workspaces/tinynav')
54+
# Get the directory where this script is located
55+
script_dir = os.path.dirname(os.path.abspath(__file__))
56+
os.chdir(script_dir)
5557

5658
print("Building executables for Python scripts...")
5759
print(f"Platform: {platform.system()}")
5860
print(f"Architecture: {platform.machine()}")
61+
print(f"Working directory: {os.getcwd()}")
5962

6063
# Build visualize.py
6164
build_executable(

dist/download_log

-7.51 MB
Binary file not shown.

dist/read_serial

-41.3 MB
Binary file not shown.

dist/visualize

-50.9 MB
Binary file not shown.

0 commit comments

Comments
 (0)