File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11on : [push, pull_request]
22
3- name : CI
3+ name : CI Linux
44
55jobs :
66 test :
5858 with :
5959 command : test
6060 env :
61- LD_LIBRARY_PATH : /usr/local/lib
61+ LD_LIBRARY_PATH : /usr/local/lib
Original file line number Diff line number Diff line change 1+ on : [push, pull_request]
2+
3+ name : CI Windows
4+
5+ jobs :
6+ test-default-windows :
7+ name : Windows default
8+ runs-on : windows-latest
9+ env :
10+ VCPKGRS_DYNAMIC : 1
11+ VCPKG_DEFAULT_TRIPLET : x64-windows
12+ VCPKG_ROOT : C:\vcpkg
13+ steps :
14+ - name : Setup vcpkg libxml2 Cache
15+ uses : actions/cache@v4
16+ id : vcpkg-cache
17+ with :
18+ path : C:\vcpkg
19+ key : vcpkg-libxml2
20+ - name : Install libxml2 with vcpkg
21+ run : |
22+ vcpkg install libxml2
23+ vcpkg integrate install
24+ - uses : actions/checkout@v2
25+ - name : run tests
26+ uses : actions-rs/cargo@v1
27+ with :
28+ command : test
Original file line number Diff line number Diff line change @@ -51,10 +51,12 @@ fn find_libxml2() -> Option<ProbedLib> {
5151 } )
5252 }
5353
54- #[ cfg( windows) ]
54+ #[ cfg( target_family = " windows" ) ]
5555 {
56- if let Some ( meta) = vcpkg_dep:: find ( ) {
56+ if let Some ( meta) = vcpkg_dep:: vcpkg_find_libxml2 ( ) {
5757 return Some ( meta) ;
58+ } else {
59+ eprintln ! ( "vcpkg did not succeed in finding libxml2." ) ;
5860 }
5961 }
6062
@@ -110,7 +112,7 @@ fn main() {
110112#[ cfg( target_family = "windows" ) ]
111113mod vcpkg_dep {
112114 use crate :: ProbedLib ;
113- pub fn find ( ) -> Option < ProbedLib > {
115+ pub fn vcpkg_find_libxml2 ( ) -> Option < ProbedLib > {
114116 if let Ok ( metadata) = vcpkg:: find_package ( "libxml2" ) {
115117 Some ( ProbedLib { version : vcpkg_version ( ) , include_paths : metadata. include_paths } )
116118 } else {
You can’t perform that action at this time.
0 commit comments