Compare commits

..

3 Commits

Author SHA1 Message Date
tequ
7f8eac93db enable linker on release-builder 2025-11-28 00:25:13 +09:00
tequ
0b896d34e3 try revert fix 2025-11-28 00:15:05 +09:00
tequ
e4d2ea180d check linker correctly used [ci-ga-cmake-verbose] 2025-11-28 00:10:33 +09:00
6 changed files with 21 additions and 47 deletions

View File

@@ -28,8 +28,8 @@ inputs:
description: 'Cache version for invalidation'
required: false
default: '1'
gha_cache_enabled:
description: 'Whether to use actions/cache (disable for self-hosted with volume mounts)'
cache_enabled:
description: 'Whether to use cache'
required: false
default: 'true'
ccache_enabled:
@@ -76,7 +76,7 @@ runs:
echo "name=${SAFE_BRANCH}" >> $GITHUB_OUTPUT
- name: Restore ccache directory for main branch
if: inputs.gha_cache_enabled == 'true' && inputs.ccache_enabled == 'true'
if: inputs.cache_enabled == 'true' && inputs.ccache_enabled == 'true'
id: ccache-restore
uses: ./.github/actions/xahau-ga-cache-restore
with:
@@ -88,7 +88,7 @@ runs:
cache-type: ccache-main
- name: Restore ccache directory for current branch
if: inputs.gha_cache_enabled == 'true' && inputs.ccache_enabled == 'true' && steps.safe-branch.outputs.name != inputs.main_branch
if: inputs.cache_enabled == 'true' && inputs.ccache_enabled == 'true' && steps.safe-branch.outputs.name != inputs.main_branch
id: ccache-restore-current-branch
uses: ./.github/actions/xahau-ga-cache-restore
with:
@@ -246,14 +246,14 @@ runs:
run: ccache -s
- name: Save ccache directory for main branch
if: success() && inputs.gha_cache_enabled == 'true' && inputs.ccache_enabled == 'true' && steps.safe-branch.outputs.name == inputs.main_branch
if: success() && inputs.cache_enabled == 'true' && inputs.ccache_enabled == 'true' && steps.safe-branch.outputs.name == inputs.main_branch
uses: actions/cache/save@v4
with:
path: ~/.ccache-main
key: ${{ steps.ccache-restore.outputs.cache-primary-key }}
- name: Save ccache directory for current branch
if: success() && inputs.gha_cache_enabled == 'true' && inputs.ccache_enabled == 'true' && steps.safe-branch.outputs.name != inputs.main_branch
if: success() && inputs.cache_enabled == 'true' && inputs.ccache_enabled == 'true' && steps.safe-branch.outputs.name != inputs.main_branch
uses: actions/cache/save@v4
with:
path: ~/.ccache-current

View File

@@ -17,8 +17,8 @@ inputs:
description: 'Cache version for invalidation'
required: false
default: '1'
gha_cache_enabled:
description: 'Whether to use actions/cache (disable for self-hosted with volume mounts)'
cache_enabled:
description: 'Whether to use caching'
required: false
default: 'true'
main_branch:
@@ -64,7 +64,7 @@ runs:
using: 'composite'
steps:
- name: Restore Conan cache
if: inputs.gha_cache_enabled == 'true'
if: inputs.cache_enabled == 'true'
id: cache-restore-conan
uses: ./.github/actions/xahau-ga-cache-restore
with:
@@ -77,7 +77,7 @@ runs:
cache-type: Conan
- name: Configure Conan cache paths
if: inputs.gha_cache_enabled == 'false'
if: inputs.cache_enabled == 'false'
shell: bash
# For self-hosted runners, register cache paths to be used as volumes
# This allows the cache to be shared between containers
@@ -163,7 +163,7 @@ runs:
..
- name: Save Conan cache
if: success() && inputs.gha_cache_enabled == 'true' && steps.cache-restore-conan.outputs.cache-hit != 'true'
if: success() && inputs.cache_enabled == 'true' && steps.cache-restore-conan.outputs.cache-hit != 'true'
uses: actions/cache/save@v4
with:
path: ~/.conan2

View File

