Skip to content

Commit 2a99210

Browse files
authored
tools: use sparse checkout in build-tarball.yml
PR-URL: #59788 Reviewed-By: Paolo Insogna <[email protected]> Reviewed-By: Pietro Marchini <[email protected]>
1 parent df59e21 commit 2a99210

File tree

1 file changed

+14
-8
lines changed

1 file changed

+14
-8
lines changed

.github/workflows/build-tarball.yml

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,8 @@ jobs:
7474
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
7575
with:
7676
persist-credentials: false
77+
sparse-checkout: .github/actions/install-clang
78+
sparse-checkout-cone-mode: false
7779
- name: Install Clang ${{ env.CLANG_VERSION }}
7880
uses: ./.github/actions/install-clang
7981
with:
@@ -97,15 +99,19 @@ jobs:
9799
run: |
98100
tar xzf tarballs/*.tar.gz -C $RUNNER_TEMP
99101
echo "TAR_DIR=$RUNNER_TEMP/`basename tarballs/*.tar.gz .tar.gz`" >> $GITHUB_ENV
100-
- name: Copy directories needed for testing
101-
run: |
102-
cp -r tools/eslint $TAR_DIR/tools
103-
cp -r tools/eslint-rules $TAR_DIR/tools
104102
- name: Build
105103
run: |
106-
cd $TAR_DIR
107-
make build-ci -j4 V=1
104+
make -C "$TAR_DIR" build-ci -j4 V=1
105+
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
106+
with:
107+
persist-credentials: false
108+
sparse-checkout: |
109+
tools/eslint
110+
tools/eslint-rules
111+
- name: Move directories needed for testing
112+
run: |
113+
mv tools/eslint "$TAR_DIR/tools"
114+
mv tools/eslint-rules "$TAR_DIR/tools"
108115
- name: Test
109116
run: |
110-
cd $TAR_DIR
111-
make run-ci -j4 V=1 TEST_CI_ARGS="-p dots --measure-flakiness 9"
117+
make -C "$TAR_DIR" run-ci -j4 V=1 TEST_CI_ARGS="-p dots --measure-flakiness 9"

0 commit comments

Comments
 (0)