Skip to content

Commit 1eca2cc

Browse files
aduh95targos
authored andcommitted
tools: use sparse checkout in build-tarball.yml
PR-URL: #59788 Reviewed-By: Paolo Insogna <paolo@cowtech.it> Reviewed-By: Pietro Marchini <pietro.marchini94@gmail.com>
1 parent 89fa1a9 commit 1eca2cc

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
@@ -73,6 +73,8 @@ jobs:
7373
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
7474
with:
7575
persist-credentials: false
76+
sparse-checkout: .github/actions/install-clang
77+
sparse-checkout-cone-mode: false
7678
- name: Set up Python ${{ env.PYTHON_VERSION }}
7779
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
7880
with:
@@ -92,15 +94,19 @@ jobs:
9294
run: |
9395
tar xzf tarballs/*.tar.gz -C $RUNNER_TEMP
9496
echo "TAR_DIR=$RUNNER_TEMP/`basename tarballs/*.tar.gz .tar.gz`" >> $GITHUB_ENV
95-
- name: Copy directories needed for testing
96-
run: |
97-
cp -r tools/eslint $TAR_DIR/tools
98-
cp -r tools/eslint-rules $TAR_DIR/tools
9997
- name: Build
10098
run: |
101-
cd $TAR_DIR
102-
make build-ci -j4 V=1
99+
make -C "$TAR_DIR" build-ci -j4 V=1
100+
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
101+
with:
102+
persist-credentials: false
103+
sparse-checkout: |
104+
tools/eslint
105+
tools/eslint-rules
106+
- name: Move directories needed for testing
107+
run: |
108+
mv tools/eslint "$TAR_DIR/tools"
109+
mv tools/eslint-rules "$TAR_DIR/tools"
103110
- name: Test
104111
run: |
105-
cd $TAR_DIR
106-
make run-ci -j4 V=1 TEST_CI_ARGS="-p dots --measure-flakiness 9"
112+
make -C "$TAR_DIR" run-ci -j4 V=1 TEST_CI_ARGS="-p dots --measure-flakiness 9"

0 commit comments

Comments
 (0)