Skip to content

Commit a079bac

Browse files
authoredFeb 12, 2025
chore: Rename missing-commits job, and combine nix job files (XRPLF#5268)
- Rename the job in missing-commits.yml from "check" to "up_to_date", because other jobs named "check" prevent merges, but this one should not prevent merges. How else are branches going to get caught up? - Move the job in instrumentation.yml to nix.yml, but keep it entirely independent.
1 parent 3a55a64 commit a079bac

File tree

3 files changed

+97
-111
lines changed

3 files changed

+97
-111
lines changed
 

‎.github/workflows/instrumentation.yml

-103
This file was deleted.

‎.github/workflows/missing-commits.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ on:
99
- release
1010

1111
jobs:
12-
check:
12+
up_to_date:
1313
runs-on: ubuntu-24.04
1414
steps:
1515
- uses: actions/checkout@v4

‎.github/workflows/nix.yml

+96-7
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ on:
33
pull_request:
44
push:
55
# If the branches list is ever changed, be sure to change it on all
6-
# build/test jobs (nix, macos, windows, instrumentation)
6+
# build/test jobs (nix, macos, windows)
77
branches:
88
# Always build the package branches
99
- develop
@@ -15,9 +15,9 @@ concurrency:
1515
group: ${{ github.workflow }}-${{ github.ref }}
1616
cancel-in-progress: true
1717

18-
# This workflow has two job matrixes.
19-
# They can be considered phases because the second matrix ("test")
20-
# depends on the first ("dependencies").
18+
# This workflow has multiple job matrixes.
19+
# They can be considered phases because most of the matrices ("test",
20+
# "coverage", "conan", ) depend on the first ("dependencies").
2121
#
2222
# The first phase has a job in the matrix for each combination of
2323
# variables that affects dependency ABI:
@@ -30,9 +30,12 @@ concurrency:
3030
# to hold the binaries if they are built locally.
3131
# We must use the "{upload,download}-artifact" actions instead.
3232
#
33-
# The second phase has a job in the matrix for each test configuration.
34-
# It installs dependency binaries from the cache, whichever was used,
35-
# and builds and tests rippled.
33+
# The remaining phases have a job in the matrix for each test
34+
# configuration. They install dependency binaries from the cache,
35+
# whichever was used, and build and test rippled.
36+
#
37+
# "instrumentation" is independent, but is included here because it also
38+
# builds on linux in the same "on:" conditions.
3639

3740
jobs:
3841
dependencies:
@@ -293,3 +296,89 @@ jobs:
293296
-DCMAKE_BUILD_TYPE=${configuration}
294297
cmake --build .
295298
./example | grep '^[[:digit:]]\+\.[[:digit:]]\+\.[[:digit:]]\+'
299+
300+
# NOTE we are not using dependencies built above because it lags with
301+
# compiler versions. Instrumentation requires clang version 16 or
302+
# later
303+
304+
instrumentation-build:
305+
env:
306+
CLANG_RELEASE: 16
307+
strategy:
308+
fail-fast: false
309+
runs-on: [self-hosted, heavy]
310+
container: debian:bookworm
311+
steps:
312+
- name: install prerequisites
313+
env:
314+
DEBIAN_FRONTEND: noninteractive
315+
run: |
316+
apt-get update
317+
apt-get install --yes --no-install-recommends \
318+
clang-${CLANG_RELEASE} clang++-${CLANG_RELEASE} \
319+
python3-pip python-is-python3 make cmake git wget
320+
apt-get clean
321+
update-alternatives --install \
322+
/usr/bin/clang clang /usr/bin/clang-${CLANG_RELEASE} 100 \
323+
--slave /usr/bin/clang++ clang++ /usr/bin/clang++-${CLANG_RELEASE}
324+
update-alternatives --auto clang
325+
pip install --no-cache --break-system-packages "conan<2"
326+
327+
- name: checkout
328+
uses: actions/checkout@v4
329+
330+
- name: prepare environment
331+
run: |
332+
mkdir ${GITHUB_WORKSPACE}/.build
333+
echo "SOURCE_DIR=$GITHUB_WORKSPACE" >> $GITHUB_ENV
334+
echo "BUILD_DIR=$GITHUB_WORKSPACE/.build" >> $GITHUB_ENV
335+
echo "CC=/usr/bin/clang" >> $GITHUB_ENV
336+
echo "CXX=/usr/bin/clang++" >> $GITHUB_ENV
337+
338+
- name: configure Conan
339+
run: |
340+
conan profile new --detect default
341+
conan profile update settings.compiler=clang default
342+
conan profile update settings.compiler.version=${CLANG_RELEASE} default
343+
conan profile update settings.compiler.libcxx=libstdc++11 default
344+
conan profile update settings.compiler.cppstd=20 default
345+
conan profile update options.rocksdb=False default
346+
conan profile update \
347+
'conf.tools.build:compiler_executables={"c": "/usr/bin/clang", "cpp": "/usr/bin/clang++"}' default
348+
conan profile update 'env.CXXFLAGS="-DBOOST_ASIO_DISABLE_CONCEPTS"' default
349+
conan profile update 'conf.tools.build:cxxflags+=["-DBOOST_ASIO_DISABLE_CONCEPTS"]' default
350+
conan export external/snappy snappy/1.1.10@
351+
conan export external/soci soci/4.0.3@
352+
353+
- name: build dependencies
354+
run: |
355+
cd ${BUILD_DIR}
356+
conan install ${SOURCE_DIR} \
357+
--output-folder ${BUILD_DIR} \
358+
--install-folder ${BUILD_DIR} \
359+
--build missing \
360+
--settings build_type=Debug
361+
362+
- name: build with instrumentation
363+
run: |
364+
cd ${BUILD_DIR}
365+
cmake -S ${SOURCE_DIR} -B ${BUILD_DIR} \
366+
-Dvoidstar=ON \
367+
-Dtests=ON \
368+
-Dxrpld=ON \
369+
-DCMAKE_BUILD_TYPE=Debug \
370+
-DSECP256K1_BUILD_BENCHMARK=OFF \
371+
-DSECP256K1_BUILD_TESTS=OFF \
372+
-DSECP256K1_BUILD_EXHAUSTIVE_TESTS=OFF \
373+
-DCMAKE_TOOLCHAIN_FILE=${BUILD_DIR}/build/generators/conan_toolchain.cmake
374+
cmake --build . --parallel $(nproc)
375+
376+
- name: verify instrumentation enabled
377+
run: |
378+
cd ${BUILD_DIR}
379+
./rippled --version | grep libvoidstar
380+
381+
- name: run unit tests
382+
run: |
383+
cd ${BUILD_DIR}
384+
./rippled -u --unittest-jobs $(( $(nproc)/4 ))

0 commit comments

Comments
 (0)
Please sign in to comment.