| name: Bootstrap |
| description: Bootstrap |
| inputs: |
| platform: |
| description: "Platform name" |
| required: false |
| default: none |
| bootstrap-log-name: |
| description: "Bootstrap log name" |
| required: false |
| default: bootstrap-logs-${{ github.job }} |
| |
| runs: |
| using: "composite" |
| steps: |
| - uses: Wandalen/wretry.action@v1.4.10 |
| name: Bootstrap from cache |
| id: bootstrap-cache |
| continue-on-error: true |
| with: |
| action: buildjet/cache@v4 |
| attempt_limit: 3 |
| attempt_delay: 2000 |
| with: | |
| key: ${{ runner.os }}-${{ inputs.platform }}-env-${{ hashFiles('scripts/setup/*', 'third_party/pigweed/**') }} |
| path: | |
| .environment |
| build_overrides/pigweed_environment.gni |
| |
| - name: Run bootstrap |
| if: fromJSON(steps.bootstrap-cache.outputs.outputs).cache-hit != 'true' # retry returns all outputs in `outputs` |
| env: |
| PW_NO_CIPD_CACHE_DIR: Y |
| shell: bash |
| run: source scripts/bootstrap.sh -p all,${{ inputs.platform }} |
| |
| - name: Uploading bootstrap logs |
| uses: actions/upload-artifact@v3 |
| if: always() && !env.ACT && fromJSON(steps.bootstrap-cache.outputs.outputs).cache-hit != 'true' |
| with: |
| name: ${{ inputs.bootstrap-log-name }} |
| path: | |
| .environment/gn_out/.ninja_log |
| .environment/pigweed-venv/*.log |