@@ -174,23 +174,8 @@ jobs:
with open(os.environ['GITHUB_OUTPUT'], 'a') as f:
f.write(f"matrix={output}\n")
apt-cache:
runs-on: [self-hosted, generic, 20.04]
container:
image: ubuntu:24.04
volumes:
- /home/runner/.apt-cache:/var/cache/apt
steps:
- name: Install build dependencies to save apt cache
run: |
apt-get update
apt-get install -y software-properties-common
add-apt-repository ppa:ubuntu-toolchain-r/test -y
apt-get update
apt-get install -y python3 python-is-python3 pipx cmake ninja-build ccache perl libsqlite3-dev
build:
needs: [matrix-setup, apt-cache]
needs: matrix-setup
runs-on: [self-hosted, generic, 20.04]
container:
image: ubuntu:24.04
@@ -198,8 +183,8 @@ jobs:
- /home/runner/.conan-cache:/.conan-cache
- /home/runner/.ccache-main:/github/home/.ccache-main
- /home/runner/.ccache-current:/github/home/.ccache-current
# apt cache as readonly
- /home/runner/.apt-cache:/apt-cache-ro:ro
options: >-
--privileged
defaults:
run:
shell: bash
@@ -217,18 +202,8 @@ jobs:
- name: Checkout
uses: actions/checkout@v4
- name: Seed apt cache
run: |
# prepare apt cache directory
mkdir -p /var/cache/apt/archives
# copy existing .deb files from apt cache
mkdir -p /var/cache/apt/archives
cp -a /apt-cache-ro/archives/. /var/cache/apt/archives/
- name: Install build dependencies
run: |
# install dependencies from apt cache
apt-get update
apt-get install -y software-properties-common
add-apt-repository ppa:ubuntu-toolchain-r/test -y
@@ -337,7 +312,7 @@ jobs:
cc: ${{ matrix.cc }}
cxx: ${{ matrix.cxx }}
stdlib: ${{ matrix.stdlib }}
gha_cache_enabled: 'false' # Disable caching for self hosted runner
cache_enabled: 'false' # Disable caching for self hosted runner
- name: Build
uses: ./.github/actions/xahau-ga-build
@@ -352,7 +327,7 @@ jobs:
main_branch: ${{ env.MAIN_BRANCH_NAME }}
stdlib: ${{ matrix.stdlib }}
clang_gcc_toolchain: ${{ matrix.clang_gcc_toolchain || '' }}
gha_cache_enabled: 'false' # Disable caching for self hosted runner
cache_enabled: 'false' # Disable caching for self hosted runner
ccache_max_size: '100G'
- name: Set artifact name

View File

@@ -149,6 +149,7 @@ if (use_gold AND is_gcc)
required to make gold play nicely with jemalloc.
#]=========================================================]
if (("${LD_VERSION}" MATCHES "GNU gold") AND (NOT jemalloc))
message(STATUS "Using gold linker")
target_link_libraries (common
INTERFACE
-fuse-ld=gold
@@ -170,6 +171,7 @@ if (use_lld)
COMMAND ${CMAKE_CXX_COMPILER} -fuse-ld=lld -Wl,--version
ERROR_QUIET OUTPUT_VARIABLE LD_VERSION)
if ("${LD_VERSION}" MATCHES "LLD")
message(STATUS "Using lld linker")
target_link_libraries (common INTERFACE -fuse-ld=lld)
endif ()
unset (LD_VERSION)

View File

@@ -67,9 +67,8 @@ fi
# Environment setup moved to Dockerfile in release-builder.sh
source /opt/rh/gcc-toolset-11/enable
export PATH=/usr/local/bin:$PATH
export CC='ccache gcc' &&
export CXX='ccache g++' &&
echo "-- Build Rippled --" &&
export PATH=/usr/lib/ccache:$PATH
echo "-- Build Rippled --"
pwd &&
echo "MOVING TO [ build-core.sh ]";

View File

@@ -128,9 +128,6 @@ ENV CMAKE_EXE_LINKER_FLAGS="-static-libstdc++"
ENV LLVM_DIR=/usr/lib64/llvm14/lib/cmake/llvm
ENV WasmEdge_LIB=/usr/local/lib64/libwasmedge.a
ENV CC='ccache gcc'
ENV CXX='ccache g++'
# Install LLD
RUN /hbb_exe/activate-exec bash -c "source /opt/rh/gcc-toolset-11/enable && \
cd /tmp && \
@@ -189,6 +186,7 @@ RUN cd /tmp && \
# Set environment variables
ENV PATH=/usr/local/bin:$PATH
ENV PATH=/usr/lib/ccache:$PATH
# Configure ccache and Conan 2
# NOTE: Using echo commands instead of heredocs because heredocs in Docker RUN commands are finnicky