Skip to content

fixup! TO-DROP: ci: test various patch levels of the MSYS2 runtime #1571

fixup! TO-DROP: ci: test various patch levels of the MSYS2 runtime

fixup! TO-DROP: ci: test various patch levels of the MSYS2 runtime #1571

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:
- nr: 1

Check failure on line 28 in .github/workflows/main.yml

View workflow run for this annotation

GitHub Actions / CI

Invalid workflow file

The workflow is not valid. .github/workflows/main.yml (Line: 28, Col: 7): A sequence was not expected
run: 7072653564
- nr: 2
run: 7072653731
- nr: 3
run: 7072653988
- nr: 4
run: 7072654240
- nr: 5
run: 7072654509
- nr: 6
run: 7072654736
- nr: 7
run: 7072654943
- nr: 8
run: 7072654990
- nr: 9
run: 7072655045
- nr: 10
run: 7072655115
concurrency:
group: windows-test-${{ matrix.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
- 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.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
shell: bash
timeout-minutes: 12
run: . /etc/profile && ci/run-test-slice.sh ${{matrix.nr}} 10
- name: print test failures
if: failure() && env.FAILED_TEST_ARTIFACTS != ''
shell: bash
run: ci/print-test-failures.sh
- name: Upload the t/ folder
if: failure()
uses: actions/upload-artifact@v3
with:
name: t-${{ matrix.nr }}
path: t