@@ -60,13 +60,46 @@ jobs:
6060 with :
6161 fetch-depth : 0
6262
63- - name : Build and install latest DTK dependencies from source
63+ - name : Build and install latest DTK Qt5 dependencies from source
64+ if : matrix.qt_version == 5
65+ run : |
66+ set -euxo pipefail
67+
68+ build_repo() {
69+ local repo="$1"
70+ shift
71+ case "${repo}" in
72+ dtkcommon|dtklog|dtkcore|dtkgui) ;;
73+ *) echo "unsupported repo: ${repo}" >&2; exit 1 ;;
74+ esac
75+ cd /tmp
76+ rm -rf "${repo}"
77+ git clone --depth=1 "https://github.com/linuxdeepin/${repo}.git"
78+ cmake -S "${repo}" -B "${repo}/build" \
79+ -GNinja \
80+ -DCMAKE_BUILD_TYPE=Release \
81+ -DCMAKE_INSTALL_PREFIX=/usr \
82+ -DBUILD_DOCS=OFF \
83+ -DBUILD_EXAMPLES=OFF \
84+ -DBUILD_TESTING=OFF \
85+ "$@"
86+ cmake --build "${repo}/build" -j"$(nproc)"
87+ cmake --install "${repo}/build"
88+ }
89+
90+ build_repo dtkcommon
91+ build_repo dtklog -DDTK5=ON
92+ build_repo dtkcore -DDTK5=ON
93+ build_repo dtkgui -DDTK5=ON
94+
95+ - name : Build and install latest DTK Qt6 dependencies from source
96+ if : matrix.qt_version == 6
6497 run : |
6598 set -euxo pipefail
6699
67100 build_repo() {
68101 local repo="$1"
69- local extra_args="${2:-}"
102+ shift
70103 case "${repo}" in
71104 dtkcommon|dtklog|dtkcore|dtkgui) ;;
72105 *) echo "unsupported repo: ${repo}" >&2; exit 1 ;;
@@ -81,17 +114,17 @@ jobs:
81114 -DBUILD_DOCS=OFF \
82115 -DBUILD_EXAMPLES=OFF \
83116 -DBUILD_TESTING=OFF \
84- ${extra_args}
117+ "$@"
85118 cmake --build "${repo}/build" -j"$(nproc)"
86119 cmake --install "${repo}/build"
87120 }
88121
89122 build_repo dtkcommon
90- build_repo dtklog " -DDTK5=${{ matrix.dtk5 }}"
91- build_repo dtkcore " -DDTK5=${{ matrix.dtk5 }}"
92- build_repo dtkgui " -DDTK5=${{ matrix.dtk5 }}"
123+ build_repo dtklog -DDTK5=OFF
124+ build_repo dtkcore -DDTK5=OFF
125+ build_repo dtkgui -DDTK5=OFF
93126
94- - name : Configure dtkdeclarative
127+ - name : Configure dtkdeclarative for Qt${{ matrix.qt_version }}
95128 run : |
96129 set -o pipefail
97130 cmake -B build \
@@ -116,7 +149,7 @@ jobs:
116149 echo "::error::$line"
117150 done
118151
119- - name : Build dtkdeclarative
152+ - name : Build dtkdeclarative for Qt${{ matrix.qt_version }}
120153 run : |
121154 set -o pipefail
122155 cmake --build build -j$(nproc) 2>&1 | tee /tmp/cmake-build.log
@@ -149,7 +182,7 @@ jobs:
149182 echo "::error::$line"
150183 done
151184
152- - name : Install dtkdeclarative to staging directory
185+ - name : Install dtkdeclarative Qt${{ matrix.qt_version }} to staging directory
153186 run : |
154187 DESTDIR=/tmp/dtkdeclarative-install cmake --install build
155188 echo "Total: $(find /tmp/dtkdeclarative-install -type f | wc -l) files"
0 commit comments