4848 matrix :
4949 os : [ ubuntu-latest ]
5050 wolfssl : [ master ]
51- name : Build and test wolfsshd
51+ name : Collect SFTP performance
5252 runs-on : ${{ matrix.os }}
5353 timeout-minutes : 10
5454 steps :
7070 - name : configure
7171 working-directory : ./wolfssh/
7272 run : |
73- ./configure --enable-all --enable-debug 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 -DMAX_PATH_SZ=120 -DEXAMPLE_SFTP_BENCHMARK"
73+ ./configure --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 -DMAX_PATH_SZ=120 -DEXAMPLE_SFTP_BENCHMARK"
7474
7575 - name : make
7676 working-directory : ./wolfssh/
@@ -80,15 +80,15 @@ jobs:
8080 uses : actions/download-artifact@v4
8181 continue-on-error : true
8282 with :
83- path : ./wolfssh/
84- artifact_id : ' openssh-upload '
83+ name : openssh-average-download.csv
84+ path : wolfssh/ openssh-average-download.csv
8585
8686 - name : Get Saved OpenSSH Download Results
8787 uses : actions/download-artifact@v4
8888 continue-on-error : true
8989 with :
90- path : ./wolfssh/
91- artifact_id : ' openssh-download '
90+ name : openssh-average-upload.csv
91+ path : wolfssh/ openssh-average-upload.csv
9292
9393 - name : Install gnuplot
9494 run : sudo apt-get install gnuplot
@@ -98,19 +98,17 @@ jobs:
9898 run : |
9999 sudo apt-get install openssh-server
100100 mkdir ~/.ssh
101- touch ~/.ssh/authorized_keys
102- touch authorized_keys_test
101+ chmod 700 ~/.ssh
103102 echo "AuthorizedKeysFile $PWD/keys/hansel-key-ecc.pub" >> sshd-config-test.txt
104103 echo "PubkeyAuthentication yes" >> sshd-config-test.txt
105104 echo "Subsystem sftp internal-sftp" >> sshd-config-test.txt
106- echo "MaxAuthTries 15 " >> sshd-config-test.txt
105+ echo "KbdInteractiveAuthentication no " >> sshd-config-test.txt
107106 sed -i.bak "s/hansel/$USER/" ./keys/hansel-key-ecc.pub
108107 chmod 600 ./keys/hansel-key-*.pem
109108 chmod 600 ./keys/hansel-key-*.pub
110- chmod 700 ~/.ssh
111109 sudo mkdir -p /run/sshd
112110 sudo chmod 755 /run/sshd
113- sudo /usr/sbin/sshd -p 22222 -h $PWD/keys/server-key.pem - f sshd-config-test.txt -E $PWD/sshd-log.txt
111+ sudo /usr/sbin/sshd -p 22222 -f sshd-config-test.txt -E $PWD/sshd-log.txt
114112 cat sshd-config-test.txt
115113 ps -e | grep sshd
116114
@@ -138,27 +136,28 @@ jobs:
138136 if : steps.download-artifact.outputs.found != 'true'
139137 uses : actions/upload-artifact@v4
140138 with :
141- name : openssh-download
142- path : wolfssh/openssh-average-download .csv
139+ name : openssh-average-upload.csv
140+ path : wolfssh/openssh-average-upload .csv
143141
144142 - name : Upload OpenSSH Upload Results
145143 if : steps.download-artifact.outputs.found != 'true'
146144 uses : actions/upload-artifact@v4
147145 with :
148- name : openssh-upload
149- path : wolfssh/openssh-average-upload .csv
146+ name : openssh-average-download.csv
147+ path : wolfssh/openssh-average-download .csv
150148
151149 - name : Comment on PR about performance
152150 env :
153151 GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
154152 run : |
153+ ARTIFACT_URL=$(gh api repos/${{ github.repository }}/actions/artifacts --jq '.artifacts[0].archive_download_url')
155154 PR_NUMBER=$(jq --raw-output .pull_request.number "$GITHUB_EVENT_PATH")
156- gh pr comment $PR_NUMBER --body "Attached is the performance results" \
157- --attach download-results-pr${{ github.event.pull_request.number }}.png \
158- --attach upload-results-pr${{ github.event.pull_request.number }}.png
155+ gh pr comment $PR_NUMBER --body "Performance results are located here [benchmark artifacts]($ARTIFACT_URL)"
159156
160157 - name : Print logs if failed
161158 working-directory : ./wolfssh/
162159 if : failure()
163- run : sudo cat sshd-log.txt
160+ run : |
161+ sudo cat sshd-log.txt
162+ cat log.csv
164163
0 commit comments