Skip to content

Commit

Permalink
cache OpenSSL build output
Browse files Browse the repository at this point in the history
  • Loading branch information
rajeev-0 committed Jan 22, 2025
1 parent 29ea0c9 commit 5a3d802
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion .github/workflows/OpenSSL_versions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,18 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: build openssl

- name: cache openssl
id: cache-openssl
uses: actions/cache@v3
env:
cache-name: git ls-remote https://github.com/openssl/openssl.git ${{matrix.branch}} | awk '{print $1}'
with:
path: /usr/local/${{ matrix.branch }}
key: openssl-${{ env.cache-name }}-${{ runner.os }}

- if: ${{ steps.cache-openssl.outputs.cache-hit != 'true' }}
name: build openssl
run: |
git clone https://github.com/openssl/openssl.git --branch ${{ matrix.branch }} --depth 1
cd openssl
Expand All @@ -24,6 +35,8 @@ jobs:
sudo make install_sw install_ssldirs
cd ..
- name: set OpenSSL env
run: |
echo "OPENSSL_DIR=/usr/local/${{ matrix.branch }}" >> $GITHUB_ENV
echo "OPENSSL_LIB=/usr/local/${{ matrix.branch }}/lib64" >> $GITHUB_ENV
echo "/usr/local/${{ matrix.branch }}/bin" >> "$GITHUB_PATH"
Expand Down

0 comments on commit 5a3d802

Please sign in to comment.