I'm building a C project for Windows using GitHub Actions. The build is set up by CMake, and works well until the point I try to include gcrypt as a third party library. The library cannot be found.
Here is the error I get:
[ 93%] Building C object CMakeFiles/my_proj.dir/src/main.c.obj
D:\a\my_proj\my_proj\src\main.c:2:10: fatal error: gcrypt.h: No such file or directory
2 | #include <gcrypt.h>
| ^~~~~~~~~~
compilation terminated.
make[2]: *** [CMakeFiles\my_proj.dir\build.make:76: CMakeFiles/my_proj.dir/src/main.c.obj] Error 1
make[1]: *** [CMakeFiles\Makefile2:149: CMakeFiles/my_proj.dir/all] Error 2
make: *** [Makefile:155: all] Error 2
And here is the workflow I am using:
name: Mingw
on: [push, pull_request]
jobs:
mingw64-gcc:
name: MinGW GCC
runs-on: windows-latest
defaults:
run:
shell: bash
steps:
- uses: actions/checkout@v3
- name: "Configuration"
run: |
mkdir build
cd build
cmake -G "MinGW Makefiles" -S .. -B .
pwd
ls -la
make
- name: Archive executable
uses: actions/upload-artifact@v2
with:
name: my_proj
path: |
build
How can I alter the workflow so that the Windows instance has access to gcrypt? How can I install 3rd-party dependencies?