Skip to content

Commit 56c1896

Browse files
authored
Merge pull request #140 from stephenleo/story-10-1-add-windows-to-ci-and-release
feat(ci): add Windows to CI and release pipeline
2 parents 9a508ad + 5e2a98b commit 56c1896

3 files changed

Lines changed: 18 additions & 6 deletions

File tree

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
runs-on: ${{ matrix.os }}
1313
strategy:
1414
matrix:
15-
os: [ubuntu-latest, macos-latest]
15+
os: [ubuntu-latest, macos-latest, windows-latest]
1616
steps:
1717
- uses: actions/checkout@v4
1818
- name: Install Rust stable

.github/workflows/release.yml

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ jobs:
5656
runs-on: ${{ matrix.os }}
5757
strategy:
5858
matrix:
59-
os: [ubuntu-latest, macos-latest]
59+
os: [ubuntu-latest, macos-latest, windows-latest]
6060
steps:
6161
- uses: actions/checkout@v4
6262
- name: Install Rust stable
@@ -86,6 +86,10 @@ jobs:
8686
runner: ubuntu-latest
8787
- target: aarch64-unknown-linux-musl
8888
runner: ubuntu-24.04-arm
89+
- target: x86_64-pc-windows-msvc
90+
runner: windows-latest
91+
- target: aarch64-pc-windows-msvc
92+
runner: windows-11-arm
8993
steps:
9094
- uses: actions/checkout@v4
9195
- name: Install Rust stable
@@ -99,15 +103,22 @@ jobs:
99103
- name: Build release binary
100104
run: cargo build --release --target ${{ matrix.target }}
101105
- name: Rename binary
102-
run: cp target/${{ matrix.target }}/release/cship cship-${{ matrix.target }}
106+
shell: bash
107+
run: |
108+
EXT=""
109+
if [[ "${{ matrix.target }}" == *windows* ]]; then EXT=".exe"; fi
110+
cp "target/${{ matrix.target }}/release/cship${EXT}" "cship-${{ matrix.target }}${EXT}"
103111
- name: Validate binary
112+
shell: bash
104113
run: |
105-
file cship-${{ matrix.target }}
106-
test -s cship-${{ matrix.target }} || { echo "ERROR: binary is empty"; exit 1; }
114+
EXT=""
115+
if [[ "${{ matrix.target }}" == *windows* ]]; then EXT=".exe"; fi
116+
if [[ "${{ matrix.target }}" != *windows* ]]; then file "cship-${{ matrix.target }}"; fi
117+
test -s "cship-${{ matrix.target }}${EXT}" || { echo "ERROR: binary is empty"; exit 1; }
107118
- uses: actions/upload-artifact@v4
108119
with:
109120
name: cship-${{ matrix.target }}
110-
path: cship-${{ matrix.target }}
121+
path: cship-${{ matrix.target }}*
111122

112123
release:
113124
name: Publish GitHub Release

src/uninstall.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,7 @@ mod tests {
203203
}
204204

205205
#[test]
206+
#[cfg(not(target_os = "windows"))]
206207
fn test_remove_statusline_present() {
207208
with_tempdir(|home| {
208209
let claude_dir = home.join(".claude");

0 commit comments

Comments
 (0)