@@ -98,61 +98,43 @@ jobs:
9898 git remote add upstream https://github.com/wolfSSL/wolfProvider.git || true
9999 git fetch upstream --tags --no-recurse-submodules
100100
101- # Cache wolfSSL to speed up builds:
102- # - Git repository cache: Avoids re-cloning wolfSSL repo
103- # - Complete build cache: Includes source, built packages, and artifacts
104- # Cache keys include script hash to invalidate when install script changes
105- - name : Cache wolfSSL git repository
106- uses : actions/cache@v4
107- with :
108- path : /tmp/wolfssl-pkg/wolfssl/.git
109- key : wolfssl-git-${{ env.wolfssl_ref }}-${{ hashFiles('wolfProvider/debian/install-wolfssl.sh') }}-${{ github.sha }}
110- restore-keys : |
111- wolfssl-git-${{ env.wolfssl_ref }}-${{ hashFiles('wolfProvider/debian/install-wolfssl.sh') }}-
112- wolfssl-git-${{ env.wolfssl_ref }}-
113-
114- - name : Cache wolfSSL source and build
115- uses : actions/cache@v4
116- with :
117- path : |
118- ${{ env.WOLFSSL_PACKAGES_PATH }}/wolfssl
119- ${{ env.WOLFSSL_PACKAGES_PATH }}/*.deb
120- ${{ env.WOLFSSL_PACKAGES_PATH }}/*.dsc
121- ${{ env.WOLFSSL_PACKAGES_PATH }}/*.tar.gz
122- key : wolfssl-complete-${{ env.wolfssl_ref }}-${{ hashFiles('wolfProvider/debian/install-wolfssl.sh') }}-${{ github.sha }}
123- restore-keys : |
124- wolfssl-complete-${{ env.wolfssl_ref }}-${{ hashFiles('wolfProvider/debian/install-wolfssl.sh') }}-
125-
126- - name : Install wolfssl debian package
127- run : |
128- mkdir -p "/tmp/wolfssl-pkg"
129- cd "/tmp/wolfssl-pkg"
130-
131- # Check if cached packages exist
132- if ls *.deb 1> /dev/null 2>&1; then
133- echo "Found cached wolfSSL packages, installing them..."
134- dpkg -i *.deb || apt-get install -f -y
135- else
136- echo "No cached packages found, building from source..."
137- # Install wolfssl packages with specified version
138- chmod +x $GITHUB_WORKSPACE/debian/install-wolfssl.sh
139- if [ "$wolfssl_ref" != "master" ]; then
140- $GITHUB_WORKSPACE/debian/install-wolfssl.sh --tag "$WOLFSSL_VERSION" "/tmp/wolfssl-pkg"
141- else
142- $GITHUB_WORKSPACE/debian/install-wolfssl.sh "/tmp/wolfssl-pkg"
143- fi
144- fi
145-
146- - name : Install wolfSSL packages from cache
101+ # - name: Restore wolfSSL packages
102+ # uses: actions/cache@v4
103+ # id: wolfssl_cache
104+ # with:
105+ # path: |
106+ # ${{ env.WOLFSSL_PACKAGES_PATH }}/*.deb
107+ # ${{ env.WOLFSSL_PACKAGES_PATH }}/*.dsc
108+ # ${{ env.WOLFSSL_PACKAGES_PATH }}/*.tar.gz
109+ # key: wolfssl-debian-packages-${{ inputs.wolfssl_ref }}
110+
111+ # - name: Install wolfSSL packages from cache
112+ # if: steps.wolfssl_cache.outputs.cache-hit == 'true'
113+ # run: |
114+ # printf "Installing wolfSSL packages from cache:\n"
115+ # ls -la ${{ env.WOLFSSL_PACKAGES_PATH }}
116+ # apt install --reinstall -y ${{ env.WOLFSSL_PACKAGES_PATH }}/*wolfssl*.deb
117+
118+ # # TODO: roll this step into utils-wolfssl.sh
119+ # # TODO: specify tag below
120+ # - name: Build wolfSSL packages and install
121+ # if: steps.wolfssl_cache.outputs.cache-hit != 'true'
122+ # run: |
123+ # # $GITHUB_WORKSPACE/debian/install-wolfssl.sh --tag ${{ inputs.wolfssl_ref }} ${{ env.WOLFSSL_PACKAGES_PATH }}
124+ # $GITHUB_WORKSPACE/debian/install-wolfssl.sh ${{ env.WOLFSSL_PACKAGES_PATH }}
125+
126+ # Unpack and install wolfSSL packages
127+ - name : Unpack and install wolfSSL packages
147128 run : |
148- printf "Installing wolfSSL packages:\n"
149- ls -la ${{ env.WOLFSSL_PACKAGES_PATH }}
150- apt install --reinstall -y ${{ env.WOLFSSL_PACKAGES_PATH }}/*wolfssl*.deb
151-
129+ mkdir -p ${{ env.WOLFSSL_PACKAGES_PATH }}
130+ tar -xzf .github/packages/debian-wolfssl.tar.gz -C ${{ env.WOLFSSL_PACKAGES_PATH }}
131+ mv ${{ env.WOLFSSL_PACKAGES_PATH }}/debian-packages/* ${{ env.WOLFSSL_PACKAGES_PATH }}
132+ apt install -y ${{ env.WOLFSSL_PACKAGES_PATH }}/*.deb
133+
152134 # Check for cached OpenSSL packages
153135 - name : Checking OpenSSL packages in cache
154136 uses : actions/cache@v4
155- id : openssl-cache
137+ id : openssl_cache
156138 continue-on-error : true
157139 with :
158140 path : |
@@ -162,7 +144,7 @@ jobs:
162144
163145 # Install OpenSSL packages from cache if available
164146 - name : Install OpenSSL packages from cache
165- if : steps.openssl-cache .outputs.cache-hit == 'true'
147+ if : steps.openssl_cache .outputs.cache-hit == 'true'
166148 run : |
167149 printf "Installing OpenSSL packages from cache:\n"
168150 ls -la ${{ env.OPENSSL_PACKAGES_PATH }}
0 commit comments