From 5a0193a414ce1bff285b2b9d6c87d3abbb0af774 Mon Sep 17 00:00:00 2001 From: Paul-Edouard Sarlin Date: Mon, 5 Feb 2024 23:09:41 +0100 Subject: [PATCH 1/6] Try GitHub Actions cache --- .github/workflows/build.yml | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 10fb834..0fa88c5 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -23,7 +23,7 @@ jobs: {os: windows-latest}, ] env: - COMPILER_CACHE_VERSION: 1 + COMPILER_CACHE_VERSION: 2 COMPILER_CACHE_DIR: ${{ github.workspace }}/compiler-cache steps: - uses: actions/checkout@v4 @@ -33,6 +33,12 @@ jobs: key: v${{ env.COMPILER_CACHE_VERSION }}-${{ matrix.config.os }}-${{ matrix.config.arch }}-${{ github.run_id }}-${{ github.run_number }} restore-keys: v${{ env.COMPILER_CACHE_VERSION }}-${{ matrix.config.os }}-${{ matrix.config.arch }} path: ${{ env.COMPILER_CACHE_DIR }} + - name: Export GitHub Actions cache environment variables + uses: actions/github-script@v6 + with: + script: | + core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || ''); + core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || ''); - name: Set env (macOS) if: runner.os == 'macOS' run: | @@ -59,8 +65,7 @@ jobs: echo "CIBW_CONFIG_SETTINGS_MACOS=${CONFIG_SETTINGS}" >> "$GITHUB_ENV" # vcpkg binary caching - VCPKG_CACHE_DIR="${COMPILER_CACHE_DIR}/vcpkg" - VCPKG_BINARY_SOURCES="clear;files,${VCPKG_CACHE_DIR},readwrite" + VCPKG_BINARY_SOURCES="clear;x-gha,readwrite" echo "VCPKG_BINARY_SOURCES=${VCPKG_BINARY_SOURCES}" >> "$GITHUB_ENV" - name: Set env (Windows) if: runner.os == 'Windows' @@ -82,8 +87,7 @@ jobs: echo "CIBW_REPAIR_WHEEL_COMMAND_WINDOWS=${CIBW_REPAIR_WHEEL_COMMAND}" >> "${env:GITHUB_ENV}" # vcpkg binary caching - $VCPKG_CACHE_DIR = "${env:COMPILER_CACHE_DIR}/vcpkg" - $VCPKG_BINARY_SOURCES = "clear;files,${VCPKG_CACHE_DIR},readwrite" + $VCPKG_BINARY_SOURCES = "clear;x-gha,readwrite" echo "VCPKG_BINARY_SOURCES=${VCPKG_BINARY_SOURCES}" >> "${env:GITHUB_ENV}" - name: Set env (Ubuntu) if: runner.os == 'Linux' @@ -108,8 +112,7 @@ jobs: echo "CONTAINER_COMPILER_CACHE_DIR=${CONTAINER_COMPILER_CACHE_DIR}" >> "$GITHUB_ENV" # vcpkg binary caching - VCPKG_CACHE_DIR="${CONTAINER_COMPILER_CACHE_DIR}/vcpkg" - VCPKG_BINARY_SOURCES="clear;files,${VCPKG_CACHE_DIR},readwrite" + VCPKG_BINARY_SOURCES="clear;x-gha,readwrite" echo "VCPKG_BINARY_SOURCES=${VCPKG_BINARY_SOURCES}" >> "$GITHUB_ENV" CIBW_ENVIRONMENT_PASS_LINUX="VCPKG_TARGET_TRIPLET VCPKG_INSTALLATION_ROOT CMAKE_TOOLCHAIN_FILE VCPKG_BINARY_SOURCES CONTAINER_COMPILER_CACHE_DIR" From 549fb6e80ce6fa2f790dbe6cdc7fc9d7b318952e Mon Sep 17 00:00:00 2001 From: Paul-Edouard Sarlin Date: Mon, 5 Feb 2024 23:12:58 +0100 Subject: [PATCH 2/6] Pass action cache variables to container --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 0fa88c5..c05070b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -115,7 +115,7 @@ jobs: VCPKG_BINARY_SOURCES="clear;x-gha,readwrite" echo "VCPKG_BINARY_SOURCES=${VCPKG_BINARY_SOURCES}" >> "$GITHUB_ENV" - CIBW_ENVIRONMENT_PASS_LINUX="VCPKG_TARGET_TRIPLET VCPKG_INSTALLATION_ROOT CMAKE_TOOLCHAIN_FILE VCPKG_BINARY_SOURCES CONTAINER_COMPILER_CACHE_DIR" + CIBW_ENVIRONMENT_PASS_LINUX="VCPKG_TARGET_TRIPLET VCPKG_INSTALLATION_ROOT CMAKE_TOOLCHAIN_FILE VCPKG_BINARY_SOURCES CONTAINER_COMPILER_CACHE_DIR ACTIONS_CACHE_URL ACTIONS_RUNTIME_TOKEN" echo "CIBW_ENVIRONMENT_PASS_LINUX=${CIBW_ENVIRONMENT_PASS_LINUX}" >> "$GITHUB_ENV" - name: Build wheels uses: pypa/cibuildwheel@v2.16.5 From f853ed97e0a3babc51229beba2d59dac3dd912f7 Mon Sep 17 00:00:00 2001 From: Paul-Edouard Sarlin Date: Mon, 5 Feb 2024 23:55:04 +0100 Subject: [PATCH 3/6] Trigger CI From d394bf02033c1c7e213f6241f1fa6805d095d41c Mon Sep 17 00:00:00 2001 From: Paul-Edouard Sarlin Date: Tue, 6 Feb 2024 00:00:06 +0100 Subject: [PATCH 4/6] Remove caching --- .github/workflows/build.yml | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c05070b..76fe754 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -27,12 +27,6 @@ jobs: COMPILER_CACHE_DIR: ${{ github.workspace }}/compiler-cache steps: - uses: actions/checkout@v4 - - uses: actions/cache@v4 - id: cache-builds - with: - key: v${{ env.COMPILER_CACHE_VERSION }}-${{ matrix.config.os }}-${{ matrix.config.arch }}-${{ github.run_id }}-${{ github.run_number }} - restore-keys: v${{ env.COMPILER_CACHE_VERSION }}-${{ matrix.config.os }}-${{ matrix.config.arch }} - path: ${{ env.COMPILER_CACHE_DIR }} - name: Export GitHub Actions cache environment variables uses: actions/github-script@v6 with: @@ -105,17 +99,11 @@ jobs: CONFIG_SETTINGS="${CONFIG_SETTINGS} cmake.define.VCPKG_TARGET_TRIPLET=${VCPKG_TARGET_TRIPLET}" echo "CIBW_CONFIG_SETTINGS_LINUX=${CONFIG_SETTINGS}" >> "$GITHUB_ENV" - # Remap caching paths to the container - CONTAINER_COMPILER_CACHE_DIR="/compiler-cache" - CIBW_CONTAINER_ENGINE="docker; create_args: -v ${COMPILER_CACHE_DIR}:${CONTAINER_COMPILER_CACHE_DIR}" - echo "CIBW_CONTAINER_ENGINE=${CIBW_CONTAINER_ENGINE}" >> "$GITHUB_ENV" - echo "CONTAINER_COMPILER_CACHE_DIR=${CONTAINER_COMPILER_CACHE_DIR}" >> "$GITHUB_ENV" - # vcpkg binary caching VCPKG_BINARY_SOURCES="clear;x-gha,readwrite" echo "VCPKG_BINARY_SOURCES=${VCPKG_BINARY_SOURCES}" >> "$GITHUB_ENV" - CIBW_ENVIRONMENT_PASS_LINUX="VCPKG_TARGET_TRIPLET VCPKG_INSTALLATION_ROOT CMAKE_TOOLCHAIN_FILE VCPKG_BINARY_SOURCES CONTAINER_COMPILER_CACHE_DIR ACTIONS_CACHE_URL ACTIONS_RUNTIME_TOKEN" + CIBW_ENVIRONMENT_PASS_LINUX="VCPKG_TARGET_TRIPLET VCPKG_INSTALLATION_ROOT CMAKE_TOOLCHAIN_FILE VCPKG_BINARY_SOURCES ACTIONS_CACHE_URL ACTIONS_RUNTIME_TOKEN" echo "CIBW_ENVIRONMENT_PASS_LINUX=${CIBW_ENVIRONMENT_PASS_LINUX}" >> "$GITHUB_ENV" - name: Build wheels uses: pypa/cibuildwheel@v2.16.5 From 55e97a2941151fe8f06bbe3ee239b237a0ee3b4e Mon Sep 17 00:00:00 2001 From: Paul-Edouard Sarlin Date: Tue, 6 Feb 2024 08:39:34 +0100 Subject: [PATCH 5/6] Trigger CI From d24476327856940b30933268ce33f14562b0d55c Mon Sep 17 00:00:00 2001 From: Paul-Edouard Sarlin Date: Tue, 6 Feb 2024 09:13:05 +0100 Subject: [PATCH 6/6] Debug --- ci/install-ceres-centos.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/ci/install-ceres-centos.sh b/ci/install-ceres-centos.sh index d6f5b97..f4ad511 100755 --- a/ci/install-ceres-centos.sh +++ b/ci/install-ceres-centos.sh @@ -12,5 +12,6 @@ git checkout ${VCPKG_COMMIT_ID} ./bootstrap-vcpkg.sh ./vcpkg install --recurse --clean-after-build \ --triplet=${VCPKG_TARGET_TRIPLET} \ + --debug \ ${DEPENDENCIES} ./vcpkg integrate install