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
+ - name : Setup Meson + Ninja
87
+ if : startsWith(matrix.os, 'windows')
88
+ run : |
89
+ python3 -m pip install --upgrade pip setuptools wheel
90
+ python3 -m pip install meson ninja
91
+
92
+ - name : Setup MSVC for test
93
+ if : startsWith(matrix.os, 'windows')
94
+ uses : ilammy/msvc-dev-cmd@v1
95
+ with :
96
+ arch : x86_64
97
+
98
+ # https://github.com/pkgconf/pkgconf/issues/364
99
+ - name : Install pkgconf
100
+ if : startsWith(matrix.os, 'windows')
101
+ shell : bash
102
+ run : |
103
+ git clone https://github.com/amyspark/pkgconf --branch msvc
104
+ cd pkgconf
105
+ meson setup build --prefix=$CARGO_HOME
106
+ meson compile -C build
107
+ meson install -C build
108
+
79
109
- name : Test pkgconf
80
110
if : startsWith(matrix.os, 'ubuntu')
81
111
run : |
@@ -90,6 +120,18 @@ jobs:
90
120
test "${CFLAGS%% }" = "-I/usr/local/include/example-project-0.1"
91
121
test "${LIBS%% }" = "-L/usr/local/lib/${ARCHDIR} -lexample-project"
92
122
123
+ - name : Test pkgconf
124
+ if : startsWith(matrix.os, 'windows')
125
+ shell : bash
126
+ run : |
127
+ set -x
128
+ pkgconf --version
129
+ CFLAGS=$(pkgconf --cflags example_project)
130
+ LIBS=$(pkgconf --libs example_project)
131
+
132
+ test "${CFLAGS%% }" = "-I$CARGO_HOME/bin/../include/example-project-0.1"
133
+ test "${LIBS%% }" = "-L$CARGO_HOME/bin/../lib -lexample-project"
134
+
93
135
- name : Update dynamic linker cache
94
136
if : startsWith(matrix.os, 'ubuntu')
95
137
run : |
@@ -101,3 +143,11 @@ jobs:
101
143
run : |
102
144
make
103
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