diff --git a/.github/install-dependency-packages.sh b/.github/install-dependency-packages.sh index e1f648ea..6ba2f927 100755 --- a/.github/install-dependency-packages.sh +++ b/.github/install-dependency-packages.sh @@ -34,6 +34,8 @@ GENERAL_PACKAGE_LIST_LINUX=( openssl gsl davix + ### RCDB dependencies + mariadb ) IGUANA_PACKAGE_LIST_LINUX=( fmt @@ -56,6 +58,8 @@ GENERAL_PACKAGE_LIST_MACOS=( libxext openssl gsl + ### RCDB dependencies + mariadb ) IGUANA_PACKAGE_LIST_MACOS=( fmt @@ -139,6 +143,8 @@ case $runner in ### link homebrew's gcc, for gfortran brew unlink gcc brew link gcc + ### kluge ssl linker issue (see, e.g., https://github.com/brianmario/mysql2/issues/795) + echo "LIBRARY_PATH=${LIBRARY_PATH:+${LIBRARY_PATH}:}$(pkg-config libssl --variable libdir)" | tee -a $GITHUB_ENV ;; *) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6c7bb37c..98a4a668 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -351,6 +351,19 @@ jobs: - name: set ROOT environment if: ${{ matrix.id != 'noROOT' }} run: iguana_src/.github/source-ROOT.sh root + ###### RCDB + - name: get RCDB + uses: actions/checkout@v4 + with: + repository: JeffersonLab/rcdb + ref: main + path: rcdb_src + - name: set RCDB CI vars + id: rcdb + working-directory: rcdb_src + run: | + echo prefix=$(pwd) >> $GITHUB_OUTPUT + echo ver=$(git rev-parse HEAD) >> $GITHUB_OUTPUT ###### summarize dependencies - name: summarize dependencies if: ${{ matrix.id == 'cpp' }} @@ -358,7 +371,8 @@ jobs: echo '### Dependencies' >> $GITHUB_STEP_SUMMARY echo '| Dependency | Version |' >> $GITHUB_STEP_SUMMARY echo '| --- | --- |' >> $GITHUB_STEP_SUMMARY - echo "| \`hipo\` | ${{ env.hipo_ref }} |" >> $GITHUB_STEP_SUMMARY + echo "| \`hipo\` | \`${{ env.hipo_ref }}\` |" >> $GITHUB_STEP_SUMMARY + echo "| \`rcdb\` | \`${{ steps.rcdb.outputs.ver }}\` |" >> $GITHUB_STEP_SUMMARY echo "| \`root\` | $(root --version 2>&1 | head -n1) |" >> $GITHUB_STEP_SUMMARY echo "| \`ruby\` | $(ruby --version) |" >> $GITHUB_STEP_SUMMARY cat pkg_summary.md >> $GITHUB_STEP_SUMMARY @@ -368,6 +382,8 @@ jobs: meson setup iguana_build iguana_src \ --prefix=$(pwd)/iguana \ --pkg-config-path=$(pwd)/hipo/lib/pkgconfig \ + -Drcdb:home=${{ steps.rcdb.outputs.prefix }} \ + -Dz_require_rcdb=true \ -Dwerror=true \ -Dinstall_examples=true \ -Dtest_data_file=$(pwd)/test_data.hipo \ diff --git a/doc/gen/meson.build b/doc/gen/meson.build index 0626ecff..e7f0e1e8 100644 --- a/doc/gen/meson.build +++ b/doc/gen/meson.build @@ -21,5 +21,5 @@ doc_tgt = custom_target( build_by_default: true, command: [ prog_doxygen, doxyfile ], install: true, - install_dir: join_paths(get_option('datadir'), 'doc', meson.project_name()), + install_dir: get_option('datadir') / 'doc' / meson.project_name(), ) diff --git a/doc/ifarm.md b/doc/ifarm.md index 8ad486b2..de0aa556 100644 --- a/doc/ifarm.md +++ b/doc/ifarm.md @@ -5,7 +5,7 @@ ```bash meson/resolve-dependencies.py --help # prints the usage guide ``` -Use the `--env` option and set the resulting environment variables. +Use the resulting arguments when setting up or configuring your build directory. ## Build and Install diff --git a/doc/setup.md b/doc/setup.md index f0b188a3..513f8bfb 100644 --- a/doc/setup.md +++ b/doc/setup.md @@ -70,6 +70,15 @@ cmake --install build-hipo - After installation, depending on ROOT's installation prefix you may also need to set your environment so ROOT may be found; this is typically done by `source /path/to/root/bin/thisroot.sh` +### 🟩 Optional: `RCDB`: Run Condition Database + +- RCDB is optional, but needed for algorithms that use, _e.g._, the beam energy +- You do not need to compile RCDB, just clone the repository +- You may need to use the latest version on the main branch, rather than the most recent tag +- Iguana uses `mysql` for RCDB; you may need to install `mariadb` or `mysql` client on your system + - [`mariadb` is an open source fork of `mysql`](https://mariadb.org/) + - depending on your OS's packages, you may need the "dev" version, _e.g._, `libmariadb-dev` + ## 🟠 Building and Installing @@ -87,10 +96,9 @@ Use [`meson/resolve-dependencies.py`](../meson/resolve-dependencies.py) to help /path/to/iguana-source/meson/resolve-dependencies.py --help # prints the usage guide ``` Tell it where your dependencies are installed and it will tell you the build options -that you need for Step 2; you can also choose to write those build options to an INI (native) file. +that you need for Step 2. -Alternatively, you may use environment variables; see the [note on dependency -resolution](dependency_resolution.md) for more general guidance. +See the [note on dependency resolution](dependency_resolution.md) for more general guidance. ### 🟩 Step 2: Generate a build directory @@ -118,9 +126,11 @@ All build options, their current values, and their descriptions may be found by meson configure # outputs in a pager (`less`); you may scroll, or press 'q' to quit meson configure --no-pager # do not use a pager ``` -**but that's a _lot_ of text!** The _most important_ build options are near the bottom, under **"Project options"**. +**but that's a _lot_ of text!** The _most important_ build options are under the **"Project options"** +sections: the first such section is for `iguana`, and the rest are for subprojects (_e.g._, `rcdb`). + To see _just_ the project options, run the following (which requires [`jq`](https://jqlang.github.io/jq/)): -``` +```bash /path/to/iguana-source/meson/dump-build-options.sh . ``` @@ -130,6 +140,9 @@ meson configure -Dinstall_examples=true ``` You can add as many `-D