Skip to content

Commit 1112178

Browse files
committed
wip: docker image testing
1 parent e13ebef commit 1112178

File tree

6 files changed

+226
-0
lines changed

6 files changed

+226
-0
lines changed

.github/workflows/docker.yml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: Build Docker Images v4
2+
3+
on:
4+
workflow_dispatch:
5+
6+
permissions:
7+
contents: read
8+
packages: write
9+
10+
jobs:
11+
build:
12+
runs-on: ubuntu-latest
13+
strategy:
14+
matrix:
15+
config:
16+
- name: "neon"
17+
tag: "22.04"
18+
dockerfile: "Dockerfile.kde-neon.2204"
19+
- name: "neon"
20+
tag: "24.04"
21+
dockerfile: "Dockerfile.kde-neon.2404"
22+
- name: "ubuntu"
23+
tag: "22.04"
24+
dockerfile: "Dockerfile.ubuntu.2204"
25+
- name: "ubuntu"
26+
tag: "24.04"
27+
dockerfile: "Dockerfile.ubuntu.2404"
28+
29+
steps:
30+
- name: Checkout repository
31+
uses: actions/checkout@v4
32+
33+
- name: Log in to GitHub Container Registry
34+
uses: docker/login-action@v3
35+
with:
36+
registry: ghcr.io
37+
username: ${{ github.actor }}
38+
password: ${{ secrets.GITHUB_TOKEN }}
39+
40+
- name: Build Docker image for ${{ matrix.config.name }}
41+
run: |
42+
echo "Building image variant: ${{ matrix.config.name }}"
43+
44+
IMAGE="ghcr.io/${{ github.repository_owner }}/${{ matrix.config.name }}:${{ matrix.config.tag }}"
45+
46+
cp -v "docker/${{ matrix.config.dockerfile }}" Dockerfile
47+
48+
docker build -t "${IMAGE}" .
49+
docker push "${IMAGE}"
50+
51+
- name: Summary
52+
run: |
53+
echo "pushed image: ghcr.io/${{ github.repository_owner }}/${{ matrix.config.name }}:${{ matrix.config.tag }}"

.github/workflows/linux.yml

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
name: Linux workflow
2+
on:
3+
push:
4+
branches:
5+
- main
6+
pull_request:
7+
branches:
8+
- main
9+
10+
jobs:
11+
build:
12+
runs-on: ubuntu-latest
13+
name: build (${{ matrix.config.name }})
14+
strategy:
15+
matrix:
16+
config:
17+
- name: ubuntu-gcc-24.04
18+
container: "ghcr.io/scrubbbbs/ubuntu:24.04"
19+
#deps: ""
20+
deps: "libquazip1-qt6-dev"
21+
#cmake_flags: "-DENABLE_QUAZIP=ON -DUSE_SYSTEM_QUAZIP=OFF"
22+
cmake_flags: "-DENABLE_QUAZIP=ON"
23+
env: "CC=gcc CXX=g++"
24+
25+
container:
26+
image: ${{ matrix.config.container }}
27+
credentials:
28+
username: ${{ github.actor }}
29+
password: ${{ secrets.GITHUB_TOKEN }}
30+
31+
steps:
32+
- uses: actions/checkout@v4
33+
with:
34+
ref: ${{ github.event.pull_request.head.sha }}
35+
36+
- name: Install build dependencies
37+
run: |
38+
sudo apt-get update
39+
sudo apt-get install -y libexiv2-dev cmake build-essential qt6-base-dev qt6-tools-dev libqt6svg6-dev qt6-image-formats-plugins libgl-dev qt6-l10n-tools ${{ matrix.config.deps }}
40+
41+
- name: Checkout
42+
run: |
43+
clang --version
44+
gcc --version
45+
git clone --depth 1 --no-single-branch https://github.com/scrubbbbs/nomacs.git
46+
cd nomacs
47+
git checkout appimage-test
48+
git submodule init
49+
git submodule update 3rd-party/quazip
50+
- name: Cmake
51+
run: |
52+
cd nomacs/
53+
mkdir build
54+
cd build
55+
${{ matrix.config.env }} cmake -G Ninja ${{ matrix.config.cmake_flags }} ../ImageLounge
56+
57+
- name: Get Build Info
58+
id: get_version
59+
shell: bash
60+
run: |
61+
cd nomacs/build
62+
ARCH=$(uname --machine)
63+
OS=$(source /etc/lsb-release; echo $DISTRIB_ID-$DISTRIB_RELEASE)
64+
SHA=$(git rev-parse --short ${{ github.event.pull_request.head.sha || github.sha }})
65+
VERSION=$(cat DkVersion.h | grep NOMACS_VERSION_STR | sed 's/[^0-9\.]*//g')
66+
echo "VERSION=${VERSION}-${SHA}-${OS}-${ARCH}" >> $GITHUB_OUTPUT
67+
echo "ARCH=${ARCH}" >> $GITHUB_OUTPUT
68+
69+
- name: Compile
70+
run: |
71+
cd nomacs/build
72+
ninja
73+
ninja check
74+
75+
- name: AppImage
76+
run: |
77+
cd nomacs/build
78+
ninja appimage
79+
80+
- name: Upload Artifacts
81+
uses: actions/upload-artifact@v4
82+
with:
83+
name: AppImage ${{ matrix.config.name }}
84+
path: nomacs/build/nomacs-*.AppImage
85+
retention-days: 1
86+
87+

