Skip to content

Commit

Permalink
ci: require RCDB in build
Browse files Browse the repository at this point in the history
  • Loading branch information
c-dilks committed Oct 3, 2024
1 parent b4a7cde commit 67ab326
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/install-dependency-packages.sh
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ GENERAL_PACKAGE_LIST_MACOS=(
openssl
gsl
### RCDB dependencies
mariadb # NOTE: could also use 'mysql'
mariadb
)
IGUANA_PACKAGE_LIST_MACOS=(
fmt
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -363,16 +363,16 @@ jobs:
working-directory: rcdb_src
run: |
echo RCDB_HOME=$(pwd) >> $GITHUB_ENV
echo ver=$(git rev-parse HEAD | cut -c1-7) >> $GITHUB_OUTPUT
echo ver=$(git rev-parse HEAD) >> $GITHUB_OUTPUT
###### summarize dependencies
- name: summarize dependencies
if: ${{ matrix.id == 'cpp' }}
run: |
echo '### Dependencies' >> $GITHUB_STEP_SUMMARY
echo '| Dependency | Version |' >> $GITHUB_STEP_SUMMARY
echo '| --- | --- |' >> $GITHUB_STEP_SUMMARY
echo "| \`hipo\` | ${{ env.hipo_ref }} |" >> $GITHUB_STEP_SUMMARY
echo "| \`rcdb\` | commit hash \`${{ steps.rcdb_env.outputs.ver }}\` |" >> $GITHUB_STEP_SUMMARY
echo "| \`hipo\` | \`${{ env.hipo_ref }}\` |" >> $GITHUB_STEP_SUMMARY
echo "| \`rcdb\` | \`${{ steps.rcdb_env.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
Expand All @@ -383,6 +383,7 @@ jobs:
--prefix=$(pwd)/iguana \
--pkg-config-path=$(pwd)/hipo/lib/pkgconfig \
-Drcdb:home=$RCDB_HOME \
-Dz_require_rcdb=true \
-Dwerror=true \
-Dinstall_examples=true \
-Dtest_data_file=$(pwd)/test_data.hipo \
Expand Down
6 changes: 5 additions & 1 deletion meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,11 @@ prog_ruby = find_program(
version: '>=' + run_command(prog_minver, 'ruby', check: true).stdout().strip(),
required: use_chameleon,
)
rcdb_dep = dependency('rcdb', fallback: ['rcdb', 'rcdb_dep'], required: false)
rcdb_dep = dependency(
'rcdb',
fallback: ['rcdb', 'rcdb_dep'],
required: get_option('z_require_rcdb'),
)

# list of dependencies
# FIXME: for users which use LD_LIBRARY_PATH, we should try to keep this list
Expand Down
1 change: 1 addition & 0 deletions meson.options
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,4 @@ option('test_multithreading', type: 'integer', value: 4, min: 0, descriptio
# expert options: the defaults should be reasonable for a local installation; different values may be preferred for installation in common areas
option('z_install_envfile', type: 'boolean', value: true, description: 'Install a sourceable environment variable file')
option('z_require_root', type: 'boolean', value: false, description: 'Fail if ROOT is not found')
option('z_require_rcdb', type: 'boolean', value: false, description: 'Fail if RCDB is not found')
2 changes: 1 addition & 1 deletion subprojects/rcdb/meson.options
Original file line number Diff line number Diff line change
@@ -1 +1 @@
option('home', type: 'string', value: '', description: 'Location of RCDB installation; if empty, RCDB will not be included')
option('home', type: 'string', value: '', description: 'Location of RCDB installation; if empty, RCDB-dependent code will not be included')

0 comments on commit 67ab326

Please sign in to comment.