|
1 | | -name: Continuous Integration |
2 | | -on: |
3 | | - push: |
4 | | - pull_request: |
5 | | - types: [opened, reopened, synchronize] |
6 | | - |
7 | | -concurrency: |
8 | | - group: ${{ github.workflow }}-${{ github.ref }} |
9 | | - cancel-in-progress: true |
10 | | - |
11 | | -jobs: |
12 | | - cpplint: |
13 | | - name: CPP Lint |
14 | | - runs-on: ubuntu-latest |
15 | | - steps: |
16 | | - - uses: actions/checkout@v6 |
17 | | - with: |
18 | | - token: ${{ github.token }} |
19 | | - show-progress: false |
20 | | - - name: Setup Python |
21 | | - uses: actions/setup-python@v6 |
22 | | - with: |
23 | | - python-version: 3.x |
24 | | - - run: pip install cpplint |
25 | | - - run: cpplint --linelength 140 --filter=-legal/copyright,-runtime/int,-build/include_subdir,-readability/casting,-readability/todo,-build/include_order,-build/include_what_you_use --recursive ./inc/ ./lib/ ./src/ |
26 | | - |
27 | | - pio-test: |
28 | | - name: PlatformIO Tests |
29 | | - runs-on: ubuntu-latest |
30 | | - steps: |
31 | | - - uses: actions/checkout@v6 |
32 | | - with: |
33 | | - token: ${{ secrets.GH_TOKEN }} |
34 | | - persist-credentials: true |
35 | | - show-progress: false |
36 | | - - name: Setup Git Credentials |
37 | | - run: | |
38 | | - git config --global credential.helper store |
39 | | - echo "https://oauth2:${{ secrets.GH_TOKEN }}@github.com" > ~/.git-credentials |
40 | | - - name: Setup Python |
41 | | - uses: actions/setup-python@v6 |
42 | | - with: |
43 | | - python-version: 3.x |
44 | | - - name: Cache PlatformIO |
45 | | - uses: actions/cache@v4 |
46 | | - with: |
47 | | - path: ~/.platformio |
48 | | - key: pio-${{ hashFiles('platformio.ini') }} |
49 | | - restore-keys: pio- |
50 | | - - name: Install PlatformIO |
51 | | - run: | |
52 | | - python -m pip install --upgrade pip |
53 | | - pip install -U platformio |
54 | | - - name: Run Unit Tests |
55 | | - run: platformio test -e native-test |
56 | | - |
57 | | - pio-build: |
58 | | - name: PlatformIO Build |
59 | | - runs-on: ubuntu-latest |
60 | | - steps: |
61 | | - - uses: actions/checkout@v6 |
62 | | - with: |
63 | | - token: ${{ secrets.GH_TOKEN }} |
64 | | - persist-credentials: true |
65 | | - show-progress: false |
66 | | - - name: Setup Git Credentials |
67 | | - run: | |
68 | | - git config --global credential.helper store |
69 | | - echo "https://oauth2:${{ secrets.GH_TOKEN }}@github.com" > ~/.git-credentials |
70 | | - - name: Setup Python |
71 | | - uses: actions/setup-python@v6 |
72 | | - with: |
73 | | - python-version: 3.x |
74 | | - - name: Cache PlatformIO |
75 | | - uses: actions/cache@v4 |
76 | | - with: |
77 | | - path: ~/.platformio |
78 | | - key: pio-${{ hashFiles('platformio.ini') }} |
79 | | - restore-keys: pio- |
80 | | - - name: Install PlatformIO |
81 | | - run: | |
82 | | - python -m pip install --upgrade pip |
83 | | - pip install -U platformio |
84 | | - - name: Build ESP32S3 |
85 | | - run: platformio run -e OpenPPG-CESP32S3-CAN-SP140 |
86 | | - - name: Install esptool |
87 | | - run: pip install esptool |
88 | | - - name: Merge Binaries |
89 | | - run: | |
90 | | - esptool.py --chip esp32s3 merge_bin \ |
91 | | - -o .pio/build/OpenPPG-CESP32S3-CAN-SP140/full-controller-firmware.bin \ |
92 | | - --flash_mode dio \ |
93 | | - --flash_freq 80m \ |
94 | | - --flash_size 8MB \ |
95 | | - 0x0 .pio/build/OpenPPG-CESP32S3-CAN-SP140/bootloader.bin \ |
96 | | - 0x8000 .pio/build/OpenPPG-CESP32S3-CAN-SP140/partitions.bin \ |
97 | | - 0xe000 /home/runner/.platformio/packages/framework-arduinoespressif32/tools/partitions/boot_app0.bin \ |
98 | | - 0x10000 .pio/build/OpenPPG-CESP32S3-CAN-SP140/firmware.bin |
99 | | - - name: Archive ESP32S3 Firmware |
100 | | - uses: actions/upload-artifact@v5 |
101 | | - with: |
102 | | - name: OpenPPG-CESP32S3-CAN-SP140-firmware |
103 | | - path: .pio/build/OpenPPG-CESP32S3-CAN-SP140/full-controller-firmware.bin |
| 1 | +name: Continuous Integration |
| 2 | +on: |
| 3 | + push: |
| 4 | + pull_request: |
| 5 | + types: [opened, reopened, synchronize] |
| 6 | + |
| 7 | +concurrency: |
| 8 | + group: ${{ github.workflow }}-${{ github.ref }} |
| 9 | + cancel-in-progress: true |
| 10 | + |
| 11 | +jobs: |
| 12 | + cpplint: |
| 13 | + name: CPP Lint |
| 14 | + runs-on: ubuntu-latest |
| 15 | + steps: |
| 16 | + - uses: actions/checkout@v6 |
| 17 | + with: |
| 18 | + token: ${{ github.token }} |
| 19 | + show-progress: false |
| 20 | + - name: Setup Python |
| 21 | + uses: actions/setup-python@v6 |
| 22 | + with: |
| 23 | + python-version: 3.x |
| 24 | + - run: pip install cpplint |
| 25 | + - run: cpplint --linelength 140 --filter=-legal/copyright,-runtime/int,-build/include_subdir,-readability/casting,-readability/todo,-build/include_order,-build/include_what_you_use --recursive ./inc/ ./lib/ ./src/ |
| 26 | + |
| 27 | + pio-test: |
| 28 | + name: PlatformIO Tests |
| 29 | + runs-on: ubuntu-latest |
| 30 | + steps: |
| 31 | + - uses: actions/checkout@v6 |
| 32 | + with: |
| 33 | + token: ${{ secrets.GH_TOKEN }} |
| 34 | + persist-credentials: true |
| 35 | + show-progress: false |
| 36 | + - name: Setup Git Credentials |
| 37 | + run: | |
| 38 | + git config --global credential.helper store |
| 39 | + echo "https://oauth2:${{ secrets.GH_TOKEN }}@github.com" > ~/.git-credentials |
| 40 | + - name: Setup Python |
| 41 | + uses: actions/setup-python@v6 |
| 42 | + with: |
| 43 | + python-version: 3.x |
| 44 | + - name: Cache PlatformIO |
| 45 | + uses: actions/cache@v5 |
| 46 | + with: |
| 47 | + path: ~/.platformio |
| 48 | + key: pio-${{ hashFiles('platformio.ini') }} |
| 49 | + restore-keys: pio- |
| 50 | + - name: Install PlatformIO |
| 51 | + run: | |
| 52 | + python -m pip install --upgrade pip |
| 53 | + pip install -U platformio |
| 54 | + - name: Run Unit Tests |
| 55 | + run: platformio test -e native-test |
| 56 | + |
| 57 | + pio-build: |
| 58 | + name: PlatformIO Build |
| 59 | + runs-on: ubuntu-latest |
| 60 | + steps: |
| 61 | + - uses: actions/checkout@v6 |
| 62 | + with: |
| 63 | + token: ${{ secrets.GH_TOKEN }} |
| 64 | + persist-credentials: true |
| 65 | + show-progress: false |
| 66 | + - name: Setup Git Credentials |
| 67 | + run: | |
| 68 | + git config --global credential.helper store |
| 69 | + echo "https://oauth2:${{ secrets.GH_TOKEN }}@github.com" > ~/.git-credentials |
| 70 | + - name: Setup Python |
| 71 | + uses: actions/setup-python@v6 |
| 72 | + with: |
| 73 | + python-version: 3.x |
| 74 | + - name: Cache PlatformIO |
| 75 | + uses: actions/cache@v5 |
| 76 | + with: |
| 77 | + path: ~/.platformio |
| 78 | + key: pio-${{ hashFiles('platformio.ini') }} |
| 79 | + restore-keys: pio- |
| 80 | + - name: Install PlatformIO |
| 81 | + run: | |
| 82 | + python -m pip install --upgrade pip |
| 83 | + pip install -U platformio |
| 84 | + - name: Build ESP32S3 |
| 85 | + run: platformio run -e OpenPPG-CESP32S3-CAN-SP140 |
| 86 | + - name: Install esptool |
| 87 | + run: pip install esptool |
| 88 | + - name: Merge Binaries |
| 89 | + run: | |
| 90 | + esptool.py --chip esp32s3 merge_bin \ |
| 91 | + -o .pio/build/OpenPPG-CESP32S3-CAN-SP140/full-controller-firmware.bin \ |
| 92 | + --flash_mode dio \ |
| 93 | + --flash_freq 80m \ |
| 94 | + --flash_size 8MB \ |
| 95 | + 0x0 .pio/build/OpenPPG-CESP32S3-CAN-SP140/bootloader.bin \ |
| 96 | + 0x8000 .pio/build/OpenPPG-CESP32S3-CAN-SP140/partitions.bin \ |
| 97 | + 0xe000 /home/runner/.platformio/packages/framework-arduinoespressif32/tools/partitions/boot_app0.bin \ |
| 98 | + 0x10000 .pio/build/OpenPPG-CESP32S3-CAN-SP140/firmware.bin |
| 99 | + - name: Archive ESP32S3 Firmware |
| 100 | + uses: actions/upload-artifact@v6 |
| 101 | + with: |
| 102 | + name: OpenPPG-CESP32S3-CAN-SP140-firmware |
| 103 | + path: .pio/build/OpenPPG-CESP32S3-CAN-SP140/full-controller-firmware.bin |
0 commit comments