docker/Dockerfile.kde-neon.2204

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
FROM ubuntu:22.04
2+
3+
ENV DEBIAN_FRONTEND=noninteractive
4+
5+
RUN apt update
6+
7+
RUN apt install -y bash coreutils git curl wget gnupg ca-certificates tar gzip unzip sudo
8+
9+
RUN echo "deb http://archive.neon.kde.org/user jammy main" > \
10+
/etc/apt/sources.list.d/neon.list \
11+
&& wget -qO - https://archive.neon.kde.org/public.key | apt-key add - \
12+
&& apt-get update
13+
14+
RUN apt install -y qt6-base-dev qt6-tools-dev qt6-tools-dev-tools libqt6svg6-dev libqt6core5compat6-dev qt6-l10n-tools qt6-image-formats-plugins libexiv2-dev libraw-dev libopencv-dev libtiff-dev build-essential git cmake lcov libgtest-dev libgl-dev curl kf6-kimageformat-plugins ninja-build clang clang-format clang-tidy fuse3 file
15+
16+
RUN apt upgrade -y
17+
18+
RUN apt clean && rm -rf /var/lib/apt/lists/*
19+
20+
ENV LANG=C.UTF-8
21+
ENV LC_ALL=C.UTF-8
22+
ENTRYPOINT []
23+
CMD []
24+
USER root

docker/Dockerfile.kde-neon.2404

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
FROM ubuntu:24.04
2+
3+
ENV DEBIAN_FRONTEND=noninteractive
4+
5+
RUN apt update
6+
7+
RUN apt install -y bash coreutils git curl wget gnupg ca-certificates tar gzip unzip sudo
8+
9+
RUN echo "deb http://archive.neon.kde.org/user noble main" > \
10+
/etc/apt/sources.list.d/neon.list \
11+
&& wget -qO - https://archive.neon.kde.org/public.key | apt-key add - \
12+
&& apt-get update
13+
14+
RUN apt install -y qt6-base-dev qt6-tools-dev qt6-tools-dev-tools libqt6svg6-dev libqt6core5compat6-dev qt6-l10n-tools qt6-image-formats-plugins libexiv2-dev libraw-dev libopencv-dev libtiff-dev build-essential git cmake lcov libgtest-dev libgl-dev curl kf6-kimageformat-plugins ninja-build libquazip1-qt6-dev clang clang-format clang-tidy fuse3 file
15+
16+
RUN apt upgrade -y
17+
18+
RUN apt clean && rm -rf /var/lib/apt/lists/*
19+
20+
ENV LANG=C.UTF-8
21+
ENV LC_ALL=C.UTF-8
22+
ENTRYPOINT []
23+
CMD []
24+
USER root

docker/Dockerfile.ubuntu.2204

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
FROM ubuntu:22.04
2+
3+
ENV DEBIAN_FRONTEND=noninteractive
4+
5+
RUN apt update
6+
7+
RUN apt install -y bash coreutils git curl wget gnupg ca-certificates tar gzip unzip sudo
8+
9+
RUN apt install -y qt6-base-dev qt6-tools-dev qt6-tools-dev-tools libqt6svg6-dev libqt6core5compat6-dev qt6-l10n-tools qt6-image-formats-plugins libexiv2-dev libraw-dev libopencv-dev libtiff-dev build-essential git cmake lcov libgtest-dev libgl-dev curl ninja-build clang clang-format clang-tidy fuse3 file
10+
11+
RUN apt upgrade -y
12+
13+
RUN apt clean && rm -rf /var/lib/apt/lists/*
14+
15+
ENV LANG=C.UTF-8
16+
ENV LC_ALL=C.UTF-8
17+
ENTRYPOINT []
18+
CMD []
19+
USER root

docker/Dockerfile.ubuntu.2404

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
FROM ubuntu:24.04
2+
3+
ENV DEBIAN_FRONTEND=noninteractive
4+
5+
RUN apt update
6+
7+
RUN apt install -y bash coreutils git curl wget gnupg ca-certificates tar gzip unzip sudo
8+
9+
RUN apt install -y qt6-base-dev qt6-tools-dev qt6-tools-dev-tools libqt6svg6-dev libqt6core5compat6-dev qt6-l10n-tools qt6-image-formats-plugins libexiv2-dev libraw-dev libopencv-dev libtiff-dev build-essential git cmake lcov libgtest-dev libgl-dev curl ninja-build libquazip1-qt6-dev clang clang-format clang-tidy fuse3 file
10+
11+
RUN apt upgrade -y
12+
13+
RUN apt clean && rm -rf /var/lib/apt/lists/*
14+
15+
ENV LANG=C.UTF-8
16+
ENV LC_ALL=C.UTF-8
17+
ENTRYPOINT []
18+
CMD []
19+
USER root

0 commit comments

Comments
 (0)