Skip to content

Commit

Permalink
Performance same check for Make 3.81 Regression test
Browse files Browse the repository at this point in the history
  • Loading branch information
Jake-Carter committed Jan 10, 2024
1 parent 3a98ba9 commit 8fc0854
Showing 1 changed file with 18 additions and 3 deletions.
21 changes: 18 additions & 3 deletions .github/workflows/Build_Examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -245,8 +245,10 @@ jobs:
fi
- name: Check watch files
id: check_watch
id: check_watch
run: |
echo SOURCE_BRANCH = $SOURCE_BRANCH
echo TARGET_BRANCH = $TARGET_BRANCH
# Determine if we need to run the test
RUN_TEST=0
Expand All @@ -255,6 +257,11 @@ jobs:
RUN_TEST=1
fi
if [[ $SOURCE_BRANCH == "main" ]]; then
echo "Pushed to main, running test"
RUN_TEST=1
fi
# Check for changes made to these files
WATCH_FILES="\
Build_Examples.yml \
Expand All @@ -268,8 +275,16 @@ jobs:
makefile \
Makefile"
# Get the diff from main
CHANGE_FILES=$(git diff --ignore-submodules --name-only remotes/origin/main)
if [[ -n $TARGET_BRANCH ]]; then
# We are in a PR. Need to check changes against the target branch.
echo "Comparing PR against target branch: $TARGET_BRANCH"
echo "Adding remote '$GITHUB_SERVER_URL/$GITHUB_REPOSITORY' as 'upstream'"
git remote add upstream $GITHUB_SERVER_URL/$GITHUB_REPOSITORY
echo "Fetching $TARGET_BRANCH"
git fetch upstream $TARGET_BRANCH
echo "diffing files"
CHANGE_FILES=$(git diff --ignore-submodules --name-only remotes/upstream/$TARGET_BRANCH)
fi
echo "Watching these locations and files"
echo $WATCH_FILES
Expand Down

0 comments on commit 8fc0854

Please sign in to comment.