修复CI #2
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: Build | |
| on: | |
| push: | |
| branches: | |
| - master | |
| pull_request: | |
| branches: | |
| - master | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| environment: | |
| - emulator | |
| - smpl-v2-0213-1 | |
| - coreboard-v1-2 | |
| steps: | |
| - name: Checkout Code | |
| uses: actions/checkout@v4 | |
| - name: Restore Cache | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.platformio | |
| ~/.conan2 | |
| key: ${{ runner.os }}-build-${{ hashFiles('**/platformio.ini', '**/conanfile.py') }} | |
| restore-keys: | | |
| ${{ runner.os }}-build- | |
| - name: Install Toolchain | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install platformio conan | |
| - name: Install Emulator Dependencies | |
| if: matrix.environment == 'emulator' | |
| run: | | |
| conan profile detect --force | |
| conan install . --output-folder=build --build=missing -c tools.system.package_manager:mode=install -c tools.system.package_manager:sudo=True | |
| - name: Build with PlatformIO | |
| run: platformio run -e ${{ matrix.environment }} |