git repos / SagoImageBrowser

commit e76d9056

Poul Sander · 2026-03-02 20:34
e76d905659458c6eb0ef7ef43ca5b1d73e52ba6e patch · browse files
parent d1aa6cbee007fca0eb95fe5d593d9286a0525baf

Add CI

Changed files

A .dockerignore
A .github/workflows/main.yml
A extra/docker/Dockerfile
diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..445b017 --- /dev/null +++ b/.dockerignore
@@ -0,0 +1,3 @@
+.qt
+build
+Makefile
\ No newline at end of file
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..c7a4c6c --- /dev/null +++ b/.github/workflows/main.yml
@@ -0,0 +1,11 @@
+on: [push]
+
+jobs:
+ ci_job:
+ runs-on: ubuntu-latest
+ name: Test that Sago Image Browser can be compiled
+ steps:
+ - name: Check Out Repo
+ uses: actions/checkout@v2
+ - name: Test Linux build using Docker
+ run: docker build . -f extra/docker/Dockerfile -t sago_image_browser_test
diff --git a/extra/docker/Dockerfile b/extra/docker/Dockerfile new file mode 100644 index 0000000..2eae166 --- /dev/null +++ b/extra/docker/Dockerfile
@@ -0,0 +1,22 @@
+FROM ubuntu:24.04
+
+# Set timezone to UTC. This prevents apt-get install SOME-PACKAGES from asking for timezone during setup
+ENV TZ=UTC
+RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
+
+RUN apt-get update && apt-get install --no-install-recommends -y \
+ build-essential \
+ cmake \
+ qt6-base-dev \
+ libqt6core6 \
+ libqt6gui6 \
+ libqt6widgets6 \
+ && rm -rf /var/lib/apt/lists/*
+
+RUN mkdir -p /staging/sago_image_browser
+
+COPY . /staging/sago_image_browser
+
+RUN cd /staging/sago_image_browser && mkdir -p build && cd build && \
+cmake .. && \
+make