Commit 8e3ea879a9e538c9237c34ae113babe078565da9

Anthony Green 2022-09-04T09:07:13

Only ignore errors when testing for ssh connectivity.

diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index e74bc27..da96fd4 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -117,7 +117,6 @@ jobs:
 
       - run: |
           set -x
-          set +e
           wget -qO - https://ftpmirror.gnu.org/autoconf/autoconf-2.71.tar.gz | tar -xvzf -
           mkdir -p ~/i
           (cd autoconf-2.71; ./configure --prefix=$HOME/i; make; make install)
@@ -125,11 +124,13 @@ jobs:
           PATH=$HOME/i/bin:$PATH ./autogen.sh
           echo "${{ secrets.CFARM_KEY }}" > /tmp/cfk
           chmod go-rw /tmp/cfk
+          set +e
           ssh -o StrictHostKeyChecking=no -o ConnectTimeout=10 -o ConnectionAttempts=3 -i /tmp/cfk -p ${{ matrix.CFARM_PORT }} ${{ secrets.CFARM_USERNAME }}@${{ matrix.CFARM_HOST }} "mkdir -p t/$GITHUB_RUN_NUMBER"
           if test $? -eq 255; then
             echo "Remote host is unavailable."
             exit 0
           fi
+          set -e
           scp -o StrictHostKeyChecking=no -o ConnectTimeout=10 -o ConnectionAttempts=3 -i /tmp/cfk -P ${{ matrix.CFARM_PORT }} -r * ${{ secrets.CFARM_USERNAME }}@${{ matrix.CFARM_HOST }}:t/$GITHUB_RUN_NUMBER
           ssh -o StrictHostKeyChecking=no -o ConnectTimeout=10 -o ConnectionAttempts=3 -i /tmp/cfk -p ${{ matrix.CFARM_PORT }} ${{ secrets.CFARM_USERNAME }}@${{ matrix.CFARM_HOST }} "(cd t/$GITHUB_RUN_NUMBER; ./configure --host=${{ matrix.CFARM_TRIPLE }}; make; make check) || true"
           scp -o StrictHostKeyChecking=no -o ConnectTimeout=10 -o ConnectionAttempts=3 -i /tmp/cfk -P ${{ matrix.CFARM_PORT }} ${{ secrets.CFARM_USERNAME }}@${{ matrix.CFARM_HOST }}:t/$GITHUB_RUN_NUMBER/*/testsuite/*.log .