Commit 3bd1d5c7 authored by Oleg Grenrus's avatar Oleg Grenrus

Make git checkout more robust by falling back to complete fetch

parent 3fd6d070
......@@ -45,7 +45,7 @@ jobs:
run: |
git clone --depth 1 https://github.com/$GITHUB_REPOSITORY.git .
git fetch origin $GITHUB_REF:temporary-ci-branch
git checkout $GITHUB_SHA
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 --lib-only -s print-config
- name: Validate print-tool-versions
......@@ -82,7 +82,7 @@ jobs:
run: |
git clone --depth 1 https://github.com/$GITHUB_REPOSITORY.git .
git fetch origin $GITHUB_REF:temporary-ci-branch
git checkout $GITHUB_SHA
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
- name: Validate print-tool-versions
......@@ -126,7 +126,7 @@ jobs:
run: |
git clone --depth 1 https://github.com/$GITHUB_REPOSITORY.git .
git fetch origin $GITHUB_REF:temporary-ci-branch
git checkout $GITHUB_SHA
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 -s print-config
- name: Validate print-tool-versions
......@@ -170,7 +170,7 @@ jobs:
run: |
git clone --depth 1 https://github.com/$GITHUB_REPOSITORY.git .
git fetch origin $GITHUB_REF:temporary-ci-branch
git checkout $GITHUB_SHA
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
- name: Validate print-tool-versions
......@@ -214,7 +214,7 @@ jobs:
run: |
git clone --depth 1 https://github.com/$GITHUB_REPOSITORY.git .
git fetch origin $GITHUB_REF:temporary-ci-branch
git checkout $GITHUB_SHA
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
- name: Validate print-tool-versions
......@@ -258,7 +258,7 @@ jobs:
run: |
git clone --depth 1 https://github.com/$GITHUB_REPOSITORY.git .
git fetch origin $GITHUB_REF:temporary-ci-branch
git checkout $GITHUB_SHA
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
- name: Validate print-tool-versions
......@@ -302,7 +302,7 @@ jobs:
run: |
git clone --depth 1 https://github.com/$GITHUB_REPOSITORY.git .
git fetch origin $GITHUB_REF:temporary-ci-branch
git checkout $GITHUB_SHA
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
- name: Validate print-tool-versions
......@@ -346,7 +346,7 @@ jobs:
run: |
git clone --depth 1 https://github.com/$GITHUB_REPOSITORY.git .
git fetch origin $GITHUB_REF:temporary-ci-branch
git checkout $GITHUB_SHA
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
- name: Validate print-tool-versions
......@@ -388,7 +388,7 @@ jobs:
run: |
git clone --depth 1 https://github.com/$GITHUB_REPOSITORY.git .
git fetch origin $GITHUB_REF:temporary-ci-branch
git checkout $GITHUB_SHA
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
- name: Validate print-tool-versions
......@@ -432,7 +432,7 @@ jobs:
run: |
git clone --depth 1 https://github.com/$GITHUB_REPOSITORY.git .
git fetch origin $GITHUB_REF:temporary-ci-branch
git checkout $GITHUB_SHA
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
- name: Validate print-tool-versions
......
......@@ -60,7 +60,7 @@ jobs:
run: |
git clone --depth 1 https://github.com/$GITHUB_REPOSITORY.git .
git fetch origin $GITHUB_REF:temporary-ci-branch
git checkout $GITHUB_SHA
git checkout $GITHUB_SHA || (git fetch && git checkout $GITHUB_SHA)
{% for step in job.steps %}
- name: Validate {{step}}
run: sh validate.sh -j 2 -w ghc-{{job.version}} -v {{job.flags}} -s {{step}}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment