From 2f8ab031f8fddf5fc818603ef67312a5b6bf6cfa Mon Sep 17 00:00:00 2001 From: fvanroie <15969459+fvanroie@users.noreply.github.com> Date: Wed, 17 Nov 2021 05:26:36 +0100 Subject: [PATCH] Add needs --- .github/workflows/build.yaml | 94 +++++++++++++++++++----------------- 1 file changed, 50 insertions(+), 44 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 66c5aaff..60b2bbc1 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -3,14 +3,57 @@ name: Build branch on: push: paths-ignore: - - "**.md" + - '**.md' workflow_dispatch: paths-ignore: - - "**.md" + - '**.md' jobs: - esp32: + 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 strategy: fail-fast: false @@ -44,44 +87,6 @@ jobs: out: yeacreate 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 - name: Run PlatformIO run: pio run -e ${{ matrix.environment.env }} - name: Upload output file @@ -100,16 +105,17 @@ jobs: # hub release create "${assets[@]}" -m "$tag_name" "$tag_name" # env: # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - linux: + linux_build: runs-on: ubuntu-latest + needs: prepare steps: - 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 + 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: Run PlatformIO - run: pio run -e linux_sdl_64bits + run: pio run -e linux_sdl_64bits \ No newline at end of file