Tips/suggestions for build pipeline

#1

I’ve done a quick Google and didn’t find anything immediately useful, so thought I’d ask the question:

Is anyone willing to share some of their automated build/test/publish pipelines?

GitHub actions would be great :grin:

#2

Not finished yet but this is what I’ve come up with so far. Still have an issue during the build where it can’t find the pppos library :frowning:

name: CI

on:
  pull_request:
    branches:
      - master
      - develop
      - feature/**
      - bugfix/**

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
  # This workflow contains a single job called "build"
  build:
    # The type of runner that the job will run on
    runs-on: ubuntu-latest

    # Steps represent a sequence of tasks that will be executed as part of the job
    steps:
    - name: Checkout main repo
      uses: actions/checkout@v2

    - name: Checkout private repos
      uses: actions/checkout@v2
      with:
        repository: klimbot/cloud-logger
        token: ${{ secrets.PRIVATE_ACCESS_TOKEN }}
        path: deps/cloud-logger

    # Runs a set of commands using the runners shell
    - name: Update and install mos and dependencies
      run: |
        sudo add-apt-repository ppa:mongoose-os/mos
        sudo apt-get update
        sudo apt-get install runc containerd docker.io
        sudo apt-get install mos
        
    - name: Add user to docker group and start
      run: |
        sudo usermod -aG docker $USER
        sudo systemctl unmask docker
        sudo systemctl start docker
    # Perform the build locally
    - name: Build
      run: |
        mos build --local --platform esp32 --verbose
      shell: bash 

The error I’m trying to resolve is:

/home/runner/work/esp32-mongoose/esp32-mongoose/deps/pppos/src/mgos_pppos.c:84:3: error: unknown type name 'ppp_pcb'
[1151](https://github.com/klimbot/esp32-mongoose/runs/1055957593?check_suite_focus=true#step:7:1151) ppp_pcb *pppcb;
[1152](https://github.com/klimbot/esp32-mongoose/runs/1055957593?check_suite_focus=true#step:7:1152) ^

It’s strange though because it compiles fine on my local machine.
My mos.yml has:

conds:
  - when: mos.platform == "esp32"
    apply:
      libs:
        - origin: https://github.com/mongoose-os-libs/pppos
1 Like
#3

Solved the PPPOS problem with a build var. No idea why I’m getting the error in GH and not my local.

build_vars:
  ESP_IDF_SDKCONFIG_OPTS: >
    "${build_vars.ESP_IDF_SDKCONFIG_OPTS}"
      CONFIG_FREERTOS_UNICORE=y
      PPP_SUPPORT: 1

Never really looked at this line in any detail from the first example I copied, turns out I don’t even use PPPOS :slight_smile:

Hopefully this basic pipeline will help someone else out using GH

1 Like