@@ -18,12 +18,14 @@ jobs:
18
18
target : x86_64-apple-darwin
19
19
- os : macos-latest
20
20
target : aarch64-apple-darwin
21
+ - os : windows-latest
22
+ target : x86_64-pc-windows-msvc
21
23
runs-on : ${{ matrix.os }}
22
24
outputs :
23
25
asset-path : ${{ steps.set_asset.outputs.asset-path }}
24
26
steps :
25
27
- name : Checkout code
26
- uses : actions/checkout@v4
28
+ uses : actions/checkout@v5
27
29
28
30
- name : Set up Rust toolchain
29
31
uses : actions-rs/toolchain@v1
@@ -32,13 +34,39 @@ jobs:
32
34
target : ${{ matrix.target }}
33
35
override : true
34
36
37
+ - name : Cache Rust dependencies
38
+ uses : actions/cache@v4
39
+ with :
40
+ path : |
41
+ ~/.cargo/bin/
42
+ ~/.cargo/registry/index/
43
+ ~/.cargo/registry/cache/
44
+ ~/.cargo/git/db/
45
+ target/
46
+ key : ${{ runner.os }}-${{ matrix.target }}-cargo-${{ hashFiles('**/Cargo.lock') }}
47
+ restore-keys : |
48
+ ${{ runner.os }}-${{ matrix.target }}-cargo-
49
+
35
50
- name : Install extra dependencies on Ubuntu
36
51
if : runner.os == 'Linux'
37
52
run : |
38
53
if [ "${{ matrix.target }}" = "aarch64-unknown-linux-gnu" ]; then
39
54
sudo apt-get update && sudo apt-get install -y gcc-aarch64-linux-gnu
40
55
fi
41
56
57
+ - name : Cache LLVM on Windows
58
+ if : runner.os == 'Windows'
59
+ id : cache-llvm
60
+ uses : actions/cache@v4
61
+ with :
62
+ path : C:\Program Files\LLVM
63
+ key : windows-llvm-latest
64
+
65
+ - name : Install LLVM on Windows
66
+ if : runner.os == 'Windows' && steps.cache-llvm.outputs.cache-hit != 'true'
67
+ run : |
68
+ choco install llvm
69
+
42
70
- name : Build
43
71
run : cargo build --release --target ${{ matrix.target }}
44
72
0 commit comments