Skip to content

DEBUG

DEBUG #1962

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-build:
name: win build
runs-on: windows-11-arm
concurrency:
group: windows-build-${{ github.ref }}
steps:
- uses: actions/checkout@v4
- uses: git-for-windows/setup-git-for-windows-sdk@v1
with:
architecture: aarch64
- name: debug using tmate (detached)
shell: bash
run: |
set -x &&
cat /etc/profile &&
. /etc/profile &&
(
cd / &&
G4W=/c/Program\ Files/Git &&
cp -n "$G4W"/usr/bin/{ssh-keygen.exe,msys-crypto-3.dll,msys-z.dll} usr/bin/ &&
CURL="$WINDIR"/system32/curl.exe &&
TAR="$WINDIR"/system32/tar.exe &&
"$CURL" -Lo /tmp/tmate.tar.zst https://repo.msys2.org/msys/x86_64/tmate-2.4.0-5-x86_64.pkg.tar.zst &&
"$TAR" xvf /tmp/tmate.tar.zst usr/bin/tmate.exe &&
"$CURL" -Lo /tmp/libevent.tar.zst https://repo.msys2.org/msys/x86_64/libevent-2.1.12-4-x86_64.pkg.tar.zst &&
"$TAR" xvf /tmp/libevent.tar.zst usr/bin/msys-event-2-1-7.dll &&
"$CURL" -Lo /tmp/msgpack-c.tar.zst https://repo.msys2.org/msys/x86_64/msgpack-c-6.1.0-2-x86_64.pkg.tar.zst &&
"$TAR" xvf /tmp/msgpack-c.tar.zst usr/bin/msys-msgpack-c-2.dll &&
"$CURL" -Lo /tmp/libssh.tar.zst https://repo.msys2.org/msys/x86_64/libssh-0.11.1-2-x86_64.pkg.tar.zst &&
"$TAR" xvf /tmp/libssh.tar.zst usr/bin/msys-ssh-4.dll
) &&
# restrict SSH access to the "actor", i.e. the GitHub user who triggered this workflow
# this requires calling `ssh -i <private-key> [...]` later on
mkdir -p ~/.ssh &&
curl -H 'Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}' \
https://api.github.com/users/${{github.actor}}/keys |
sed -n 's/.*"key": "\(.*\)".*/\1/p' >~/.ssh/authorized_keys &&
# Generate an SSH key (needed for tmate)
echo -e 'y\n' | ssh-keygen -q -t rsa -N '' -f ~/.ssh/id_rsa &&
# Start tmate session
export CHERE_INVOKING=1 &&
tmate -S /tmp/tmate.sock -a ~/.ssh/authorized_keys new-session -d &&
tmate -S /tmp/tmate.sock wait tmate-ready &&
# Print SSH invocation
tmate -S /tmp/tmate.sock display -p '#{tmate_ssh}'
env:
HOME: ${{runner.workspace}}
NO_PERL: 1
- name: build
shell: bash
env:
HOME: ${{runner.workspace}}
NO_PERL: 1
run: . /etc/profile && ci/make-test-artifacts.sh artifacts
- name: zip up tracked files
run: git archive -o artifacts/tracked.tar.gz HEAD
- name: upload tracked files and build artifacts
uses: actions/upload-artifact@v4
with:
name: windows-artifacts
path: artifacts
- name: wait for tmate to be done
if: always()
shell: bash
run: |
PATH=$HOME/bin:$PATH
while test -e /tmp/tmate.sock
do
tmate -S /tmp/tmate.sock display -p '#{tmate_ssh}'
sleep 5
done
windows-test:
name: win test
runs-on: windows-11-arm
needs: [windows-build]
strategy:
fail-fast: false
matrix:
nr: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
concurrency:
group: windows-test-${{ matrix.nr }}-${{ github.ref }}
steps:
- name: download tracked files and build artifacts
uses: actions/download-artifact@v4
with:
name: windows-artifacts
path: ${{github.workspace}}
- 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: test
shell: bash
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 failed tests' directories
if: failure() && env.FAILED_TEST_ARTIFACTS != ''
uses: actions/upload-artifact@v4
with:
name: failed-tests-windows-${{ matrix.nr }}
path: ${{env.FAILED_TEST_ARTIFACTS}}