Skip to content

fixup! TO-DROP: restrict to the xargs: environment is too large tests #1589

fixup! TO-DROP: restrict to the xargs: environment is too large tests

fixup! TO-DROP: restrict to the xargs: environment is too large tests #1589

Workflow file for this run

name: CI
on: [push, pull_request]
env:
DEVELOPER: 1
# If more than one workflow run is triggered for the very same commit hash
# (which happens when multiple branches pointing to the same commit), only
# the first one is allowed to run, the second will be kept in the "queued"
# state. This allows a successful completion of the first run to be reused
# in the second run via the `skip-if-redundant` logic in the `config` job.
#
# The only caveat is that if a workflow run is triggered for the same commit
# hash that another run is already being held, that latter run will be
# canceled. For more details about the `concurrency` attribute, see:
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#concurrency
concurrency:
group: ${{ github.sha }}
jobs:
windows-test:
name: win test
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
n:
- nr: "-13"
run: 7238908991
concurrency:
group: windows-test-${{ matrix.n.nr }}-${{ github.ref }}
steps:
- name: reuse `windows-artifacts`
shell: bash
run: |
run_id=7069719923 &&
name=windows-artifacts &&
curl -H "Authorization: token ${{secrets.GITHUB_TOKEN}}" \
-L https://api.github.com/repos/${{github.repository}}/actions/runs/$run_id/artifacts |
jq -r '.artifacts[] | select(.name | test("'$name'")) | [.name, .archive_download_url] | @tsv' |
tr -d '\r' |
while read name url
do
echo "$name"
curl -H "Authorization: token ${{secrets.GITHUB_TOKEN}}" \
-#sLo /tmp/"$name".zip "$url" &&
unzip -q /tmp/"$name".zip
done
- name: extract tracked files and build artifacts
shell: bash
run: tar xf artifacts.tar.gz && tar xf tracked.tar.gz
- name: do use current versions of a couple of files
shell: bash
run: |
# these have changed since the run whose artifacts we're reusing
for p in ci/lib.sh ci/run-test-slice.sh t/Makefile t/t3100-ls-tree-restrict.sh
do
curl -Lo $p ${{ github.server_url }}/${{ github.repository }}/raw/${{ github.sha }}/$p ||
exit 1
done
- uses: git-for-windows/setup-git-for-windows-sdk@v1
- name: replace the MSYS2 runtime
shell: powershell
run: |
$headers = @{ Authorization = "token ${{ secrets.GITHUB_TOKEN }}" }
$run_url = "https://api.github.com/repos/dscho/Cygwin-msys2-fork/actions/runs/${{ matrix.n.run }}/artifacts"
$run = ((Invoke-WebRequest -Headers $headers $run_url).content | ConvertFrom-JSON)
$zip_url = $run.artifacts.archive_download_url
Invoke-WebRequest -Headers $headers $zip_url -outfile "install.zip"
Expand-Archive -Force -DestinationPath D:/git-sdk-64-minimal install.zip
Remove-Item install.zip
- name: test
id: test
shell: bash
timeout-minutes: 240
run: . /etc/profile && env >/tmp/env.txt && set >/tmp/set.txt && ci/run-test-slice.sh 0 1
- name: handle timed-out tests
if: failure() && steps.test.outcome == 'failure' && env.FAILED_TEST_ARTIFACTS == ''
shell: bash
run: . /etc/profile && . ci/lib.sh && { handle_failed_tests || test $? = 1; }
- name: print test failures
if: failure() && env.FAILED_TEST_ARTIFACTS != ''
shell: bash
run: ci/print-test-failures.sh
- name: Upload failed/timed-out tests' directories
if: failure() && env.FAILED_TEST_ARTIFACTS != ''
uses: actions/upload-artifact@v3
with:
name: failed-tests-windows
path: ${{env.FAILED_TEST_ARTIFACTS}}