[CI] Include a static build in continuous integration (#113)
* [CI] Include a static build in continuous integration
Co-authored-by: Stephen Webb <stephen.webb@sabreautonomous.com.au>
diff --git a/.github/workflows/log4cxx.yml b/.github/workflows/log4cxx.yml
index 906d346..6ab2e26 100644
--- a/.github/workflows/log4cxx.yml
+++ b/.github/workflows/log4cxx.yml
@@ -60,7 +60,7 @@
uses: actions/cache@v2
with:
path: vcpkg
- key: ${{ runner.os }}-${{ matrix.name }}-cache
+ key: ${{ runner.os }}-${{ matrix.name }}-cache-x64
- name: 'Checkout VCPKG - Windows'
if: (matrix.name == 'windows-2019' || matrix.name == 'windows-2016') && steps.restore-vcpkg-cache.outputs.cache-hit != 'true'
@@ -78,6 +78,7 @@
cd vcpkg
./bootstrap-vcpkg.bat
./vcpkg install apr apr-util --triplet=x64-windows
+ ./vcpkg install apr apr-util --triplet=x64-windows-static
- name: 'run cmake - win'
if: (matrix.name == 'windows-2019' || matrix.name == 'windows-2016')
@@ -90,6 +91,17 @@
cmake -DLOG4CXX_TEST_PROGRAM_PATH=C:\msys64\usr\bin "-DCMAKE_TOOLCHAIN_FILE=$THISDIR/vcpkg/scripts/buildsystems/vcpkg.cmake" -DCMAKE_CXX_COMPILER=${{ matrix.cxx }} -DCMAKE_C_COMPILER=${{ matrix.cc }} ..
cmake --build .
+ - name: 'run cmake - win-static'
+ if: matrix.name == 'windows-2019'
+ shell: pwsh
+ run: |
+ $THISDIR=Get-Location
+ cd main
+ mkdir build-static
+ cd build-static
+ cmake -DBUILD_SHARED_LIBS=off -DLOG4CXX_TEST_PROGRAM_PATH=C:\msys64\usr\bin "-DCMAKE_TOOLCHAIN_FILE=$THISDIR/vcpkg/scripts/buildsystems/vcpkg.cmake" -DCMAKE_CXX_COMPILER=${{ matrix.cxx }} -DCMAKE_C_COMPILER=${{ matrix.cc }} ..
+ cmake --build .
+
- name: 'run cmake - *nix'
if: matrix.name != 'windows-2019'
run: |