62
62
working-directory : example-project
63
63
run : |
64
64
sudo cp -r temp/usr/local/* /usr/local/
65
+
66
+ - name : Install into Cargo root
67
+ if : startsWith(matrix.os, 'windows')
68
+ working-directory : example-project
69
+ run : |
70
+ cargo cinstall --verbose --release --prefix=$CARGO_HOME
65
71
66
72
- name : Test pkg-config
67
73
if : startsWith(matrix.os, 'macos')
76
82
with :
77
83
packages : pkgconf
78
84
85
+ # https://github.com/pkgconf/pkgconf/issues/364
86
+ - name : Install pkgconf
87
+ if : startsWith(matrix.os, 'windows')
88
+ shell : bash
89
+ run : |
90
+ git clone https://github.com/amyspark/pkgconf --branch msvc
91
+ cd pkgconf
92
+ meson setup build --prefix=$CARGO_HOME
93
+ meson compile -C build
94
+ meson install -C build
95
+
79
96
- name : Test pkgconf
80
97
if : startsWith(matrix.os, 'ubuntu')
81
98
run : |
@@ -90,6 +107,18 @@ jobs:
90
107
test "${CFLAGS%% }" = "-I/usr/local/include/example-project-0.1"
91
108
test "${LIBS%% }" = "-L/usr/local/lib/${ARCHDIR} -lexample-project"
92
109
110
+ - name : Test pkgconf
111
+ if : startsWith(matrix.os, 'windows')
112
+ shell : bash
113
+ run : |
114
+ set -x
115
+ pkgconf --version
116
+ CFLAGS=$(pkgconf --cflags example_project)
117
+ LIBS=$(pkgconf --libs example_project)
118
+
119
+ test "${CFLAGS%% }" = "-I$CARGO_HOME/bin/../include/example-project-0.1"
120
+ test "${LIBS%% }" = "-L$CARGO_HOME/bin/../lib -lexample-project"
121
+
93
122
- name : Update dynamic linker cache
94
123
if : startsWith(matrix.os, 'ubuntu')
95
124
run : |
@@ -101,3 +130,23 @@ jobs:
101
130
run : |
102
131
make
103
132
133
+ - name : Setup MSVC for test
134
+ if : startsWith(matrix.os, 'windows')
135
+ uses : ilammy/msvc-dev-cmd@v1
136
+ with :
137
+ arch : x86_64
138
+
139
+ - name : Setup Meson + Ninja
140
+ if : startsWith(matrix.os, 'windows')
141
+ run : |
142
+ python3 -m pip install --upgrade pip setuptools wheel
143
+ python3 -m pip install meson ninja
144
+
145
+ - name : Test usage from C (Meson)
146
+ if : startsWith(matrix.os, 'windows')
147
+ working-directory : example-project/usage-from-c
148
+ shell : pwsh
149
+ run :
150
+ meson setup build
151
+ meson compile -C build
152
+ meson test -C build
0 commit comments