Add clang on the CI for windows and linux #4254
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: C++ CI Serial Programs | |
| on: [push, pull_request, workflow_dispatch] | |
| jobs: | |
| build: | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [windows-2025, macos-13, ubuntu-24.04] | |
| toolset: ['', '-T ClangCL'] | |
| qt_version: ['6.9.0'] | |
| include: | |
| - qt_version: '6.9.0' | |
| qt_version_major: '6' | |
| qt_modules: 'qtmultimedia qtserialport' | |
| - os: 'windows-2025' | |
| toolset: '' | |
| - os: 'windows-2025' | |
| toolset: '-T ClangCL' | |
| - os: 'macos-13' | |
| toolset: '' | |
| # - os: 'macos-13' | |
| # toolset: '-T ClangCL' | |
| # default toolset on mac is already clang | |
| - os: 'ubuntu-24.04' | |
| toolset: '' | |
| - os: 'ubuntu-24.04' | |
| toolset: '-T ClangCL' | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| path: Arduino-Source | |
| - uses: actions/checkout@v4 | |
| with: | |
| repository: 'PokemonAutomation/Packages' | |
| path: Packages | |
| - name: Install dependencies | |
| if: startsWith(matrix.os, 'ubuntu') | |
| run: | | |
| sudo apt update | |
| sudo apt install libopencv-dev | |
| - name: Install dependencies | |
| if: startsWith(matrix.os, 'mac') | |
| run: | | |
| brew install opencv onnxruntime | |
| - uses: jurplel/install-qt-action@v4 | |
| with: | |
| version: ${{ matrix.qt_version }} | |
| modules: ${{ matrix.qt_modules }} | |
| - name: Generate binaries | |
| run: | | |
| cd Arduino-Source/SerialPrograms | |
| mkdir bin | |
| cd bin | |
| cmake .. -DQT_MAJOR:STRING=${{ matrix.qt_version_major }} ${{ matrix.toolset }} | |
| cmake --build . --config Release --parallel 10 | |
| - name: Copy resources | |
| if: startsWith(matrix.os, 'windows') | |
| run: | | |
| robocopy Packages/SerialPrograms/Resources Output/Resources /s | |
| robocopy Packages/PABotBase/PABotBase-Switch Output/PABotBase /s | |
| robocopy Arduino-Source/SerialPrograms/bin Output/Binaries *.dll | |
| robocopy Arduino-Source/SerialPrograms/bin/Release Output/Binaries SerialPrograms.exe | |
| echo https://github.com/${{github.repository}}/commit/${{github.sha}} > Output/version.txt | |
| write-host "Robocopy exited with exit code:" $lastexitcode | |
| if ($lastexitcode -eq 1) | |
| { | |
| exit 0 | |
| } | |
| else | |
| { | |
| exit 1 | |
| } | |
| - uses: actions/upload-artifact@v4 | |
| if: startsWith(matrix.os, 'windows') | |
| with: | |
| name: Serial Programs for windows (${{ matrix.qt_version }}) | |
| path: Output |