Skip to content

Commit 2d59941

Browse files
committed
Add Windows support for v3.0.3 release
- Add windows-latest target to release workflow - Install LLVM on Windows for num-format-windows compilation - Add Rust dependency caching for faster builds - Add LLVM caching on Windows - Bump CLI version to 3.0.3
1 parent 73c6db4 commit 2d59941

3 files changed

Lines changed: 30 additions & 2 deletions

File tree

.github/workflows/release.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ jobs:
1818
target: x86_64-apple-darwin
1919
- os: macos-latest
2020
target: aarch64-apple-darwin
21+
- os: windows-latest
22+
target: x86_64-pc-windows-msvc
2123
runs-on: ${{ matrix.os }}
2224
outputs:
2325
asset-path: ${{ steps.set_asset.outputs.asset-path }}
@@ -32,13 +34,39 @@ jobs:
3234
target: ${{ matrix.target }}
3335
override: true
3436

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+
3550
- name: Install extra dependencies on Ubuntu
3651
if: runner.os == 'Linux'
3752
run: |
3853
if [ "${{ matrix.target }}" = "aarch64-unknown-linux-gnu" ]; then
3954
sudo apt-get update && sudo apt-get install -y gcc-aarch64-linux-gnu
4055
fi
4156
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+
4270
- name: Build
4371
run: cargo build --release --target ${{ matrix.target }}
4472

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

crates/code2prompt/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "code2prompt"
3-
version = "3.0.2"
3+
version = "3.0.3"
44
edition = "2021"
55
description = "Command-line interface for code2prompt"
66
license = "MIT"

0 commit comments

Comments
 (0)