summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorDavid Lönnhager <david.l@mullvad.net>2022-02-10 15:32:54 +0100
committerDavid Lönnhager <david.l@mullvad.net>2022-02-10 15:32:54 +0100
commitd9a79bedb5d5f0c19e7c68b8880b17553ddafab0 (patch)
treeede89e6a7f5f304f22abf76111cd869c47b1fee3
parent74c1fc1fd7609869c77cbcc00eab106f6896f026 (diff)
parent7d1fa6599a87b9f22fc94279422d64e881f19283 (diff)
downloadmullvadvpn-d9a79bedb5d5f0c19e7c68b8880b17553ddafab0.tar.xz
mullvadvpn-d9a79bedb5d5f0c19e7c68b8880b17553ddafab0.zip
Merge branch 'ci-cache-win-modules'
-rw-r--r--.github/workflows/daemon.yml24
-rwxr-xr-xci/check-rust.sh7
2 files changed, 24 insertions, 7 deletions
diff --git a/.github/workflows/daemon.yml b/.github/workflows/daemon.yml
index 6a2891506b..01a9427f8c 100644
--- a/.github/workflows/daemon.yml
+++ b/.github/workflows/daemon.yml
@@ -90,6 +90,25 @@ jobs:
- name: Checkout submodules
run: git submodule update --init --depth=1
+ - name: Calculate Windows libraries cache hash
+ id: windows-modules-hash
+ shell: bash
+ run: |
+ hash="$(git grep --recurse-submodules --cached -l '' -- './windows/' | xargs sha1sum | sha1sum | cut -d" " -f1)"
+ echo "::set-output name=hash::$hash"
+
+ - name: Cache Windows libraries
+ uses: actions/cache@v2
+ id: cache-windows-modules
+ with:
+ path: |
+ ./windows/*/bin/x64-*/*.dll
+ ./windows/*/bin/x64-*/*.lib
+ !./windows/*/bin/x64-*/libcommon.lib
+ !./windows/*/bin/x64-*/libshared.lib
+ !./windows/*/bin/x64-*/libwfp.lib
+ key: windows-modules-${{ steps.windows-modules-hash.outputs.hash }}
+
- name: Install Rust
uses: ATiltedTree/setup-rust@v1.0.4
with:
@@ -105,6 +124,11 @@ jobs:
with:
vs-version: 16
+ - name: Build Windows modules
+ if: steps.cache-windows-modules.outputs.cache-hit != 'true'
+ shell: bash
+ run: ./build-windows-modules.sh
+
- name: Build and test crates
shell: bash
run: ./ci/check-rust.sh
diff --git a/ci/check-rust.sh b/ci/check-rust.sh
index e85ce32ec6..9ecf050f8e 100755
--- a/ci/check-rust.sh
+++ b/ci/check-rust.sh
@@ -7,13 +7,6 @@ export RUSTFLAGS="--deny warnings"
# Build WireGuard Go
./wireguard/build-wireguard-go.sh
-# Build Windows modules
-case "$(uname -s)" in
- MINGW*|MSYS_NT*)
- time ./build-windows-modules.sh
- ;;
-esac
-
# Build Rust crates
source env.sh
time cargo build --locked --verbose