From db1ab864601ecb3c6232c2899f5b5be87029ed37 Mon Sep 17 00:00:00 2001 From: John Wason Date: Wed, 13 Jul 2022 19:03:03 -0400 Subject: [PATCH] Add readme --- README.md | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..5c4d247 --- /dev/null +++ b/README.md @@ -0,0 +1,37 @@ +#vcpkg-action + +`vcpkg-action` is a simple action to build and cache vcpkg packages. It currently only supports Windows. `vcpkg` is cloned in the `${{ github.workspace }}\vcpkg` directory, and the build products are located in `${{ github.workspace }}\vcpkg\installed\`. For cmake, use the option: + +``` + -DCMAKE_TOOLCHAIN_FILE=${{ github.workspace }}/vcpkg/scripts/buildsystems/vcpkg.cmake + -DVCPKG_TARGET_TRIPLET= +``` + +Another directory named `vcpkg_cache` is created in the workspace root. This directory is used to store the cache files, and is cached using `pat-s/always-upload-cache@v3`. The cache key is automatically generated, but can also be modified using the `cache-key` argument. + +Example usage: + +```yaml +- name: vcpkg build + uses: johnwason/vcpkg-action@v1 + with: + pkgs: boost-date-time boost-system + triplet: x64-windows-release +``` + +## Usage + +```yaml +- uses: johnwason/vcpkg-action@v1 + with: + # The vcpkg packages to build, separated by spaces + pkgs: '' + # The vcpkg target triplet to use. This must be set. For windows, + # x64-windows-release is recommended if you don't need debug libraries + triplet: '' + # Extra arguments to pass to vcpkg command (optional) + extra-args: '' + # Additional string to add to cache key (optional) + cache-key: '' + +```