Testing Update

1. Update the sshd test to use the newer actions.
2. Parameterize the test for macos and ubuntu.
3. Parameterize the version of wolfssl used.
4. Parameterize the wolfSSH options used.
5. Update a couple test scripts to output their $0 variable instead of
   the wrong string.
pull/746/head
John Safranek 2024-07-24 15:16:15 -07:00 committed by JacobBarthelmeh
parent 3cabbdb703
commit 8d1efe9fdf
5 changed files with 69 additions and 31 deletions

View File

@ -10,15 +10,13 @@ concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
WOLFSSL_REF: v5.7.0-stable
jobs:
build_wolfssl:
strategy:
fail-fast: false
matrix:
os: [ ubuntu-latest, macos-latest ]
wolfssl: [ v5.7.2-stable, master ]
name: Build wolfssl
runs-on: ${{ matrix.os }}
timeout-minutes: 4
@ -28,7 +26,7 @@ jobs:
id: cache-wolfssl
with:
path: build-dir/
key: wolfssh-os-check-wolfssl-${{ env.WOLFSSL_REF }}-${{ matrix.os }}
key: wolfssh-os-check-wolfssl-${{ matrix.wolfssl }}-${{ matrix.os }}
lookup-only: true
- name: Checkout, build, and install wolfssl
@ -36,7 +34,7 @@ jobs:
uses: wolfSSL/actions-build-autotools-project@v1
with:
repository: wolfssl/wolfssl
ref: ${{ env.WOLFSSL_REF }}
ref: ${{ matrix.wolfssl }}
path: wolfssl
configure: --enable-all
check: false
@ -47,6 +45,7 @@ jobs:
fail-fast: false
matrix:
os: [ ubuntu-latest, macos-latest ]
wolfssl: [ v5.7.2-stable, master ]
config: [
'',
'--enable-all',
@ -63,7 +62,7 @@ jobs:
uses: actions/cache@v4
with:
path: build-dir/
key: wolfssh-os-check-wolfssl-${{ env.WOLFSSL_REF }}-${{ matrix.os }}
key: wolfssh-os-check-wolfssl-${{ matrix.wolfssl }}-${{ matrix.os }}
fail-on-cache-miss: true
- name: Checkout, build, and test wolfssh

View File

@ -6,27 +6,66 @@ on:
pull_request:
branches: [ '*' ]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
build_wolfssl:
strategy:
fail-fast: false
matrix:
os: [ ubuntu-latest ]
wolfssl: [ v5.7.2-stable ]
name: Build wolfssl
runs-on: ${{ matrix.os }}
timeout-minutes: 4
steps:
- uses: actions/checkout@v2
- name: Checking cache for wolfssl
uses: actions/cache@v4
id: cache-wolfssl
with:
repository: wolfSSL/wolfssl.git
ref: master
- name: build wolfSSL
run: ./autogen.sh && ./configure --enable-all --prefix=/usr && make && sudo make install
- uses: actions/checkout@v2
- name: autogen
run: ./autogen.sh
- name: configure
run: ./configure --enable-all CPPFLAGS="-DWOLFSSH_NO_FPKI -DWOLFSSH_NO_SFTP_TIMEOUT -DWOLFSSH_MAX_SFTP_RW=4000000"
- name: make
run: make
- name: make check
run: make check
- name: run wolfSSHd tests
path: build-dir/
key: wolfssh-sshd-wolfssl-${{ matrix.wolfssl }}-${{ matrix.os }}
lookup-only: true
- name: Checkout, build, and install wolfssl
if: steps.cache-wolfssl.outputs.cache-hit != 'true'
uses: wolfSSL/actions-build-autotools-project@v1
with:
repository: wolfssl/wolfssl
ref: ${{ matrix.wolfssl }}
path: wolfssl
configure: --enable-all
check: false
install: true
build_wolfssh:
strategy:
fail-fast: false
matrix:
os: [ ubuntu-latest ]
wolfssl: [ v5.7.2-stable ]
name: Build and test wolfsshd
runs-on: ${{ matrix.os }}
timeout-minutes: 10
needs: build_wolfssl
steps:
- name: Checking cache for wolfssl
uses: actions/cache@v4
with:
path: build-dir/
key: wolfssh-sshd-wolfssl-${{ matrix.wolfssl }}-${{ matrix.os }}
fail-on-cache-miss: true
- name: Checkout and build wolfsshd
uses: wolfSSL/actions-build-autotools-project@v1
with:
repository: wolfssl/wolfssh
path: wolfssh
configure: --enable-debug --enable-all LDFLAGS="-L${{ github.workspace }}/build-dir/lib" CPPFLAGS="-I${{ github.workspace }}/build-dir/include -DWOLFSSH_NO_FPKI -DWOLFSSH_NO_SFTP_TIMEOUT -DWOLFSSH_MAX_SFTP_RW=4000000"
check: true
- name: Run wolfSSHd tests
working-directory: wolfssh/apps/wolfsshd/test
run: sudo ./run_all_sshd_tests.sh root
working-directory: ./apps/wolfsshd/test

View File

@ -4,7 +4,7 @@
if [ -z "$1" ] || [ -z "$2" ]; then
echo "expecting host and port as arguments"
echo "./sshd_exec_test.sh 127.0.0.1 22222"
echo "$0 127.0.0.1 22222"
exit 1
fi

View File

@ -7,7 +7,7 @@ cd ../../..
if [ -z "$1" ] || [ -z "$2" ] || [ -z "$3" ]; then
echo "expecting host, port and user as arguments"
echo "./sshd_x509_text.sh 127.0.0.1 22222 user"
echo "$0 127.0.0.1 22222 user"
exit 1
fi

View File

@ -6,7 +6,7 @@ else
USER_NAME=$1
cp fred-key.der $USER_NAME-key.der
cp fred-key.pem $USER_NAME-key.pem
sed -i "s/fred/$USER_NAME/g" renewcerts.cnf
sed -i.bak "s/fred/$USER_NAME/g" renewcerts.cnf
fi
# renew CA