diff --git a/.github/actions/build-macos/action.yml b/.github/actions/build-macos/action.yml index cda7ec13..e256e671 100644 --- a/.github/actions/build-macos/action.yml +++ b/.github/actions/build-macos/action.yml @@ -3,7 +3,17 @@ description: 'Build ths packages for MACOS package' runs: using: "composite" steps: + - name: Xerces-C - cache + id: cache-xerces + uses: actions/cache@v4 + with: + path: | + xerces-c/_build_mac_arm + xerces-c/_build_mac_x64 + key: xerces-c-${{ runner.os }}-${{ hashFiles('libMvrGdtf/.github/actions/build-macos/action.yml') }} + - name: Xerces-C - prepare + if: steps.cache-xerces.outputs.cache-hit != 'true' shell: bash run: | mkdir xerces-c @@ -12,6 +22,7 @@ runs: tar -xf xerces-c.zip --strip-components=1 - name: Xerces-C - build arm64 + if: steps.cache-xerces.outputs.cache-hit != 'true' shell: bash working-directory: xerces-c run: | @@ -20,6 +31,7 @@ runs: make install - name: Xerces-C - build x64 + if: steps.cache-xerces.outputs.cache-hit != 'true' shell: bash working-directory: xerces-c run: | @@ -28,11 +40,20 @@ runs: make install - name: Xerces-C - lipo arm/x64 + if: steps.cache-xerces.outputs.cache-hit != 'true' shell: bash working-directory: xerces-c run: lipo _build_mac_arm/lib/libxerces-c.a _build_mac_x64/lib/libxerces-c.a -create -output _build_mac_x64/lib/libxerces-c-all.a + - name: Boost - cache + id: cache-boost + uses: actions/cache@v4 + with: + path: boost + key: boost-${{ runner.os }}-${{ hashFiles('libMvrGdtf/.github/actions/build-macos/action.yml') }} + - name: Boost - prepare + if: steps.cache-boost.outputs.cache-hit != 'true' shell: bash run: | mkdir boost diff --git a/.github/actions/build-windows/action.yml b/.github/actions/build-windows/action.yml index a3f23e8e..8766c925 100644 --- a/.github/actions/build-windows/action.yml +++ b/.github/actions/build-windows/action.yml @@ -11,7 +11,17 @@ runs: # -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- # Xerces-C - setup + - name: Xerces-C - cache + id: cache-xerces + uses: actions/cache@v4 + with: + path: | + xerces-c/build/libs + xerces-c/build_mt/libs + key: xerces-c-${{ runner.os }}-${{ hashFiles('libMvrGdtf/.github/actions/build-windows/action.yml') }} + - name: Xerces-C - prepare + if: steps.cache-xerces.outputs.cache-hit != 'true' shell: cmd run: | mkdir xerces-c @@ -21,6 +31,7 @@ runs: # Xerces-C - build MD - name: Xerces-C - configure + if: steps.cache-xerces.outputs.cache-hit != 'true' working-directory: xerces-c shell: cmd run: | @@ -29,6 +40,7 @@ runs: cmake .. -G "Visual Studio 17 2022" -A x64 -T v142,version=14.29 -DCMAKE_INSTALL_PREFIX:PATH=libs -DCMAKE_CXX_FLAGS="/DWIN32 /D_WINDOWS -O2 -Ob2 -DNDEBUG" -DCMAKE_C_FLAGS="/DWIN32 /D_WINDOWS /W3" -DBUILD_SHARED_LIBS:BOOL=FALSE -Dxmlch-type=wchar_t - name: Xerces-C - build MinSizeRel + if: steps.cache-xerces.outputs.cache-hit != 'true' working-directory: xerces-c/build shell: cmd run: | @@ -36,6 +48,7 @@ runs: msbuild /m INSTALL.vcxproj /p:Configuration=MinSizeRel - name: Xerces-C - build Debug + if: steps.cache-xerces.outputs.cache-hit != 'true' working-directory: xerces-c/build shell: cmd run: | @@ -44,6 +57,7 @@ runs: # Xerces-C - build MT - name: Xerces-C - configure [MT] + if: steps.cache-xerces.outputs.cache-hit != 'true' working-directory: xerces-c shell: cmd run: | @@ -52,6 +66,7 @@ runs: cmake .. -G "Visual Studio 17 2022" -A x64 -T v142,version=14.29 -DCMAKE_INSTALL_PREFIX:PATH=libs -DCMAKE_CXX_FLAGS_DEBUG="/MTd /Zi /Ob0 /Od /RTC1" -DCMAKE_CXX_FLAGS_MINSIZEREL="/MT /O1 /Ob1 /DNDEBUG" -DCMAKE_C_FLAGS_DEBUG="/MTd /Zi /Ob0 /Od /RTC1" -DCMAKE_C_FLAGS_MINSIZEREL="/MT /O1 /Ob1 /DNDEBUG" -DCMAKE_C_FLAGS="/DWIN32 /D_WINDOWS /W3" -DBUILD_SHARED_LIBS:BOOL=FALSE -Dxmlch-type=wchar_t - name: Xerces-C - build MinSizeRel [MT] + if: steps.cache-xerces.outputs.cache-hit != 'true' working-directory: xerces-c/build_mt shell: cmd run: | @@ -59,6 +74,7 @@ runs: msbuild /m INSTALL.vcxproj /p:Configuration=MinSizeRel - name: Xerces-C - build Debug [MT] + if: steps.cache-xerces.outputs.cache-hit != 'true' working-directory: xerces-c/build_mt shell: cmd run: | @@ -67,7 +83,15 @@ runs: # -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- # Boost - setup and build + - name: Boost - cache + id: cache-boost + uses: actions/cache@v4 + with: + path: boost + key: boost-${{ runner.os }}-${{ hashFiles('libMvrGdtf/.github/actions/build-windows/action.yml') }} + - name: Boost - prepare + if: steps.cache-boost.outputs.cache-hit != 'true' shell: cmd run: | mkdir boost