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