From 9b397645e2fc3ca502acb58e1b4631d3faf094e2 Mon Sep 17 00:00:00 2001 From: Geod24 Date: Sat, 4 Apr 2020 19:02:26 +0900 Subject: [PATCH] Windows: Set the environment variables outside the download step Otherwise, when the cache is used, the job breaks because LIB isn't set correctly. --- .github/workflows/main.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index df917ef..89dcc2b 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -70,7 +70,12 @@ jobs: if ((Get-FileHash '${{ github.workspace }}\lib\libsodium.zip' -Algorithm "SHA256").Hash -ne $sha256hash) { exit 1 } - Expand-Archive '${{ github.workspace }}\lib\libsodium.zip' -DestinationPath ${{ github.workspace }}\lib\ + Expand-Archive '${{ github.workspace }}\lib\libsodium.zip' -DestinationPath '${{ github.workspace }}\lib\' + + # Need to be its own step because we execute either the restore cache step or the download libsodium step + - name: '[Windows] Setup LIB variable' + if: runner.os == 'Windows' + run: | echo "::set-env name=LIB::${{ github.workspace }}\lib\libsodium\x64\Release\v142\static\;$LIB" # Build and run the tests