|
1 | | -name: C++ CI Serial Programs |
2 | | - |
3 | | -on: [push, pull_request, workflow_dispatch] |
4 | | - |
5 | | -jobs: |
6 | | - build: |
7 | | - runs-on: ${{ matrix.os }} |
8 | | - |
9 | | - strategy: |
10 | | - fail-fast: false |
11 | | - matrix: |
12 | | - os: [windows-2025, macos-13, ubuntu-24.04] |
13 | | - qt_version: ['6.9.0'] |
14 | | - include: |
15 | | - - qt_version: '6.9.0' |
16 | | - qt_version_major: '6' |
17 | | - qt_modules: 'qtmultimedia qtserialport' |
18 | | - |
19 | | - steps: |
20 | | - - uses: actions/checkout@v4 |
21 | | - with: |
22 | | - path: Arduino-Source |
23 | | - - uses: actions/checkout@v4 |
24 | | - with: |
25 | | - repository: 'PokemonAutomation/Packages' |
26 | | - path: Packages |
27 | | - - name: Install dependencies |
28 | | - if: startsWith(matrix.os, 'ubuntu') |
29 | | - run: | |
30 | | - sudo apt update |
31 | | - sudo apt install libopencv-dev |
32 | | - - name: Install dependencies |
33 | | - if: startsWith(matrix.os, 'mac') |
34 | | - run: | |
35 | | - brew install opencv onnxruntime |
36 | | - - uses: jurplel/install-qt-action@v4 |
37 | | - with: |
38 | | - version: ${{ matrix.qt_version }} |
39 | | - modules: ${{ matrix.qt_modules }} |
40 | | - - name: Generate binaries |
41 | | - run: | |
42 | | - cd Arduino-Source/SerialPrograms |
43 | | - mkdir bin |
44 | | - cd bin |
45 | | - cmake .. -DQT_MAJOR:STRING=${{ matrix.qt_version_major }} |
46 | | - cmake --build . --config Release --parallel 10 |
47 | | - - name: Copy resources |
48 | | - if: startsWith(matrix.os, 'windows') |
49 | | - run: | |
50 | | - robocopy Packages/SerialPrograms/Resources Output/Resources /s |
51 | | - robocopy Packages/PABotBase/PABotBase-Switch Output/PABotBase /s |
52 | | - robocopy Arduino-Source/SerialPrograms/bin Output/Binaries *.dll |
53 | | - robocopy Arduino-Source/SerialPrograms/bin/Release Output/Binaries SerialPrograms.exe |
54 | | - echo https://github.com/${{github.repository}}/commit/${{github.sha}} > Output/version.txt |
55 | | - write-host "Robocopy exited with exit code:" $lastexitcode |
56 | | - if ($lastexitcode -eq 1) |
57 | | - { |
58 | | - exit 0 |
59 | | - } |
60 | | - else |
61 | | - { |
62 | | - exit 1 |
63 | | - } |
64 | | - - uses: actions/upload-artifact@v4 |
65 | | - if: startsWith(matrix.os, 'windows') |
66 | | - with: |
67 | | - name: Serial Programs for windows (${{ matrix.qt_version }}) |
68 | | - path: Output |
| 1 | +name: C++ CI Serial Programs |
| 2 | + |
| 3 | +on: [push, pull_request, workflow_dispatch] |
| 4 | + |
| 5 | +jobs: |
| 6 | + build: |
| 7 | + runs-on: ${{ matrix.os }} |
| 8 | + |
| 9 | + strategy: |
| 10 | + fail-fast: false |
| 11 | + matrix: |
| 12 | + os: [windows-2025, macos-13, ubuntu-24.04] |
| 13 | + qt_version: ['6.9.0'] |
| 14 | + include: |
| 15 | + - qt_version: '6.9.0' |
| 16 | + qt_version_major: '6' |
| 17 | + qt_modules: 'qtmultimedia qtserialport' |
| 18 | + |
| 19 | + steps: |
| 20 | + - uses: actions/checkout@v4 |
| 21 | + with: |
| 22 | + path: Arduino-Source |
| 23 | + - uses: actions/checkout@v4 |
| 24 | + with: |
| 25 | + repository: 'PokemonAutomation/Packages' |
| 26 | + path: Packages |
| 27 | + - name: Install dependencies |
| 28 | + if: startsWith(matrix.os, 'ubuntu') |
| 29 | + run: | |
| 30 | + sudo apt update |
| 31 | + sudo apt install libopencv-dev |
| 32 | + - name: Install dependencies |
| 33 | + if: startsWith(matrix.os, 'mac') |
| 34 | + run: | |
| 35 | + brew install opencv onnxruntime |
| 36 | + - uses: jurplel/install-qt-action@v4 |
| 37 | + with: |
| 38 | + version: ${{ matrix.qt_version }} |
| 39 | + modules: ${{ matrix.qt_modules }} |
| 40 | + - name: Generate binaries |
| 41 | + run: | |
| 42 | + cd Arduino-Source/SerialPrograms |
| 43 | + mkdir bin |
| 44 | + cd bin |
| 45 | + cmake .. -DQT_MAJOR:STRING=${{ matrix.qt_version_major }} |
| 46 | + cmake --build . --config Release --parallel 10 |
| 47 | + - name: Copy resources |
| 48 | + if: startsWith(matrix.os, 'windows') |
| 49 | + run: | |
| 50 | + robocopy Packages/SerialPrograms/Resources Output/Resources /s |
| 51 | + robocopy Packages/PABotBase/PABotBase-Switch Output/PABotBase /s |
| 52 | + robocopy Arduino-Source/SerialPrograms/bin Output/Binaries *.dll |
| 53 | + robocopy Arduino-Source/SerialPrograms/bin/Release Output/Binaries SerialPrograms.exe |
| 54 | + echo https://github.com/${{github.repository}}/commit/${{github.sha}} > Output/version.txt |
| 55 | + write-host "Robocopy exited with exit code:" $lastexitcode |
| 56 | + if ($lastexitcode -eq 1) |
| 57 | + { |
| 58 | + exit 0 |
| 59 | + } |
| 60 | + else |
| 61 | + { |
| 62 | + exit 1 |
| 63 | + } |
| 64 | + - uses: actions/upload-artifact@v4 |
| 65 | + if: startsWith(matrix.os, 'windows') |
| 66 | + with: |
| 67 | + name: Serial Programs for windows (${{ matrix.qt_version }}) |
| 68 | + path: Output |
0 commit comments