Skip to content

Commit

Permalink
Fix #6945 Fetch by GITHUB_SHA
Browse files Browse the repository at this point in the history
  • Loading branch information
phadej committed Jul 8, 2020
1 parent 2d78853 commit 22649ce
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 11 deletions.
30 changes: 20 additions & 10 deletions .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,9 @@ jobs:
# - uses: actions/checkout@v2
- name: Checkout
run: |
echo $GITHUB_REF $GITHUB_SHA
git clone --depth 1 https://github.com/$GITHUB_REPOSITORY.git .
git fetch origin $GITHUB_REF:temporary-ci-branch
git fetch origin $GITHUB_SHA:temporary-ci-branch
git checkout $GITHUB_SHA || (git fetch && git checkout $GITHUB_SHA)
- name: Validate print-config
run: sh validate.sh -j 2 -w ghc-8.10.1 -v -s print-config
Expand Down Expand Up @@ -92,8 +93,9 @@ jobs:
# - uses: actions/checkout@v2
- name: Checkout
run: |
echo $GITHUB_REF $GITHUB_SHA
git clone --depth 1 https://github.com/$GITHUB_REPOSITORY.git .
git fetch origin $GITHUB_REF:temporary-ci-branch
git fetch origin $GITHUB_SHA:temporary-ci-branch
git checkout $GITHUB_SHA || (git fetch && git checkout $GITHUB_SHA)
- name: Validate print-config
run: sh validate.sh -j 2 -w ghc-8.8.3 -v --solver-benchmarks -s print-config
Expand Down Expand Up @@ -139,8 +141,9 @@ jobs:
# - uses: actions/checkout@v2
- name: Checkout
run: |
echo $GITHUB_REF $GITHUB_SHA
git clone --depth 1 https://github.com/$GITHUB_REPOSITORY.git .
git fetch origin $GITHUB_REF:temporary-ci-branch
git fetch origin $GITHUB_SHA:temporary-ci-branch
git checkout $GITHUB_SHA || (git fetch && git checkout $GITHUB_SHA)
- name: Validate print-config
run: sh validate.sh -j 2 -w ghc-8.6.5 -v --complete-hackage-tests -s print-config
Expand Down Expand Up @@ -186,8 +189,9 @@ jobs:
# - uses: actions/checkout@v2
- name: Checkout
run: |
echo $GITHUB_REF $GITHUB_SHA
git clone --depth 1 https://github.com/$GITHUB_REPOSITORY.git .
git fetch origin $GITHUB_REF:temporary-ci-branch
git fetch origin $GITHUB_SHA:temporary-ci-branch
git checkout $GITHUB_SHA || (git fetch && git checkout $GITHUB_SHA)
- name: Validate print-config
run: sh validate.sh -j 2 -w ghc-8.4.4 -v -s print-config
Expand Down Expand Up @@ -233,8 +237,9 @@ jobs:
# - uses: actions/checkout@v2
- name: Checkout
run: |
echo $GITHUB_REF $GITHUB_SHA
git clone --depth 1 https://github.com/$GITHUB_REPOSITORY.git .
git fetch origin $GITHUB_REF:temporary-ci-branch
git fetch origin $GITHUB_SHA:temporary-ci-branch
git checkout $GITHUB_SHA || (git fetch && git checkout $GITHUB_SHA)
- name: Validate print-config
run: sh validate.sh -j 2 -w ghc-8.2.2 -v -s print-config
Expand Down Expand Up @@ -280,8 +285,9 @@ jobs:
# - uses: actions/checkout@v2
- name: Checkout
run: |
echo $GITHUB_REF $GITHUB_SHA
git clone --depth 1 https://github.com/$GITHUB_REPOSITORY.git .
git fetch origin $GITHUB_REF:temporary-ci-branch
git fetch origin $GITHUB_SHA:temporary-ci-branch
git checkout $GITHUB_SHA || (git fetch && git checkout $GITHUB_SHA)
- name: Validate print-config
run: sh validate.sh -j 2 -w ghc-8.0.2 -v -s print-config
Expand Down Expand Up @@ -327,8 +333,9 @@ jobs:
# - uses: actions/checkout@v2
- name: Checkout
run: |
echo $GITHUB_REF $GITHUB_SHA
git clone --depth 1 https://github.com/$GITHUB_REPOSITORY.git .
git fetch origin $GITHUB_REF:temporary-ci-branch
git fetch origin $GITHUB_SHA:temporary-ci-branch
git checkout $GITHUB_SHA || (git fetch && git checkout $GITHUB_SHA)
- name: Validate print-config
run: sh validate.sh -j 2 -w ghc-7.10.3 -v -s print-config
Expand Down Expand Up @@ -374,8 +381,9 @@ jobs:
# - uses: actions/checkout@v2
- name: Checkout
run: |
echo $GITHUB_REF $GITHUB_SHA
git clone --depth 1 https://github.com/$GITHUB_REPOSITORY.git .
git fetch origin $GITHUB_REF:temporary-ci-branch
git fetch origin $GITHUB_SHA:temporary-ci-branch
git checkout $GITHUB_SHA || (git fetch && git checkout $GITHUB_SHA)
- name: Validate print-config
run: sh validate.sh -j 2 -w ghc-7.8.4 -v --lib-only -s print-config
Expand Down Expand Up @@ -419,8 +427,9 @@ jobs:
# - uses: actions/checkout@v2
- name: Checkout
run: |
echo $GITHUB_REF $GITHUB_SHA
git clone --depth 1 https://github.com/$GITHUB_REPOSITORY.git .
git fetch origin $GITHUB_REF:temporary-ci-branch
git fetch origin $GITHUB_SHA:temporary-ci-branch
git checkout $GITHUB_SHA || (git fetch && git checkout $GITHUB_SHA)
- name: Validate print-config
run: sh validate.sh -j 2 -w ghc-7.6.3 -v --lib-only -s print-config
Expand Down Expand Up @@ -466,8 +475,9 @@ jobs:
# - uses: actions/checkout@v2
- name: Checkout
run: |
echo $GITHUB_REF $GITHUB_SHA
git clone --depth 1 https://github.com/$GITHUB_REPOSITORY.git .
git fetch origin $GITHUB_REF:temporary-ci-branch
git fetch origin $GITHUB_SHA:temporary-ci-branch
git checkout $GITHUB_SHA || (git fetch && git checkout $GITHUB_SHA)
- name: Validate print-config
run: sh validate.sh -j 2 -w ghc-8.8.3 -v --lib-only -s print-config
Expand Down
3 changes: 2 additions & 1 deletion boot/ci-linux.template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,9 @@ jobs:
# - uses: actions/checkout@v2
- name: Checkout
run: |
echo $GITHUB_REF $GITHUB_SHA
git clone --depth 1 https://github.com/$GITHUB_REPOSITORY.git .
git fetch origin $GITHUB_REF:temporary-ci-branch
git fetch origin $GITHUB_SHA:temporary-ci-branch
git checkout $GITHUB_SHA || (git fetch && git checkout $GITHUB_SHA)
{% for step in job.steps %}
- name: Validate {{step}}
Expand Down

0 comments on commit 22649ce

Please sign in to comment.