@@ -107,6 +107,43 @@ jobs:
107
107
- name : Run tests under valgrind
108
108
run : ${{github.workspace}}/test/test_valgrind.sh ${{github.workspace}} ${{github.workspace}}/build ${{matrix.tool}}
109
109
110
+ Linux-FetchContent :
111
+ runs-on : ubuntu-latest
112
+ container :
113
+ image : ghcr.io/bb-ur/umf-${{ matrix.os }}:latest
114
+ options : --user test_user --cap-add=SYS_NICE --cap-add=SYS_PTRACE
115
+ volumes :
116
+ - ${{ github.workspace }}:${{ github.workspace }}
117
+ strategy :
118
+ fail-fast : false
119
+ matrix :
120
+ os : ['ubuntu-24.04']
121
+ build_type : [Debug]
122
+ name : FetchContent-Linux (${{matrix.os}}, build_type=${{matrix.build_type}})
123
+
124
+ steps :
125
+ - name : Checkout repository
126
+ uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
127
+ with :
128
+ fetch-depth : 0
129
+
130
+ - name : Configure the fetch_content example
131
+ working-directory : ${{github.workspace}}/examples/fetch_content
132
+ # Fetch_Content the UMF code from the current repository (-DUMF_REPO="${{github.workspace}}")
133
+ run : >
134
+ cmake
135
+ -B ${{github.workspace}}/examples/fetch_content/build
136
+ -DCMAKE_BUILD_TYPE=${{matrix.build_type}}
137
+ -DUMF_REPO="${{github.workspace}}"
138
+
139
+ - name : Build the fetch_content example
140
+ working-directory : ${{github.workspace}}/examples/fetch_content
141
+ run : cmake --build ${{github.workspace}}/examples/fetch_content/build --config ${{matrix.build_type}} -j $(nproc)
142
+
143
+ - name : Run the fetch_content example
144
+ working-directory : ${{github.workspace}}/examples/fetch_content/build
145
+ run : ./umf_example_fetch_content
146
+
110
147
# Build and test UMF with different CMake generators on Windows
111
148
Windows-generators :
112
149
strategy :
@@ -188,6 +225,29 @@ jobs:
188
225
echo "UMF_VERSION=$version" >> $env:GITHUB_ENV
189
226
shell : pwsh
190
227
228
+ - name : Configure the fetch_content example
229
+ working-directory : ${{github.workspace}}/examples/fetch_content
230
+ # Fetch_Content the UMF code from the current repository (-DUMF_REPO="${{github.workspace}}")
231
+ run : >
232
+ cmake
233
+ -B ${{github.workspace}}/examples/fetch_content/build
234
+ -DCMAKE_BUILD_TYPE=${{matrix.build_type}}
235
+ -DCMAKE_PREFIX_PATH="${{env.VCPKG_PATH}}"
236
+ -DUMF_REPO="${{github.workspace}}"
237
+ -DCMAKE_C_COMPILER=${{matrix.compiler.c}}
238
+ -DCMAKE_CXX_COMPILER=${{matrix.compiler.cxx}}
239
+ -G "${{matrix.generator}}"
240
+
241
+ - name : Build the fetch_content example
242
+ working-directory : ${{github.workspace}}/examples/fetch_content
243
+ shell : cmd
244
+ run : cmake --build ${{github.workspace}}/examples/fetch_content/build --config ${{matrix.build_type}} -j %NUMBER_OF_PROCESSORS%
245
+
246
+ - name : Run the fetch_content example
247
+ shell : cmd
248
+ working-directory : ${{github.workspace}}/examples/fetch_content/build
249
+ run : dir .\umf_example_fetch_content.exe
250
+
191
251
- name : Test UMF installation and uninstallation
192
252
# The '--shared-library' parameter is added to the installation test when the UMF is built as a shared library
193
253
# The '--umfd-lib' parameter is added when the UMF is built with the umfd library
0 commit comments