Include executable test in GitHub action
authorColin Clark <colin.clark@cclark.uk>
Sun, 21 May 2023 14:52:34 +0000 (15:52 +0100)
committerColin Clark <colin.clark@cclark.uk>
Sun, 21 May 2023 14:52:34 +0000 (15:52 +0100)
- Include basic executable test - get version
- Use -D<option>=disabled for the no-options test

.github/workflows/check-build-actions.yml
meson.build
src/meson.build

index 2e8a365..2c4c12d 100644 (file)
@@ -8,10 +8,21 @@ jobs:
     - run: sudo apt-get install build-essential libgtk-3-dev
     - uses: actions/checkout@v3
     - uses: actions/setup-python@v4
+    - run: sudo apt-get install xvfb
     - uses: BSFishy/meson-build@v1.0.3
       with:
-        action: build
+        action: test
+        directory: build
+        setup-options: -Darchive=disabled -Dcms=disabled -Ddevel=disabled -Ddoxygen=disabled -Ddjvu=disabled -Devince=disabled -Dexecinfo=disabled -Dexiv2=disabled -Dgit=disabled -Dgps-map=disabled -Dheif=disabled -Dj2k=disabled -Djpeg=disabled -Djpegxl=disabled -Dlibraw=disabled -Dlua=disabled -Dpandoc=disabled -Dpdf=disabled -Dspell=disabled -Dtiff=dissabled -Dvideothumbnailer=disabled -Dyelp-build=disabled
+        options: --verbose
         meson-version: 0.56.2
+    - name: Upload logs
+      uses: actions/upload-artifact@v2
+      if: always()
+      with:
+        name: logs-all
+        path: /home/runner/work/geeqie/geeqie/build/meson-logs/*.txt
+        retention-days: 5
 
   Check-Build-Most-Options:
     runs-on: ubuntu-latest
@@ -31,7 +42,17 @@ jobs:
     #~ - run: sudo apt-get install yelp-tools
     - uses: actions/checkout@v3
     - uses: actions/setup-python@v4
+    - run: sudo apt-get install xvfb
     - uses: BSFishy/meson-build@v1.0.3
       with:
-        action: build
+        action: test
+        directory: build
+        options: --verbose
         meson-version: 0.56.2
+    - name: Upload logs
+      uses: actions/upload-artifact@v2
+      if: always()
+      with:
+        name: logs-all
+        path: /home/runner/work/geeqie/geeqie/build/meson-logs/*.txt
+        retention-days: 5
index b1642f9..49e10dc 100644 (file)
@@ -630,3 +630,7 @@ i18n.merge_file(
     install_dir : appdatadir)
 
 configure_file(input: 'geeqie.spec.in', output: 'geeqie.spec', configuration: conf_data)
+
+# Basic test of the executable
+xvfb = find_program('xvfb-run')
+test('Basic test', xvfb, args: ['--auto-servernum', geeqie_exe, '--version'], timeout: 100)
index 4b6a9a9..2930469 100644 (file)
@@ -267,7 +267,7 @@ if conf_data.has('HAVE_LCMS')
     project_sources += ClayRGB1998_icc_h
 endif
 
-executable('geeqie', project_sources,
+geeqie_exe = executable('geeqie', project_sources,
 dependencies : [
 gtk_dep,
 champlain_dep,