Skip to content
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.

[develop] Actions rerun fixes. #8713

Merged
merged 1 commit into from
Feb 27, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 1 addition & 7 deletions .cicd/submodule-regression-check.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ if [[ $BUILDKITE == true ]]; then
else
[[ -z $GITHUB_BASE_REF ]] && echo "Cannot find \$GITHUB_BASE_REF, so we have nothing to compare submodules to. Skipping submodule regression check." && exit 0
BASE_BRANCH=$GITHUB_BASE_REF
CURRENT_BRANCH=$GITHUB_SHA
CURRENT_BRANCH="refs/remotes/pull/$PR_NUMBER/merge"
fi

echo "getting submodule info for $CURRENT_BRANCH"
Expand All @@ -25,12 +25,6 @@ while read -r a b; do
BASE_MAP[$a]=$b
done < <(git submodule --quiet foreach --recursive 'echo $path `git log -1 --format=%ct`')

# We need to switch back to the PR ref/head so we can git log properly
if [[ $BUILDKITE != true ]]; then
echo "git fetch origin +$GITHUB_REF:"
git fetch origin +${GITHUB_REF}: 1> /dev/null
fi

echo "switching back to $CURRENT_BRANCH..."
echo "git checkout -qf $CURRENT_BRANCH"
git checkout -qf $CURRENT_BRANCH 1> /dev/null
Expand Down
192 changes: 129 additions & 63 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,22 @@
name: Pull Request
on: [pull_request]

env:
PR_NUMBER: ${{ toJson(github.event.number) }}

jobs:
submodule_regression_check:
if: github.event.pull_request.base.repo.id != github.event.pull_request.head.repo.id
name: Submodule Regression Check
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@50fbc622fc4ef5163becd7fab6573eac35f8462e
with:
submodules: recursive
run: |
git clone https://github.com/${GITHUB_REPOSITORY} .
git fetch -v --prune origin +refs/pull/${PR_NUMBER}/merge:refs/remotes/pull/${PR_NUMBER}/merge
git checkout --force --progress refs/remotes/pull/${PR_NUMBER}/merge
git submodule sync --recursive
git submodule update --init --force --recursive
- name: Submodule Regression Check
run: ./.cicd/submodule-regression-check.sh

