diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 60b2bbc1..f33f5b84 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -9,48 +9,6 @@ on: - '**.md' jobs: - prepare: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - with: - submodules: 'true' - - name: Cache pip - uses: actions/cache@v2 - with: - path: ~/.cache/pip - key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }} - restore-keys: | - ${{ runner.os }}-pip- - - name: Cache PlatformIO - uses: actions/cache@v2 - with: - path: ~/.platformio - key: ${{ runner.os }}-${{ hashFiles('**/lockfiles') }} - - name: Set up Python - uses: actions/setup-python@v2 - - name: Install PlatformIO - run: | - python -m pip install --upgrade pip - pip install --upgrade platformio - - name: Enable ESP32 platforms from platformio_override-template.ini - run: | - sed 's/; user_setups\/esp32/user_setups\/esp32/g' platformio_override-template.ini > platformio_override.ini - - name: Enable Linux platform from platformio_override.ini - run: | - sed -i 's/; user_setups\/linux/user_setups\/linux/g' platformio_override.ini - mkdir -p .pio/libdeps/linux_sdl_64bits/paho/src - - name: Install SDL2 library - run: | - sudo apt-get update - sudo apt-get install libsdl2-dev - - name: List all files in current folder - run: | - ls -la - - name: Cat platformio_override.ini - run: | - cat platformio_override.ini - build_esp32: runs-on: ubuntu-latest needs: prepare @@ -87,6 +45,38 @@ jobs: out: yeacreate steps: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + with: + submodules: 'true' + - name: Cache pip + uses: actions/cache@v2 + with: + path: ~/.cache/pip + key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }} + restore-keys: | + ${{ runner.os }}-pip- + - name: Cache PlatformIO + uses: actions/cache@v2 + with: + path: ~/.platformio + key: ${{ runner.os }}-${{ hashFiles('**/lockfiles') }} + - name: Set up Python + uses: actions/setup-python@v2 + - name: Install PlatformIO + run: | + python -m pip install --upgrade pip + pip install --upgrade platformio + - name: Enable ESP32 platforms from platformio_override-template.ini + run: | + sed 's/; user_setups\/esp32/user_setups\/esp32/g' platformio_override-template.ini > platformio_override.ini + - name: List all files in current folder + run: | + ls -la + - name: Cat platformio_override.ini + run: | + cat platformio_override.ini - name: Run PlatformIO run: pio run -e ${{ matrix.environment.env }} - name: Upload output file @@ -107,8 +97,42 @@ jobs: # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} linux_build: runs-on: ubuntu-latest - needs: prepare steps: + - uses: actions/checkout@v2 + with: + submodules: 'true' + - name: Cache pip + uses: actions/cache@v2 + with: + path: ~/.cache/pip + key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }} + restore-keys: | + ${{ runner.os }}-pip- + - name: Cache PlatformIO + uses: actions/cache@v2 + with: + path: ~/.platformio + key: ${{ runner.os }}-${{ hashFiles('**/lockfiles') }} + - name: Set up Python + uses: actions/setup-python@v2 + - name: Install PlatformIO + run: | + python -m pip install --upgrade pip + pip install --upgrade platformio + - name: Enable Linux platform from platformio_override.ini + run: | + sed 's/; user_setups\/linux/user_setups\/linux/g' platformio_override-template.ini > platformio_override.ini + mkdir -p .pio/libdeps/linux_sdl_64bits/paho/src + - name: Install SDL2 library + run: | + sudo apt-get update + sudo apt-get install libsdl2-dev + - name: List all files in current folder + run: | + ls -la + - name: Cat platformio_override.ini + run: | + cat platformio_override.ini - name: Enable Linux platform from platformio_override.ini run: | sed -i 's/; user_setups\/linux/user_setups\/linux/g' platformio_override.ini