diff --git a/integration/ci/github-actions.rst b/integration/ci/github-actions.rst index cbfb8cecd7..0cc976eca7 100644 --- a/integration/ci/github-actions.rst +++ b/integration/ci/github-actions.rst @@ -58,13 +58,25 @@ This variant is default choice for native PlatformIO projects: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v2 + - 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@v1 - - name: Install dependencies + uses: actions/setup-python@v2 + - name: Install PlatformIO run: | python -m pip install --upgrade pip - pip install platformio + pip install --upgrade platformio - name: Run PlatformIO run: pio run -e -e -e @@ -91,13 +103,24 @@ and boards from command line interface: example: [path/to/test/file.c, examples/file.ino, path/to/test/directory] steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v2 + - 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@v1 - - name: Install dependencies + uses: actions/setup-python@v2 + - name: Install PlatformIO run: | python -m pip install --upgrade pip - pip install platformio + pip install --upgrade platformio - name: Run PlatformIO run: pio ci --board= --board= --board= env: @@ -169,14 +192,27 @@ Integration for USB_Host_Shield_2.0 project. The ``workflow.yml`` configuration example: [examples/Bluetooth/PS3SPP/PS3SPP.ino, examples/pl2303/pl2303_gps/pl2303_gps.ino] steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v2 + - 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@v1 + uses: actions/setup-python@v2 - - name: Install dependencies + - name: Install PlatformIO run: | python -m pip install --upgrade pip - pip install platformio + pip install --upgrade platformio wget https://github.com/xxxajk/spi4teensy3/archive/master.zip -O /tmp/spi4teensy3.zip unzip /tmp/spi4teensy3.zip -d /tmp