Skip to content

Commit

Permalink
adjustments to artifact location and host key
Browse files Browse the repository at this point in the history
  • Loading branch information
JacobBarthelmeh committed Feb 25, 2025
1 parent 6fb539e commit 3f90b36
Showing 1 changed file with 18 additions and 19 deletions.
37 changes: 18 additions & 19 deletions .github/workflows/sftp-benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ jobs:
matrix:
os: [ ubuntu-latest ]
wolfssl: [ master ]
name: Build and test wolfsshd
name: Collect SFTP performance
runs-on: ${{ matrix.os }}
timeout-minutes: 10
steps:
Expand All @@ -70,7 +70,7 @@ jobs:
- name: configure
working-directory: ./wolfssh/
run : |
./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"
./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"
- name: make
working-directory: ./wolfssh/
Expand All @@ -80,15 +80,15 @@ jobs:
uses: actions/download-artifact@v4
continue-on-error: true
with:
path: ./wolfssh/
artifact_id: 'openssh-upload'
name: openssh-average-download.csv
path: wolfssh/openssh-average-download.csv

- name: Get Saved OpenSSH Download Results
uses: actions/download-artifact@v4
continue-on-error: true
with:
path: ./wolfssh/
artifact_id: 'openssh-download'
name: openssh-average-upload.csv
path: wolfssh/openssh-average-upload.csv

- name: Install gnuplot
run: sudo apt-get install gnuplot
Expand All @@ -98,19 +98,17 @@ jobs:
run: |
sudo apt-get install openssh-server
mkdir ~/.ssh
touch ~/.ssh/authorized_keys
touch authorized_keys_test
chmod 700 ~/.ssh
echo "AuthorizedKeysFile $PWD/keys/hansel-key-ecc.pub" >> sshd-config-test.txt
echo "PubkeyAuthentication yes" >> sshd-config-test.txt
echo "Subsystem sftp internal-sftp" >> sshd-config-test.txt
echo "MaxAuthTries 15" >> sshd-config-test.txt
echo "KbdInteractiveAuthentication no" >> sshd-config-test.txt
sed -i.bak "s/hansel/$USER/" ./keys/hansel-key-ecc.pub
chmod 600 ./keys/hansel-key-*.pem
chmod 600 ./keys/hansel-key-*.pub
chmod 700 ~/.ssh
sudo mkdir -p /run/sshd
sudo chmod 755 /run/sshd
sudo /usr/sbin/sshd -p 22222 -h $PWD/keys/server-key.pem -f sshd-config-test.txt -E $PWD/sshd-log.txt
sudo /usr/sbin/sshd -p 22222 -f sshd-config-test.txt -E $PWD/sshd-log.txt
cat sshd-config-test.txt
ps -e | grep sshd
Expand Down Expand Up @@ -138,27 +136,28 @@ jobs:
if: steps.download-artifact.outputs.found != 'true'
uses: actions/upload-artifact@v4
with:
name: openssh-download
path: wolfssh/openssh-average-download.csv
name: openssh-average-upload.csv
path: wolfssh/openssh-average-upload.csv

- name: Upload OpenSSH Upload Results
if: steps.download-artifact.outputs.found != 'true'
uses: actions/upload-artifact@v4
with:
name: openssh-upload
path: wolfssh/openssh-average-upload.csv
name: openssh-average-download.csv
path: wolfssh/openssh-average-download.csv

- name: Comment on PR about performance
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
ARTIFACT_URL=$(gh api repos/${{ github.repository }}/actions/artifacts --jq '.artifacts[0].archive_download_url')
PR_NUMBER=$(jq --raw-output .pull_request.number "$GITHUB_EVENT_PATH")
gh pr comment $PR_NUMBER --body "Attached is the performance results" \
--attach download-results-pr${{ github.event.pull_request.number }}.png \
--attach upload-results-pr${{ github.event.pull_request.number }}.png
gh pr comment $PR_NUMBER --body "Performance results are located here [benchmark artifacts]($ARTIFACT_URL)"
- name: Print logs if failed
working-directory: ./wolfssh/
if: failure()
run: sudo cat sshd-log.txt
run: |
sudo cat sshd-log.txt
cat log.csv

0 comments on commit 3f90b36

Please sign in to comment.