Skip to content

Commit bb8615c

Browse files
authored
Merge pull request #125 from robotpy/sccache-artifactory
ci: Use Artifactory for Windows compiler caches
2 parents 8b70363 + ba4ba60 commit bb8615c

File tree

1 file changed

+16
-5
lines changed

1 file changed

+16
-5
lines changed

.github/workflows/dist.yml

+16-5
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@ concurrency:
1414
group: ${{ github.ref }}
1515
cancel-in-progress: true
1616

17+
env:
18+
SCCACHE_WEBDAV_ENDPOINT: "https://frcmaven.wpi.edu/artifactory/wpilib-generic-cache-cmake-local"
19+
SCCACHE_WEBDAV_KEY_PREFIX: "sccache-robotpy"
20+
1721
jobs:
1822
# This job limits concurrency on the default branch
1923
# - we want it to run so it can populate ccache, but we typically
@@ -88,24 +92,29 @@ jobs:
8892
# Setup build caching
8993
#
9094

91-
- name: Set ccache size
95+
- name: Set ccache params
9296
shell: bash
9397
id: ccache
9498
run: |
9599
if [[ "${{ runner.os }}" == "Windows" ]]; then
96-
echo "MAX_SIZE=1200M" >> $GITHUB_OUTPUT
100+
echo "VARIANT=sccache" >> $GITHUB_OUTPUT
97101
else
102+
echo "VARIANT=ccache" >> $GITHUB_OUTPUT
98103
echo "MAX_SIZE=500M" >> $GITHUB_OUTPUT
99104
fi
100105
101106
- name: Setup ccache
102-
# uses: hendrikmuhs/ccache[email protected]
103-
uses: robotpy/ccache-action@fork
107+
if: steps.ccache.outputs.variant == 'ccache'
108+
uses: hendrikmuhs/ccache-action@v1.2
104109
with:
105110
key: ${{ matrix.os }}-${{ matrix.python_version }}
106111
variant: ccache
107112
max-size: ${{ steps.ccache.outputs.max_size }}
108113

114+
- name: Setup sccache
115+
if: steps.ccache.outputs.variant == 'sccache'
116+
uses: mozilla-actions/[email protected]
117+
109118
- name: Install deps
110119
shell: bash
111120
run: |
@@ -122,7 +131,9 @@ jobs:
122131
./rdev.sh ci run
123132
env:
124133
RPYBUILD_STRIP_LIBPYTHON: "1"
125-
RPYBUILD_CC_LAUNCHER: ccache
134+
RPYBUILD_CC_LAUNCHER: ${{ steps.ccache.outputs.variant }}
135+
SCCACHE_WEBDAV_USERNAME: ${{ secrets.WPI_ARTIFACTORY_USERNAME }}
136+
SCCACHE_WEBDAV_PASSWORD: ${{ secrets.WPI_ARTIFACTORY_TOKEN }}
126137

127138
- uses: actions/upload-artifact@v4
128139
with:

0 commit comments

Comments
 (0)