Skip to content

Commit 1b2efb2

Browse files
committed
testing local dep for plugins
1 parent baf06c8 commit 1b2efb2

3 files changed

Lines changed: 44 additions & 4 deletions

File tree

.github/workflows/sanitize.yaml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,30 @@ jobs:
7171
7272
echo "Manual build for sanitizer: ${{ matrix.sanitizer }} completed"
7373
74+
- name: Package sanitizer logs
75+
if: ${{ always() }}
76+
shell: bash
77+
run: |
78+
set -euo pipefail
79+
src="/root/src/logs"
80+
outdir="$GITHUB_WORKSPACE/_artifacts"
81+
mkdir -p "$outdir"
82+
83+
if [[ -d "$src" ]]; then
84+
tar -C "/root/src" -czf "$outdir/logs-${{ matrix.baseos }}-${{ matrix.arch }}-${{ matrix.sanitizer }}.tgz" "logs"
85+
echo "Packaged logs from $src"
86+
else
87+
echo "No logs directory at $src"
88+
fi
89+
90+
- name: Upload sanitizer logs (artifact)
91+
if: ${{ always() }}
92+
uses: actions/upload-artifact@v4
93+
with:
94+
name: logs-${{ matrix.baseos }}-${{ matrix.arch }}-${{ matrix.sanitizer }}
95+
path: ${{ github.workspace }}/_artifacts/logs-${{ matrix.baseos }}-${{ matrix.arch }}-${{ matrix.sanitizer }}.tgz
96+
if-no-files-found: warn
97+
retention-days: 14
7498

7599
build-with-sanitizer-final:
76100
name: Sanitize - summary
@@ -87,3 +111,4 @@ jobs:
87111
- name: Pass
88112
run: |
89113
echo "### All sanitizer jobs passed." >> $GITHUB_STEP_SUMMARY
114+
echo "### Uploaded artifact: logs-${{ matrix.baseos }}-${{ matrix.arch }}-${{ matrix.sanitizer }}" >> $GITHUB_STEP_SUMMARY

meson.build

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ all_libs = []
2929
all_includes = []
3030
empty_dict = { 'na' : [''] }
3131
all_lib_names = [] # Store library names as linker flags
32+
lib_target_maps = {}
3233
python_exe = import('python').find_installation('python3')
3334

3435

@@ -51,6 +52,7 @@ subdir('gdata')
5152
subdir('gdynamicDigitization')
5253
subdir('eventDispenser')
5354
subdir('gqtbuttonswidget')
55+
subdir('gstreamer')
5456
subdir('g4display')
5557
subdir('g4dialog')
5658
subdir('gboard')
@@ -59,7 +61,6 @@ subdir('g4system')
5961
subdir('gparticle')
6062
subdir('gphysics')
6163
subdir('gsplash')
62-
subdir('gstreamer')
6364
subdir('gsd') # TODO: example
6465
subdir('gfields')
6566
subdir('gdetector')
@@ -106,6 +107,7 @@ foreach L : LD
106107
if not all_libs.contains(this_library)
107108
all_libs += this_library
108109
all_lib_names += 'lib' + this_lib_name + '.a' # Add as linker flag
110+
lib_target_maps += {this_lib_name: this_library}
109111
endif
110112
endif
111113

@@ -122,7 +124,18 @@ foreach L : LD
122124
if not sources.contains('')
123125
plugin_link_with = [this_library]
124126
endif
125-
127+
if lib_target_maps.has_key('gtouchable')
128+
plugin_link_with += [lib_target_maps['gtouchable']]
129+
endif
130+
if lib_target_maps.has_key('gdata')
131+
plugin_link_with += [lib_target_maps['gdata']]
132+
endif
133+
if lib_target_maps.has_key('gtranslationTable')
134+
plugin_link_with += [lib_target_maps['gtranslationTable']]
135+
endif
136+
if lib_target_maps.has_key('ghit')
137+
plugin_link_with += [lib_target_maps['ghit']]
138+
endif
126139
shared_library(
127140
name,
128141
sources[0],
@@ -132,7 +145,8 @@ foreach L : LD
132145
link_with : plugin_link_with,
133146
name_suffix : 'gplugin',
134147
name_prefix : '',
135-
override_options : ['b_staticpic=false']
148+
# for shared modules, the static libraries they link must be PIC.
149+
override_options : ['b_staticpic=true']
136150
)
137151

138152
endforeach

meson/g4_pkgconfig.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,5 +188,6 @@ def generate_pkgconfig(install_prefix: Path,
188188
generate_pkgconfig(install_dir, "geant4-config",
189189
"geant4_core.pc", "Geant4 Core",
190190
"Geant4 Simulation Toolkit (core, no graphical/GUI libs)",
191-
cflags_filter=filter_graphical_cflags)
191+
cflags_filter=filter_graphical_cflags,
192+
libs_filter=filter_graphical_libs)
192193

0 commit comments

Comments
 (0)