diff --git a/.github/workflows/build_check.yml b/.github/workflows/build_check.yml index 72a2f8f..f86f656 100644 --- a/.github/workflows/build_check.yml +++ b/.github/workflows/build_check.yml @@ -10,16 +10,27 @@ jobs: name: Compile Firmware runs-on: ubuntu-latest steps: - - name: Checkout code - uses: actions/checkout@v2 - - name: Set up Python - uses: actions/setup-python@v2 + - uses: actions/cache@v3 + with: + path: | + ~/.cache/pip + ~/.platformio/.cache + key: compile-cache + - uses: actions/setup-python@v4 + with: + python-version: '3.10' - name: Install PlatformIO - run: python -m pip install --upgrade pip platformio - - name: Run PlatformIO CI - run: platformio run + shell: bash + run: | + python -m pip install --upgrade pip + pip install --upgrade platformio + + - name: Checkout code + uses: actions/checkout@v3 + - name: Build PlatformIO Project + run: pio run - name: Upload artifacts - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 with: name: firmware path: .pio/build/lora_board/firmware.bin @@ -40,7 +51,7 @@ jobs: #- 'lib/TimeLib' steps: - name: Checkout code - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Run clang-format style check for C/C++ programs. uses: jidicula/clang-format-action@v4.10.2 with: @@ -54,14 +65,45 @@ jobs: CPPCHECK_ARGS: --enable=all --std=c++14 --inline-suppr -I lib/BoardFinder -I lib/ConfigurationManagement -I lib/Display -I lib/LoRa -I lib/LoRa_APRS -I lib/NTPClient -I lib/PowerManagement -I lib/System -I lib/TimeLib -i lib/Display -i lib/LoRa -i lib/NTPClient -i lib/TimeLib src lib steps: - name: checkout code - uses: actions/checkout@v2 + uses: actions/checkout@v3 - run: docker pull facthunder/cppcheck:latest - name: Run cppcheck and print result run: docker run --rm -v ${PWD}:/src facthunder/cppcheck:latest /bin/bash -c "cppcheck $CPPCHECK_ARGS" - name: Run cppcheck and create html run: docker run --rm -v ${PWD}:/src facthunder/cppcheck:latest /bin/bash -c "cppcheck --xml $CPPCHECK_ARGS 2> report.xml && cppcheck-htmlreport --file=report.xml --report-dir=output" - name: Upload report - uses: actions/upload-artifact@v1 + uses: actions/upload-artifact@v3 with: name: Cppcheck Report path: output + + + remote_testing: + name: Remote Testing + runs-on: ubuntu-20.04 + env: + PLATFORMIO_AUTH_TOKEN: ${{ secrets.PLATFORMIO_AUTH_TOKEN }} + steps: + - name: Setup Cache + uses: actions/cache@v3 + with: + path: | + ~/.cache/pip + ~/.platformio + key: remote-cache + - name: Setup Python + uses: actions/setup-python@v4 + with: + python-version: '3.10' + - name: Install PlatformIO + shell: bash + run: | + python -m pip install --upgrade pip + pip install --upgrade platformio + + - name: Checkout code + uses: actions/checkout@v3 + - name: List Devices + run: pio remote device list + - name: PlatformIO Test + run: pio remote test -v -r --upload-port /dev/ttyUSB4 --test-port /dev/ttyUSB4 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 71a9939..deb1956 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -9,7 +9,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout code - uses: actions/checkout@v2 + uses: actions/checkout@v3 with: fetch-depth: 0 - name: Set up Python @@ -23,7 +23,7 @@ jobs: name: Create new release runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - run: sudo apt-get install python3-setuptools python3-wheel - run: pip3 install platformio - run: echo "$HOME/.local/bin" >> $GITHUB_PATH