Files
doris/hooks/setup_worktree.sh
T
zclllyybb 6e8331ec22 [Enhancement](build) support ccache hits across different directories (#61234)
Normal Hit Rate:
```
cache hit (direct)                  1303
cache hit (preprocessed)              20
cache miss                           219
cache hit rate                     85.80 %
```
Previously, when we opened a worktree, the first compilation:
```
cache hit (direct)                     0
cache hit (preprocessed)               0
cache miss                          1404
cache hit rate                      0.00 %
```
Now (using another different directory name, plus the current patch):
```
cache hit (direct)                  4665
cache hit (preprocessed)            2517
cache miss                             0
cache hit rate                    100.00 %
```

see more in
https://ccache.dev/manual/4.7.4.html#_compiling_in_different_directories
docs: https://github.com/apache/doris-website/pull/3452
2026-03-12 16:51:31 +08:00

32 lines
1.1 KiB
Bash
Executable File

#!/bin/bash
#!/usr/bin/env bash
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
# should have UBSAN_IGNORELIST in it to enable ccache
cp "$ROOT_WORKSPACE_PATH/custom_env.sh" custom_env.sh
echo "Copied custom_env.sh"
cp -r "$ROOT_WORKSPACE_PATH/thirdparty/installed" thirdparty/
echo "Copied thirdparty/installed"
cp -f "$ROOT_WORKSPACE_PATH/build.sh" build.sh
echo "Copied build.sh"
touch .worktree_initialized
exit 0