From ac306e5d8ca37dbb48d05dbdaebdfb6af6ebbeff Mon Sep 17 00:00:00 2001 From: Joel Martin Date: Thu, 22 Aug 2024 15:24:43 -0500 Subject: [PATCH] GHA: add self-hosted step for windows jobs. --- .github/workflows/main.yml | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index de199b1e54..def65aa127 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -83,7 +83,7 @@ jobs: if: ${{ github.event.inputs.self-hosted == 'yes' }} run: | export ${{ matrix.IMPL }} - if [ "${NO_SELF_HOST}" ]; then + if [ -n "${NO_SELF_HOST}" ]; then echo "Skipping self-host for ${IMPL} due to NO_SELF_HOST variable" else DO_SELF_HOST=1 ./ci.sh test ${IMPL} @@ -130,7 +130,7 @@ jobs: if: ${{ github.event.inputs.self-hosted == 'yes' }} run: | export ${{ matrix.IMPL }} - if [ "${NO_SELF_HOST}" ]; then + if [ -n "${NO_SELF_HOST}" ]; then echo "Skipping self-host for ${IMPL} due to NO_SELF_HOST variable" else DO_SELF_HOST=1 ./ci.sh test ${IMPL} @@ -187,6 +187,18 @@ jobs: run: | export ${{ matrix.IMPL }} ./ci.sh perf ${IMPL} + - name: Self-hosted Tests + if: ${{ github.event.inputs.self-hosted == 'yes' }} + shell: wsl-bash {0} + run: | + export ${{ matrix.IMPL }} + if [ -n "${NO_SELF_HOST}" ]; then + echo "Skipping self-host for ${IMPL} due to NO_SELF_HOST variable" + else + DO_SELF_HOST=1 ./ci.sh test ${IMPL} + # Check that self-hosted mode really ran + [ "`grep -a "mal-user>" test-mal-*${IMPL}.debug | wc -l`" -gt 800 ] + fi - name: Print debug log if: failure() run: cat *.debug