Skip to content

Commit

Permalink
Cache Wireguard-NT for windows unit tests (#9816)
Browse files Browse the repository at this point in the history
  • Loading branch information
oskirby authored Aug 30, 2024
1 parent 9d75a3a commit 44a19aa
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion .github/workflows/test_unit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -144,10 +144,25 @@ jobs:
cache: "pip"
- run: pip install -r requirements.txt

- name: Cache Wireguard NT
id: cache-wireguard-nt
uses: actions/cache@v4
with:
path: 3rdparty/wireguard-nt
key: wireguard-nt-${{ hashFiles('windows/wireguard_nt/CMakeLists.txt') }}

- name: Download Wireguard NT
if: steps.cache-wireguard-nt.outputs.cache-hit != 'true'
shell: bash
run: |
WIREGUARD_NT_URL=$(grep -Eo 'DOWNLOAD[[:space:]].*' windows/wireguard_nt/CMakeLists.txt | awk '{print $2}')
curl -sSL -o wireguard-nt.zip $WIREGUARD_NT_URL
unzip -d 3rdparty/ wireguard-nt.zip
- name: Building tests
run: |
mkdir ./build
cmake -S . -B ./build -GNinja -DCMAKE_BUILD_TYPE=Debug -DCMAKE_PREFIX_PATH="C:\MozillaVPNBuild\lib\cmake" -DWINTUN_FOLDER="not-existing"
cmake -S . -B ./build -GNinja -DCMAKE_BUILD_TYPE=Debug -DCMAKE_PREFIX_PATH="C:\MozillaVPNBuild\lib\cmake" -DWIREGUARD_FOLDER="3rdparty/wireguard-nt"
cmake --build ./build --target build_tests
- name: Running native messaging tests
Expand Down

0 comments on commit 44a19aa

Please sign in to comment.