Skip to content

Commit

Permalink
Attempted fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ksperling-apple committed Mar 28, 2024
1 parent 7a206fa commit 9c9703b
Show file tree
Hide file tree
Showing 3 changed files with 52 additions and 18 deletions.
16 changes: 6 additions & 10 deletions .github/actions/bootstrap/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,10 @@ runs:
- name: Bootstrap from cache
id: restore
uses: Wandalen/[email protected]
uses: ./.github/actions/dynamic
continue-on-error: true
with:
action: ${{ steps.prepare.outputs.backend }}/cache/restore@v4
attempt_limit: 3
attempt_delay: 2000
with: |
key: ${{ steps.prepare.outputs.key }}
path: |
Expand All @@ -58,24 +56,22 @@ runs:
run: source scripts/bootstrap.sh -p all,${{ inputs.platform }}

- name: Save bootstrap cache
uses: Wandalen/[email protected]
uses: ./.github/actions/dynamic
if: ${{ fromJSON(steps.restore.outputs.outputs).cache-hit != 'true' }}
continue-on-error: true
with:
action: ${{ steps.prepare.outputs.backend }}/cache/save@v4
attempt_limit: 3
attempt_delay: 2000
with: |
key: ${{ steps.prepare.outputs.key }}
path: |
.environment
build_overrides/pigweed_environment.gni
.environment
build_overrides/pigweed_environment.gni
- name: Upload bootstrap logs
uses: actions/upload-artifact@v4
if: ${{ always() && !env.ACT && fromJSON(steps.restore.outputs.outputs).cache-hit != 'true' }}
with:
name: ${{ inputs.bootstrap-log-name }}
path: |
.environment/gn_out/.ninja_log
.environment/pigweed-venv/*.log
.environment/gn_out/.ninja_log
.environment/pigweed-venv/*.log
38 changes: 38 additions & 0 deletions .github/actions/dynamic/action.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Dynamic
description: Dynamically resolves another GitHub action
inputs:
action:
description: Action reference
required: true
with:
description: Action inputs as multi-line YAML string
required: false
default: ""
outputs:
outputs:
description: JSON object of outputs from the action
value: ${{ steps.run.outputs.outputs }}
runs:
using: composite
steps:
- name: Instantiate
shell: bash
run: |
# Dynamically invoke ${{ inputs.action }}
with='${{ inputs.with }}'
[[ -z "$with" ]] || with="$(echo ' with:'; sed -e 's/^/ /' <<<"$with")"
mkdir -p ./.tmp/dynamic-action-instance
cat <<END >./.tmp/dynamic-action-instance/action.yaml
runs:
using: composite
steps:
- id: run
uses: ${{ inputs.action }}
$with
outputs:
outputs:
value: $(echo '$'){{ toJSON(steps.run.outputs) }}
END
- name: Run
id: run
uses: ./.tmp/dynamic-action-instance
16 changes: 8 additions & 8 deletions .github/workflows/darwin.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,14 @@ jobs:
options: # We don't need a full matrix
- flavor: macos-release-availability
arguments: -sdk macosx -configuration Release WARNING_CFLAGS='${inherited} -Werror -Wconversion -Wno-unguarded-availability-new'
- flavor: ios-release
arguments: -sdk iphoneos -configuration Release WARNING_CFLAGS='${inherited} -Werror -Wconversion' GCC_PREPROCESSOR_DEFINITIONS='${inherited} MTR_NO_AVAILABILITY=1'
- flavor: ios-debug
arguments: -sdk iphoneos -configuration Debug WARNING_CFLAGS='${inherited} -Werror -Wconversion' GCC_PREPROCESSOR_DEFINITIONS='${inherited} MTR_NO_AVAILABILITY=1'
- flavor: tvos-debug
arguments: -sdk appletvos -configuration Debug WARNING_CFLAGS='${inherited} -Werror -Wconversion' GCC_PREPROCESSOR_DEFINITIONS='${inherited} MTR_NO_AVAILABILITY=1'
- flavor: watchos-debug
arguments: -sdk watchos -configuration Debug WARNING_CFLAGS='${inherited} -Werror -Wconversion' GCC_PREPROCESSOR_DEFINITIONS='${inherited} MTR_NO_AVAILABILITY=1'
# - flavor: ios-release
# arguments: -sdk iphoneos -configuration Release WARNING_CFLAGS='${inherited} -Werror -Wconversion' GCC_PREPROCESSOR_DEFINITIONS='${inherited} MTR_NO_AVAILABILITY=1'
# - flavor: ios-debug
# arguments: -sdk iphoneos -configuration Debug WARNING_CFLAGS='${inherited} -Werror -Wconversion' GCC_PREPROCESSOR_DEFINITIONS='${inherited} MTR_NO_AVAILABILITY=1'
# - flavor: tvos-debug
# arguments: -sdk appletvos -configuration Debug WARNING_CFLAGS='${inherited} -Werror -Wconversion' GCC_PREPROCESSOR_DEFINITIONS='${inherited} MTR_NO_AVAILABILITY=1'
# - flavor: watchos-debug
# arguments: -sdk watchos -configuration Debug WARNING_CFLAGS='${inherited} -Werror -Wconversion' GCC_PREPROCESSOR_DEFINITIONS='${inherited} MTR_NO_AVAILABILITY=1'
steps:
- name: Checkout
uses: actions/checkout@v4
Expand Down

0 comments on commit 9c9703b

Please sign in to comment.