Skip to content

Commit bfb7d69

Browse files
committed
fix(ci): Don't build with target if it's same as host
Unnecessary, may mess things up Also Add RUSTFLAGS for windows linking Signed-off-by: Daniel Schaefer <dhs@frame.work>
1 parent 64e5c3f commit bfb7d69

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

.github/workflows/ci.yaml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,10 @@ jobs:
6363
os: windows-2025
6464
use-cross: false
6565
target: x86_64-pc-windows-msvc
66+
# TODO: Remove rustflags workaround when framework_lib updates to built v0.8+ with gix feature.
67+
# Issue: libgit2-sys v0.14.x doesn't link advapi32.lib on Windows.
68+
# See: https://github.com/rust-lang/git2-rs/issues/1016
69+
rustflags: "-C link-arg=advapi32.lib"
6670

6771
steps:
6872
- name: Checkout
@@ -99,7 +103,9 @@ jobs:
99103

100104
- name: Build (without cross)
101105
if: matrix.build != 'freebsd' && !matrix.use-cross
102-
run: cargo build --release --locked --target ${{ matrix.target }}
106+
run: cargo build --release --locked
107+
env:
108+
RUSTFLAGS: ${{ matrix.rustflags }}
103109

104110
- name: Build (cross)
105111
if: matrix.use-cross

0 commit comments

Comments
 (0)