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')
75
82
uses : awalsh128/cache-apt-pkgs-action@latest
76
83
with :
77
84
packages : pkgconf
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
+ run : |
102
+ git clone https://github.com/amyspark/pkgconf --branch msvc
103
+ cd pkgconf
104
+ meson setup build --prefix=$env:CARGO_HOME
105
+ meson compile -C build
106
+ meson install -C build
78
107
79
108
- name : Test pkgconf
80
109
if : startsWith(matrix.os, 'ubuntu')
@@ -90,6 +119,18 @@ jobs:
90
119
test "${CFLAGS%% }" = "-I/usr/local/include/example-project-0.1"
91
120
test "${LIBS%% }" = "-L/usr/local/lib/${ARCHDIR} -lexample-project"
92
121
122
+ - name : Test pkgconf
123
+ if : startsWith(matrix.os, 'windows')
124
+ shell : bash
125
+ run : |
126
+ set -x
127
+ pkgconf --version
128
+ CFLAGS=$(pkgconf --cflags example_project)
129
+ LIBS=$(pkgconf --libs example_project)
130
+
131
+ test "${CFLAGS%% }" = "-I${CARGO_HOME//\\//}/bin/../include/example-project-0.1"
132
+ test "${LIBS%% }" = "-L${CARGO_HOME//\\//}/bin/../lib -lexample-project"
133
+
93
134
- name : Update dynamic linker cache
94
135
if : startsWith(matrix.os, 'ubuntu')
95
136
run : |
@@ -101,3 +142,11 @@ jobs:
101
142
run : |
102
143
make
103
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