Skip to content

Commit f25e4a3

Browse files
authored
Merge pull request #237 from Point72/tkp/lincache
Don't save empty vcpkg cache in conda build
2 parents 71c147d + 261d5d2 commit f25e4a3

3 files changed

Lines changed: 12 additions & 22 deletions

File tree

.github/actions/setup-caches/action.yml

Lines changed: 10 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,10 @@ name: Setup Caches
22
description: 'Ensure various caches are setup like homebrew, vcpkg, ccache, etc'
33

44
inputs:
5-
cibuildwheel:
6-
type: choice
7-
description: "cibuildwheel run"
8-
options:
9-
- 'cp38'
10-
- 'cp39'
11-
- 'cp310'
12-
- 'cp311'
13-
- 'cp312'
14-
default: 'cp39'
5+
vcpkg:
6+
type: boolean
7+
description: "cache vcpkg assets"
8+
default: true
159

1610
runs:
1711
using: 'composite'
@@ -38,7 +32,7 @@ runs:
3832
mkdir -p /home/runner/vcpkg_download_cache
3933
echo "VCPKG_DEFAULT_BINARY_CACHE=/home/runner/vcpkg_cache" >> $GITHUB_ENV
4034
echo "VCPKG_DOWNLOADS=/home/runner/vcpkg_download_cache" >> $GITHUB_ENV
41-
if: ${{ runner.os == 'Linux' }}
35+
if: ${{ runner.os == 'Linux' && inputs.vcpkg }}
4236

4337
- name: Setup vcpkg cache (Linux)
4438
uses: actions/cache@v4
@@ -48,7 +42,7 @@ runs:
4842
/home/runner/vcpkg_download_cache
4943
key: vcpkg-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('vcpkg.json') }}
5044
restore-keys: vcpkg-${{ runner.os }}-${{ runner.arch }}-
51-
if: ${{ runner.os == 'Linux' }}
45+
if: ${{ runner.os == 'Linux' && inputs.vcpkg }}
5246

5347
- name: Setup vcpkg cache in shell (macOS)
5448
shell: bash
@@ -57,7 +51,7 @@ runs:
5751
mkdir -p /Users/runner/vcpkg_download_cache
5852
echo "VCPKG_DEFAULT_BINARY_CACHE=/Users/runner/vcpkg_cache" >> $GITHUB_ENV
5953
echo "VCPKG_DOWNLOADS=/Users/runner/vcpkg_download_cache" >> $GITHUB_ENV
60-
if: ${{ runner.os == 'macOS' }}
54+
if: ${{ runner.os == 'macOS' && inputs.vcpkg }}
6155

6256
- name: Setup vcpkg cache (macOS)
6357
uses: actions/cache@v4
@@ -67,7 +61,7 @@ runs:
6761
/Users/runner/vcpkg_download_cache
6862
key: vcpkg-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('vcpkg.json') }}
6963
restore-keys: vcpkg-${{ runner.os }}-${{ runner.arch }}-
70-
if: ${{ runner.os == 'macOS' }}
64+
if: ${{ runner.os == 'macOS' && inputs.vcpkg }}
7165

7266
- name: Setup vcpkg cache in shell (Windows)
7367
shell: bash
@@ -76,7 +70,7 @@ runs:
7670
mkdir C:\\Users\\runneradmin\\AppData\\Local\\vcpkg_download_cache
7771
echo "VCPKG_DEFAULT_BINARY_CACHE=C:\\Users\\runneradmin\\AppData\\Local\\vcpkg_cache" >> $GITHUB_ENV
7872
echo "VCPKG_DOWNLOADS=C:\\Users\\runneradmin\\AppData\\Local\\vcpkg_download_cache" >> $GITHUB_ENV
79-
if: ${{ runner.os == 'Windows' }}
73+
if: ${{ runner.os == 'Windows' && inputs.vcpkg }}
8074

8175
- name: Setup vcpkg cache (Windows)
8276
uses: actions/cache@v4
@@ -86,4 +80,4 @@ runs:
8680
C:\\Users\\runneradmin\\AppData\\Local\\vcpkg_download_cache
8781
key: vcpkg-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('vcpkg.json') }}
8882
restore-keys: vcpkg-${{ runner.os }}-${{ runner.arch }}-
89-
if: ${{ runner.os == 'Windows' }}
83+
if: ${{ runner.os == 'Windows' && inputs.vcpkg }}

.github/workflows/build.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -297,8 +297,6 @@ jobs:
297297

298298
- name: Set up Caches
299299
uses: ./.github/actions/setup-caches
300-
with:
301-
cibuildwheel: '${{ matrix.cibuildwheel }}'
302300

303301
- name: Set up dependencies
304302
uses: ./.github/actions/setup-dependencies
@@ -607,8 +605,6 @@ jobs:
607605

608606
- name: Set up Caches
609607
uses: ./.github/actions/setup-caches
610-
with:
611-
cibuildwheel: 'cp39'
612608

613609
- name: Install python dependencies
614610
run: make requirements

.github/workflows/conda.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ jobs:
6464
- name: Set up Caches
6565
uses: ./.github/actions/setup-caches
6666
with:
67-
cibuildwheel: 'cp312'
67+
vcpkg: false
6868

6969
- name: Python Lint Steps
7070
run: make lint
@@ -96,4 +96,4 @@ jobs:
9696
- name: Python Test Steps ( Windows )
9797
run: make test
9898
shell: cmd /C call {0}
99-
if: ${{ runner.os == 'Windows' }}
99+
if: ${{ runner.os == 'Windows' }}

0 commit comments

Comments
 (0)