Skip to content

Commit 2d06fa8

Browse files
committed
Update Linux CI
1 parent 99fd5a7 commit 2d06fa8

3 files changed

Lines changed: 46 additions & 15 deletions

File tree

.github/workflows/linux.yml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,3 @@ jobs:
2020
with:
2121
name: friction-ci-linux-x86_64
2222
path: distfiles/builds/*/*.AppImage
23-
qt6:
24-
runs-on: ubuntu-24.04
25-
steps:
26-
- uses: actions/checkout@v4
27-
- name: Build
28-
run: APT=1 QT6="ON" CI=1 MKJOBS=2 ./src/scripts/ci.sh

.github/workflows/ubuntu.yml

Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,29 @@
11
name: Ubuntu
22

3-
on: workflow_dispatch
3+
on: [push, pull_request]
44

55
jobs:
6-
jammy:
7-
runs-on: ubuntu-22.04
6+
qt5_15:
7+
runs-on: ubuntu-24.04
88
steps:
9-
- uses: actions/checkout@v3
9+
- uses: actions/checkout@v4
1010
- name: Build
1111
run: APT=1 CI=1 MKJOBS=2 ./src/scripts/ci.sh
12-
noble:
12+
qt5_15_arm:
13+
runs-on: ubuntu-24.04-arm
14+
steps:
15+
- uses: actions/checkout@v4
16+
- name: Build
17+
run: APT=1 CI=1 CPU=aarch64 MKJOBS=2 ./src/scripts/ci.sh
18+
qt6_4:
1319
runs-on: ubuntu-24.04
1420
steps:
15-
- uses: actions/checkout@v3
21+
- uses: actions/checkout@v4
1622
- name: Build
17-
run: APT=1 CI=1 MKJOBS=2 ./src/scripts/ci.sh
23+
run: APT=1 QT6="ON" FFMPEG=1 CI=1 MKJOBS=2 ./src/scripts/ci.sh
24+
qt6_10:
25+
runs-on: ubuntu-26.04
26+
steps:
27+
- uses: actions/checkout@v4
28+
- name: Build
29+
run: APT=1 QT6="ON" FFMPEG=1 CI=1 MKJOBS=2 ./src/scripts/ci.sh

src/scripts/ci.sh

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,16 @@
1717
# along with this program. If not, see <http://www.gnu.org/licenses/>.
1818
#
1919

20-
# Friction Qt5/Qt6 CI (Ubuntu 24.04)
20+
# Friction Ubuntu CI
2121

2222
set -e -x
2323

2424
CI=${CI:-0}
2525
APT=${APT:-0}
2626
PC=${PC:-""}
2727
QT6=${QT6:-"OFF"}
28+
CPU=${CPU:-"x86_64"} # or aarch64
29+
FFMPEG=${FFMPEG:-0}
2830

2931
if [ "${QT6}" = "ON" ]; then
3032
QTV=6
@@ -97,17 +99,40 @@ fi
9799
CWD=`pwd`
98100
MKJOBS=${MKJOBS:-4}
99101

102+
FFMPEG_URL=https://github.com/friction2d/ffmpeg
103+
FFMPEG_COMMIT=44b01dbdbe3a742b5d006a7187b63a8a30293a45
104+
FFMPEG_INSTALL=${CWD}/build-ci/ffmpeg-install
105+
100106
cd ${CWD}
101107
rm -rf build-ci || true
102108
mkdir build-ci
103109
cd build-ci
104110

111+
if [ "${FFMPEG}" = 1 ]; then
112+
git clone ${FFMPEG_URL} ffmpeg-src
113+
cd ffmpeg-src
114+
./configure \
115+
--enable-shared \
116+
--disable-static \
117+
--prefix=${FFMPEG_INSTALL} \
118+
--enable-gpl \
119+
--enable-version3 \
120+
--disable-programs \
121+
--disable-debug
122+
make -j${MKJOBS}
123+
make install
124+
export PKG_CONFIG_PATH=${FFMPEG_INSTALL}/lib/pkgconfig:${PKG_CONFIG_PATH}
125+
export LD_LIBRARY_PATH=${FFMPEG_INSTALL}/lib:${LD_LIBRARY_PATH}
126+
fi
127+
128+
cd ${CWD}/build-ci
129+
105130
cmake -G Ninja \
106131
-DCMAKE_BUILD_TYPE=Release \
107132
-DCMAKE_INSTALL_PREFIX=/usr \
108133
-DCMAKE_CXX_COMPILER=clang++ \
109134
-DCMAKE_C_COMPILER=clang \
110-
-DQSCINTILLA_INCLUDE_DIRS=/usr/include/x86_64-linux-gnu/qt${QTV} \
135+
-DQSCINTILLA_INCLUDE_DIRS=/usr/include/${CPU}-linux-gnu/qt${QTV} \
111136
-DQSCINTILLA_LIBRARIES=qscintilla2_qt${QTV} \
112137
-DUSE_QT6=${QT6} \
113138
..

0 commit comments

Comments
 (0)