Expand All @@ -21,9 +27,12 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@50fbc622fc4ef5163becd7fab6573eac35f8462e
with:
submodules: recursive
run: |
git clone https://github.com/${GITHUB_REPOSITORY} .
git fetch -v --prune origin +refs/pull/${PR_NUMBER}/merge:refs/remotes/pull/${PR_NUMBER}/merge
git checkout --force --progress refs/remotes/pull/${PR_NUMBER}/merge
git submodule sync --recursive
git submodule update --init --force --recursive
- name: Build
run: |
./.cicd/build.sh
Expand All @@ -42,9 +51,12 @@ jobs:
needs: amazon_linux-2-build
steps:
- name: Checkout
uses: actions/checkout@50fbc622fc4ef5163becd7fab6573eac35f8462e
with:
submodules: recursive
run: |
git clone https://github.com/${GITHUB_REPOSITORY} .
git fetch -v --prune origin +refs/pull/${PR_NUMBER}/merge:refs/remotes/pull/${PR_NUMBER}/merge
git checkout --force --progress refs/remotes/pull/${PR_NUMBER}/merge
git submodule sync --recursive
git submodule update --init --force --recursive
- name: Download Build Artifact
uses: actions/download-artifact@v1
with:
Expand All @@ -62,9 +74,12 @@ jobs:
needs: amazon_linux-2-build
steps:
- name: Checkout
uses: actions/checkout@50fbc622fc4ef5163becd7fab6573eac35f8462e
with:
submodules: recursive
run: |
git clone https://github.com/${GITHUB_REPOSITORY} .
git fetch -v --prune origin +refs/pull/${PR_NUMBER}/merge:refs/remotes/pull/${PR_NUMBER}/merge
git checkout --force --progress refs/remotes/pull/${PR_NUMBER}/merge
git submodule sync --recursive
git submodule update --init --force --recursive
- name: Download Build Artifact
uses: actions/download-artifact@v1
with:
Expand All @@ -82,9 +97,12 @@ jobs:
needs: amazon_linux-2-build
steps:
- name: Checkout
uses: actions/checkout@50fbc622fc4ef5163becd7fab6573eac35f8462e
with:
submodules: recursive
run: |
git clone https://github.com/${GITHUB_REPOSITORY} .
git fetch -v --prune origin +refs/pull/${PR_NUMBER}/merge:refs/remotes/pull/${PR_NUMBER}/merge
git checkout --force --progress refs/remotes/pull/${PR_NUMBER}/merge
git submodule sync --recursive
git submodule update --init --force --recursive
- name: Download Build Artifact
uses: actions/download-artifact@v1
with:
Expand All @@ -104,9 +122,12 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@50fbc622fc4ef5163becd7fab6573eac35f8462e
with:
submodules: recursive
run: |
git clone https://github.com/${GITHUB_REPOSITORY} .
git fetch -v --prune origin +refs/pull/${PR_NUMBER}/merge:refs/remotes/pull/${PR_NUMBER}/merge
git checkout --force --progress refs/remotes/pull/${PR_NUMBER}/merge
git submodule sync --recursive
git submodule update --init --force --recursive
- name: Build
run: |
./.cicd/build.sh
Expand All @@ -125,9 +146,12 @@ jobs:
needs: centos-77-build
steps:
- name: Checkout
uses: actions/checkout@50fbc622fc4ef5163becd7fab6573eac35f8462e
with:
submodules: recursive
run: |
git clone https://github.com/${GITHUB_REPOSITORY} .
git fetch -v --prune origin +refs/pull/${PR_NUMBER}/merge:refs/remotes/pull/${PR_NUMBER}/merge
git checkout --force --progress refs/remotes/pull/${PR_NUMBER}/merge
git submodule sync --recursive
git submodule update --init --force --recursive
- name: Download Build Artifact
uses: actions/download-artifact@v1
with:
Expand All @@ -145,9 +169,12 @@ jobs:
needs: centos-77-build
steps:
- name: Checkout
uses: actions/checkout@50fbc622fc4ef5163becd7fab6573eac35f8462e
with:
submodules: recursive
run: |
git clone https://github.com/${GITHUB_REPOSITORY} .
git fetch -v --prune origin +refs/pull/${PR_NUMBER}/merge:refs/remotes/pull/${PR_NUMBER}/merge
git checkout --force --progress refs/remotes/pull/${PR_NUMBER}/merge
git submodule sync --recursive
git submodule update --init --force --recursive
- name: Download Build Artifact
uses: actions/download-artifact@v1
with:
Expand All @@ -165,9 +192,12 @@ jobs:
needs: centos-77-build
steps:
- name: Checkout
uses: actions/checkout@50fbc622fc4ef5163becd7fab6573eac35f8462e
with:
submodules: recursive
run: |
git clone https://github.com/${GITHUB_REPOSITORY} .
git fetch -v --prune origin +refs/pull/${PR_NUMBER}/merge:refs/remotes/pull/${PR_NUMBER}/merge
git checkout --force --progress refs/remotes/pull/${PR_NUMBER}/merge
git submodule sync --recursive
git submodule update --init --force --recursive
- name: Download Build Artifact
uses: actions/download-artifact@v1
with:
Expand All @@ -187,9 +217,12 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@50fbc622fc4ef5163becd7fab6573eac35f8462e
with:
submodules: recursive
run: |
git clone https://github.com/${GITHUB_REPOSITORY} .
git fetch -v --prune origin +refs/pull/${PR_NUMBER}/merge:refs/remotes/pull/${PR_NUMBER}/merge
git checkout --force --progress refs/remotes/pull/${PR_NUMBER}/merge
git submodule sync --recursive
git submodule update --init --force --recursive
- name: Build
run: |
./.cicd/build.sh
Expand All @@ -208,9 +241,12 @@ jobs:
needs: ubuntu-1604-build
steps:
- name: Checkout
uses: actions/checkout@50fbc622fc4ef5163becd7fab6573eac35f8462e
with:
submodules: recursive
run: |
git clone https://github.com/${GITHUB_REPOSITORY} .
git fetch -v --prune origin +refs/pull/${PR_NUMBER}/merge:refs/remotes/pull/${PR_NUMBER}/merge
git checkout --force --progress refs/remotes/pull/${PR_NUMBER}/merge
git submodule sync --recursive
git submodule update --init --force --recursive
- name: Download Build Artifact
uses: actions/download-artifact@v1
with:
Expand All @@ -228,9 +264,12 @@ jobs:
needs: ubuntu-1604-build
steps:
- name: Checkout
uses: actions/checkout@50fbc622fc4ef5163becd7fab6573eac35f8462e
with:
submodules: recursive
run: |
git clone https://github.com/${GITHUB_REPOSITORY} .
git fetch -v --prune origin +refs/pull/${PR_NUMBER}/merge:refs/remotes/pull/${PR_NUMBER}/merge
git checkout --force --progress refs/remotes/pull/${PR_NUMBER}/merge
git submodule sync --recursive
git submodule update --init --force --recursive
- name: Download Build Artifact
uses: actions/download-artifact@v1
with:
Expand All @@ -248,9 +287,12 @@ jobs:
needs: ubuntu-1604-build
steps:
- name: Checkout
uses: actions/checkout@50fbc622fc4ef5163becd7fab6573eac35f8462e
with:
submodules: recursive
run: |
git clone https://github.com/${GITHUB_REPOSITORY} .
git fetch -v --prune origin +refs/pull/${PR_NUMBER}/merge:refs/remotes/pull/${PR_NUMBER}/merge
git checkout --force --progress refs/remotes/pull/${PR_NUMBER}/merge
git submodule sync --recursive
git submodule update --init --force --recursive
- name: Download Build Artifact
uses: actions/download-artifact@v1
with:
Expand All @@ -270,9 +312,12 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@50fbc622fc4ef5163becd7fab6573eac35f8462e
with:
submodules: recursive
run: |
git clone https://github.com/${GITHUB_REPOSITORY} .
git fetch -v --prune origin +refs/pull/${PR_NUMBER}/merge:refs/remotes/pull/${PR_NUMBER}/merge
git checkout --force --progress refs/remotes/pull/${PR_NUMBER}/merge
git submodule sync --recursive
git submodule update --init --force --recursive
- name: Build
run: |
./.cicd/build.sh
Expand All @@ -291,9 +336,12 @@ jobs:
needs: ubuntu-1804-build
steps:
- name: Checkout
uses: actions/checkout@50fbc622fc4ef5163becd7fab6573eac35f8462e
with:
submodules: recursive
run: |
git clone https://github.com/${GITHUB_REPOSITORY} .
git fetch -v --prune origin +refs/pull/${PR_NUMBER}/merge:refs/remotes/pull/${PR_NUMBER}/merge
git checkout --force --progress refs/remotes/pull/${PR_NUMBER}/merge
git submodule sync --recursive
git submodule update --init --force --recursive
- name: Download Build Artifact
uses: actions/download-artifact@v1
with:
Expand All @@ -311,9 +359,12 @@ jobs:
needs: ubuntu-1804-build
steps:
- name: Checkout
uses: actions/checkout@50fbc622fc4ef5163becd7fab6573eac35f8462e
with:
submodules: recursive
run: |
git clone https://github.com/${GITHUB_REPOSITORY} .
git fetch -v --prune origin +refs/pull/${PR_NUMBER}/merge:refs/remotes/pull/${PR_NUMBER}/merge
git checkout --force --progress refs/remotes/pull/${PR_NUMBER}/merge
git submodule sync --recursive
git submodule update --init --force --recursive
- name: Download Build Artifact
uses: actions/download-artifact@v1
with:
Expand All @@ -331,9 +382,12 @@ jobs:
needs: ubuntu-1804-build
steps:
- name: Checkout
uses: actions/checkout@50fbc622fc4ef5163becd7fab6573eac35f8462e
with:
submodules: recursive
run: |
git clone https://github.com/${GITHUB_REPOSITORY} .
git fetch -v --prune origin +refs/pull/${PR_NUMBER}/merge:refs/remotes/pull/${PR_NUMBER}/merge
git checkout --force --progress refs/remotes/pull/${PR_NUMBER}/merge
git submodule sync --recursive
git submodule update --init --force --recursive
- name: Download Build Artifact
uses: actions/download-artifact@v1
with:
Expand All @@ -353,9 +407,12 @@ jobs:
runs-on: macos-latest
steps:
- name: Checkout
uses: actions/checkout@50fbc622fc4ef5163becd7fab6573eac35f8462e
with:
submodules: recursive
run: |
git clone https://github.com/${GITHUB_REPOSITORY} .
git fetch -v --prune origin +refs/pull/${PR_NUMBER}/merge:refs/remotes/pull/${PR_NUMBER}/merge
git checkout --force --progress refs/remotes/pull/${PR_NUMBER}/merge
git submodule sync --recursive
git submodule update --init --force --recursive
- name: Build
run: |
./.cicd/platforms/unpinned/macos-10.15-unpinned.sh
Expand All @@ -372,9 +429,12 @@ jobs:
needs: macos-1015-build
steps:
- name: Checkout
uses: actions/checkout@50fbc622fc4ef5163becd7fab6573eac35f8462e
with:
submodules: recursive
run: |
git clone https://github.com/${GITHUB_REPOSITORY} .
git fetch -v --prune origin +refs/pull/${PR_NUMBER}/merge:refs/remotes/pull/${PR_NUMBER}/merge
git checkout --force --progress refs/remotes/pull/${PR_NUMBER}/merge
git submodule sync --recursive
git submodule update --init --force --recursive
- name: Download Build Artifact
uses: actions/download-artifact@v1
with:
Expand All @@ -390,9 +450,12 @@ jobs:
needs: macos-1015-build
steps:
- name: Checkout
uses: actions/checkout@50fbc622fc4ef5163becd7fab6573eac35f8462e
with:
submodules: recursive
run: |
git clone https://github.com/${GITHUB_REPOSITORY} .
git fetch -v --prune origin +refs/pull/${PR_NUMBER}/merge:refs/remotes/pull/${PR_NUMBER}/merge
git checkout --force --progress refs/remotes/pull/${PR_NUMBER}/merge
git submodule sync --recursive
git submodule update --init --force --recursive
- name: Download Build Artifact
uses: actions/download-artifact@v1
with:
Expand All @@ -408,9 +471,12 @@ jobs:
needs: macos-1015-build
steps:
- name: Checkout
uses: actions/checkout@50fbc622fc4ef5163becd7fab6573eac35f8462e
with:
submodules: recursive
run: |
git clone https://github.com/${GITHUB_REPOSITORY} .
git fetch -v --prune origin +refs/pull/${PR_NUMBER}/merge:refs/remotes/pull/${PR_NUMBER}/merge
git checkout --force --progress refs/remotes/pull/${PR_NUMBER}/merge
git submodule sync --recursive
git submodule update --init --force --recursive
- name: Download Build Artifact
uses: actions/download-artifact@v1
with:
Expand Down