Skip to content

Commit

Permalink
ci(restore-node): bust the Yarn cache for Endo changes
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelfig committed Jan 7, 2024
1 parent 8b57193 commit f0f4290
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 5 deletions.
14 changes: 10 additions & 4 deletions .github/actions/restore-node/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,13 +72,17 @@ runs:
- name: Move Endo checkout outside the working directory
id: endo-sha
run: |-
set -e
set -ex
if test -e ./replacement-endo; then
mv ./replacement-endo ~/endo
echo "sha=$(cd ~/endo && git rev-parse HEAD)" >> $GITHUB_OUTPUT
sha=$(cd ~/endo && git rev-parse HEAD)
else
echo "sha=NOPE" >> $GITHUB_OUTPUT
sha=NOPE
fi
echo "sha=$sha" >> $GITHUB_OUTPUT
cd "${{ inputs.path }}"
echo "$sha" > endo-sha.txt
git add endo-sha.txt
shell: bash
- name: merge endo integration branch
id: endo-integration-merge
Expand All @@ -99,7 +103,9 @@ runs:
with:
node-version: ${{ inputs.node-version }}
cache: yarn
cache-dependency-path: ${{ inputs.path }}/yarn.lock
cache-dependency-path: |
${{ inputs.path }}/yarn.lock
${{ inputs.path }}/endo-sha.txt
- uses: kenchan0130/actions-system-info@master
id: system-info
- name: restore built files
Expand Down
5 changes: 4 additions & 1 deletion bin/agd
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ fi
$BUILD_ONLY || exec 1>&2

cd "$thisdir/.."
test -d "$STAMPS" || echo "Creating $STAMPS" 1>&2
mkdir -p "$STAMPS"

if $NEED_NODEJS; then
Expand Down Expand Up @@ -127,7 +128,8 @@ fi

src=$(find "${files[@]}" "${print[@]}" | head -1 || true)
test -z "$src" || {
echo "At least $src is newer than node_modules"
echo "At least $src is newer than $stamp"
ls -l "$src" "$stamp"
rm -f "$STAMPS/yarn-built"
lazy_yarn install
date > "$stamp"
Expand All @@ -151,6 +153,7 @@ fi
src=$(find "$GOLANG_DIR" \( ! -name '*_test.go' -name '*.go' -o -name '*.cc' -o -name 'go.*' \) "${print[@]}" | head -1 || true)
test -z "$src" || {
echo "At least $src is newer than $stamp"
ls -l "$src" "$stamp"

(
# Run this build in another subshell in case we had to modify the path.
Expand Down

0 comments on commit f0f4290

Please sign in to comment.