Welcome to mirror list, hosted at ThFree Co, Russian Federation.

platformio.yaml « workflows « .github - github.com/nanopb/nanopb.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: c9cde67a71cfbe269fe42a0ffbc3e998554d0d29 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
name: platformio

on:
  push:
  pull_request:

jobs:
  platformio:
    name: Build and run PlatformIO example
    runs-on: ubuntu-latest
    steps:
      - name: ⤵️ Check out code from GitHub
        uses: actions/checkout@v2
        with:
          path: nanopb

      - name: Installing dependencies for local act
        if: ${{ env.ACT }}
        run: |
          sudo apt update

      - name: Installing common dependencies
        run: |
          sudo apt install -y python3-pip python3-protobuf protobuf-compiler

      - name: Install and setup PlatformIO
        run: |
          pip3 install -U platformio
          export PATH=~/.local/bin:$PATH

      - name: Build PlatformIO package
        run: |
          cd nanopb
          pio package pack

      - name: Example - Extract PlatformIO package to example dir
        run: |
          cp -R nanopb/examples/platformio example
          mkdir -p example/lib/nanopb
          tar -xzf nanopb/Nanopb-*.tar.gz -C example/lib/nanopb

      - name: Example - Build
        run: |
          cd example
          pio run

      - name: Example - Run test without options
        run: example/.pio/build/pio_without_options/program

      - name: Example - Run test with options
        run: example/.pio/build/pio_with_options/program

      - name: Build with default platformio.ini
        run: |
          mkdir -p test_default_pio_conf
          cd test_default_pio_conf
          pio project init
          ln -s ../nanopb lib/nanopb
          echo "[env:native]" >> platformio.ini
          echo "platform = native" >> platformio.ini
          echo "lib_deps = Nanopb" >> platformio.ini
          echo "int main(int argc, char *argv[]){}" > src/main.cpp
          pio run