From 5cfd50a74e44da0c19330e77fa3d498a0359d3d8 Mon Sep 17 00:00:00 2001 From: Patrick Urbanke Date: Sun, 13 Oct 2024 20:44:41 +0200 Subject: [PATCH 1/2] Enable vcpkg binary caching --- .github/workflows/linux-gcc.yaml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.github/workflows/linux-gcc.yaml b/.github/workflows/linux-gcc.yaml index 6bfd0e8c..49577e60 100644 --- a/.github/workflows/linux-gcc.yaml +++ b/.github/workflows/linux-gcc.yaml @@ -2,6 +2,9 @@ name: linux-gcc on: [ pull_request ] +env: + VCPKG_BINARY_SOURCES: "clear;x-gha,readwrite" + jobs: linux-gcc: runs-on: ubuntu-latest @@ -11,6 +14,12 @@ jobs: with: submodules: recursive fetch-depth: 0 + - name: Export GitHub Actions cache environment variables + uses: actions/github-script@v7 + with: + script: | + core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || ''); + core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || ''); - name: Run vcpkg uses: lukka/run-vcpkg@v11 - name: install dependencies From e8562a40c5cf8a6377206c91e9a65fec3b2160f1 Mon Sep 17 00:00:00 2001 From: Patrick Urbanke Date: Sun, 13 Oct 2024 21:01:19 +0200 Subject: [PATCH 2/2] Added binary caching to all other workflows --- .github/workflows/linux-clang-14.yaml | 9 +++++++++ .github/workflows/linux-clang-16.yaml | 9 +++++++++ .github/workflows/macos-clang-arm.yaml | 9 +++++++++ .github/workflows/macos-clang-x64.yaml | 9 +++++++++ .github/workflows/windows-msvc.yaml | 9 +++++++++ 5 files changed, 45 insertions(+) diff --git a/.github/workflows/linux-clang-14.yaml b/.github/workflows/linux-clang-14.yaml index 585606e0..657719c3 100644 --- a/.github/workflows/linux-clang-14.yaml +++ b/.github/workflows/linux-clang-14.yaml @@ -2,6 +2,9 @@ name: linux-clang-14 on: [ pull_request ] +env: + VCPKG_BINARY_SOURCES: "clear;x-gha,readwrite" + jobs: linux-clang-14: runs-on: ubuntu-latest @@ -11,6 +14,12 @@ jobs: with: submodules: recursive fetch-depth: 0 + - name: Export GitHub Actions cache environment variables + uses: actions/github-script@v7 + with: + script: | + core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || ''); + core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || ''); - name: Run vcpkg uses: lukka/run-vcpkg@v11 - uses: KyleMayes/install-llvm-action@v1 diff --git a/.github/workflows/linux-clang-16.yaml b/.github/workflows/linux-clang-16.yaml index c714c8b3..e01ab758 100644 --- a/.github/workflows/linux-clang-16.yaml +++ b/.github/workflows/linux-clang-16.yaml @@ -2,6 +2,9 @@ name: linux-clang-16 on: [ pull_request ] +env: + VCPKG_BINARY_SOURCES: "clear;x-gha,readwrite" + jobs: linux-clang-16: runs-on: ubuntu-latest @@ -11,6 +14,12 @@ jobs: with: submodules: recursive fetch-depth: 0 + - name: Export GitHub Actions cache environment variables + uses: actions/github-script@v7 + with: + script: | + core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || ''); + core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || ''); - name: Run vcpkg uses: lukka/run-vcpkg@v11 - uses: KyleMayes/install-llvm-action@v1 diff --git a/.github/workflows/macos-clang-arm.yaml b/.github/workflows/macos-clang-arm.yaml index e2679467..1be165ad 100644 --- a/.github/workflows/macos-clang-arm.yaml +++ b/.github/workflows/macos-clang-arm.yaml @@ -2,6 +2,9 @@ name: macos-clang-arm on: [ pull_request ] +env: + VCPKG_BINARY_SOURCES: "clear;x-gha,readwrite" + jobs: macos-clang-arm: runs-on: macos-latest @@ -11,6 +14,12 @@ jobs: with: submodules: recursive fetch-depth: 0 + - name: Export GitHub Actions cache environment variables + uses: actions/github-script@v7 + with: + script: | + core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || ''); + core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || ''); - name: Run vcpkg uses: lukka/run-vcpkg@v11 - name: Install ninja diff --git a/.github/workflows/macos-clang-x64.yaml b/.github/workflows/macos-clang-x64.yaml index 8c8a84f4..bec49903 100644 --- a/.github/workflows/macos-clang-x64.yaml +++ b/.github/workflows/macos-clang-x64.yaml @@ -2,6 +2,9 @@ name: macos-clang-x64 on: [ pull_request ] +env: + VCPKG_BINARY_SOURCES: "clear;x-gha,readwrite" + jobs: macos-clang-x64: runs-on: macos-13 @@ -11,6 +14,12 @@ jobs: with: submodules: recursive fetch-depth: 0 + - name: Export GitHub Actions cache environment variables + uses: actions/github-script@v7 + with: + script: | + core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || ''); + core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || ''); - name: Run vcpkg uses: lukka/run-vcpkg@v11 - name: Compile diff --git a/.github/workflows/windows-msvc.yaml b/.github/workflows/windows-msvc.yaml index 91ae24e2..697dd1b5 100644 --- a/.github/workflows/windows-msvc.yaml +++ b/.github/workflows/windows-msvc.yaml @@ -2,6 +2,9 @@ name: windows-msvc on: [ pull_request ] +env: + VCPKG_BINARY_SOURCES: "clear;x-gha,readwrite" + jobs: windows-msvc: runs-on: windows-latest @@ -11,6 +14,12 @@ jobs: with: submodules: recursive fetch-depth: 0 + - name: Export GitHub Actions cache environment variables + uses: actions/github-script@v7 + with: + script: | + core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || ''); + core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || ''); - uses: ilammy/msvc-dev-cmd@v1 - uses: lukka/run-vcpkg@v11 - name: Compile