-
Notifications
You must be signed in to change notification settings - Fork 2
65 lines (58 loc) · 1.75 KB
/
ci.yml
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
on: [push, pull_request]
name: Continuous Integration
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
fw-ci:
name: Build Firmware
runs-on: ubuntu-24.04
defaults:
run:
working-directory: ./fw
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Install avr-gcc
run: |
curl -L -o /tmp/avr-gcc-14.1.0-x64-linux.tar.bz2 https://github.com/ZakKemble/avr-gcc-build/releases/download/v14.1.0-1/avr-gcc-14.1.0-x64-linux.tar.bz2
echo Extracting avr-gcc archive
tar xf /tmp/avr-gcc-14.1.0-x64-linux.tar.bz2 --directory /opt
echo "PATH=/opt/avr-gcc-14.1.0-x64-linux/bin:$(echo $PATH)" >> $GITHUB_ENV
- name: make
run: |
make
- uses: actions/upload-artifact@v4
with:
name: beef-fw
path: fw/beef.hex
if-no-files-found: error
beef-tool:
name: Build beef-tool
runs-on: windows-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Install dependencies
run: |
pip install pyinstaller
- name: Package beef-tool
run: |
pyinstaller --onefile --noconsole --add-data "beef-tool/avrdude;avrdude" beef-tool/beef-tool.py
- name: Prepare files for upload
run: |
mkdir tmp
cp dist/beef-tool.exe tmp
cp beef-tool/README.md tmp
cp -r beef-tool/drivers tmp
- name: Upload executable
uses: actions/upload-artifact@v4
with:
name: beef-tool
path: |
tmp/*