diff --git a/.github/actions/build/action.yml b/.github/actions/build/action.yml index bc8b08f3..8d9a0700 100644 --- a/.github/actions/build/action.yml +++ b/.github/actions/build/action.yml @@ -42,9 +42,7 @@ runs: - uses: actions/cache@v4 with: key: deps-${{ inputs.preset }}-${{ hashFiles('./vcpkg.json') }} - path: | - ./vcpkg/packages - ./build/vcpkg_installed + path: ./vcpkg_cache - uses: lukka/run-cmake@v10.6 # pin version to avoid failed glibc dependency on ubuntu 20 runners. go back to @latest when ubuntu 22+ is adopted for runner os. if: runner.os != 'Linux' diff --git a/.github/actions/openziti-tunnel-build-action/gh-release/entrypoint.sh b/.github/actions/openziti-tunnel-build-action/gh-release/entrypoint.sh index f08a7eec..22399be5 100755 --- a/.github/actions/openziti-tunnel-build-action/gh-release/entrypoint.sh +++ b/.github/actions/openziti-tunnel-build-action/gh-release/entrypoint.sh @@ -48,21 +48,20 @@ for SAFE in \ git config --global --add safe.directory ${SAFE} done -export VCPKG_ROOT="${PWD}/vcpkg" -# ${VCPKG_ROOT}/packages will have been populated from outside of the container, by a different user. tell git it's ok. -git config --global --add safe.directory "${VCPKG_ROOT}" +( + cd "${VCPKG_ROOT}" + git checkout master + git pull + ./bootstrap-vcpkg.sh -disableMetrics +) -if [ ! -d "${VCPKG_ROOT}/ports" ]; then - # the packages/ directory may have been populated from cache by now - # but git clone refuses to clone into a non-empty directory, so get - # vcpkg without using clone - git init "${VCPKG_ROOT}" - (cd "${VCPKG_ROOT}"; git remote add -f origin https://github.com/microsoft/vcpkg; git checkout master) - "${VCPKG_ROOT}/bootstrap-vcpkg.sh" -disableMetrics -fi +# set VCPKG_BINARY_SOURCES to the container-mapped path that the rest of the workflow is using +export VCPKG_BINARY_SOURCES="clear;file,${PWD}/vcpkg_cache" echo "======== here comes the env" env +pwd +ls echo "======== that is all" echo "======== here comes the df" df diff --git a/.github/actions/openziti-tunnel-build-action/redhat-8/entrypoint.sh b/.github/actions/openziti-tunnel-build-action/redhat-8/entrypoint.sh index ea83cf47..86e9575d 100755 --- a/.github/actions/openziti-tunnel-build-action/redhat-8/entrypoint.sh +++ b/.github/actions/openziti-tunnel-build-action/redhat-8/entrypoint.sh @@ -36,6 +36,16 @@ for SAFE in \ git config --global --add safe.directory ${SAFE} done +( + cd "${VCPKG_ROOT}" + git checkout master + git pull + ./bootstrap-vcpkg.sh -disableMetrics +) + +# set VCPKG_BINARY_SOURCES to the container-mapped path that the rest of the workflow is using +export VCPKG_BINARY_SOURCES="clear;file,${PWD}/vcpkg_cache" + cmake -E make_directory ./build ( [[ -d ./build ]] && rm -r ./build diff --git a/.github/actions/openziti-tunnel-build-action/redhat-9/entrypoint.sh b/.github/actions/openziti-tunnel-build-action/redhat-9/entrypoint.sh index aa991116..9ec1fffd 100755 --- a/.github/actions/openziti-tunnel-build-action/redhat-9/entrypoint.sh +++ b/.github/actions/openziti-tunnel-build-action/redhat-9/entrypoint.sh @@ -36,6 +36,16 @@ for SAFE in \ git config --global --add safe.directory ${SAFE} done +( + cd "${VCPKG_ROOT}" + git checkout master + git pull + ./bootstrap-vcpkg.sh -disableMetrics +) + +# set VCPKG_BINARY_SOURCES to the container-mapped path that the rest of the workflow is using +export VCPKG_BINARY_SOURCES="clear;file,${PWD}/vcpkg_cache" + ( [[ -d ./build ]] && rm -r ./build cmake -E make_directory ./build diff --git a/.github/actions/openziti-tunnel-build-action/ubuntu-20.04/entrypoint.sh b/.github/actions/openziti-tunnel-build-action/ubuntu-20.04/entrypoint.sh index 1cb65f8f..cc9b835b 100755 --- a/.github/actions/openziti-tunnel-build-action/ubuntu-20.04/entrypoint.sh +++ b/.github/actions/openziti-tunnel-build-action/ubuntu-20.04/entrypoint.sh @@ -36,6 +36,16 @@ for SAFE in \ git config --global --add safe.directory ${SAFE} done +( + cd "${VCPKG_ROOT}" + git checkout master + git pull + ./bootstrap-vcpkg.sh -disableMetrics +) + +# set VCPKG_BINARY_SOURCES to the container-mapped path that the rest of the workflow is using +export VCPKG_BINARY_SOURCES="clear;file,${PWD}/vcpkg_cache" + [[ -d ./build ]] && rm -r ./build cmake \ -E make_directory \ diff --git a/.github/actions/openziti-tunnel-build-action/ubuntu-22.04/entrypoint.sh b/.github/actions/openziti-tunnel-build-action/ubuntu-22.04/entrypoint.sh index 0a1285c3..279e73fd 100755 --- a/.github/actions/openziti-tunnel-build-action/ubuntu-22.04/entrypoint.sh +++ b/.github/actions/openziti-tunnel-build-action/ubuntu-22.04/entrypoint.sh @@ -36,6 +36,16 @@ for SAFE in \ git config --global --add safe.directory ${SAFE} done +( + cd "${VCPKG_ROOT}" + git checkout master + git pull + ./bootstrap-vcpkg.sh -disableMetrics +) + +# set VCPKG_BINARY_SOURCES to the container-mapped path that the rest of the workflow is using +export VCPKG_BINARY_SOURCES="clear;file,${PWD}/vcpkg_cache" + [[ -d ./build ]] && rm -r ./build cmake \ -E make_directory \ diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index ec15998b..988c4363 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -21,7 +21,7 @@ jobs: runs-on: ${{ matrix.os }} name: build ${{ matrix.preset }} env: - "_VCPKG_BINARY_SOURCES": "clear;file,${{ github.workspace }}/vcpkg_cache,readwrite" + "VCPKG_BINARY_SOURCES": "clear;file,${{ github.workspace }}/vcpkg_cache,readwrite" strategy: fail-fast: false diff --git a/.github/workflows/cpack.yml b/.github/workflows/cpack.yml index 0cd36df1..f207e3aa 100644 --- a/.github/workflows/cpack.yml +++ b/.github/workflows/cpack.yml @@ -47,14 +47,13 @@ jobs: needs: set_matrix name: ${{ matrix.arch.rpm }} ${{ matrix.distro.name }} ${{ matrix.distro.version }} runs-on: ubuntu-20.04 - # build image name it from matrix values name:version unless override container is specified - container: ${{ matrix.distro.container || format('{0}:{1}', matrix.distro.name, matrix.distro.version) }} strategy: fail-fast: false matrix: ${{ fromJSON(needs.set_matrix.outputs.matrix) }} env: ZITI_DEB_TEST_REPO: ${{ vars.ZITI_DEB_TEST_REPO || 'zitipax-openziti-deb-test' }} ZITI_RPM_TEST_REPO: ${{ vars.ZITI_RPM_TEST_REPO || 'zitipax-openziti-rpm-test' }} + "VCPKG_BINARY_SOURCES": "clear;file,${{ github.workspace }}/vcpkg_cache,readwrite" steps: - name: Debug action uses: hmarr/debug-action@v3