1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391
|
permissions:
contents: read
attestations: write
id-token: write
name: CI Build for Linux Ubuntu
on:
workflow_dispatch:
pull_request:
workflow_call:
inputs:
build-type:
description: 'Build type (Debug/Release)'
required: false
type: string
default: 'Release'
release-ver:
description: 'Release Version (v2.5.0)'
required: false
type: string
default: 'v2.5.0'
# The package arrays below are mainly for building the libs, one could add fedora_build_package to include the
# packages fedora requires, for instance.
env:
BUILD_TYPE: Release
build_package: build-essential git cmake libusb-1.0-0-dev libxkbcommon-dev libudev-dev yasm libva-dev libpulse-dev
opengl_package1: libegl1-mesa-dev libgles2-mesa-dev libgbm-dev libgl1-mesa-dev libxkbcommon-x11-dev
opengl_package2: libxcb-keysyms1-dev libxcb-image0-dev libxcb-icccm4-dev libxcb-render-util0-dev
opengl_package3: libxcb-xfixes0-dev libxcb-sync-dev libxcb-randr0-dev libxrender-dev libxcb*
ffmpeg_build: libgnutls28-dev libsdl2-dev libva-dev
# If we want to check on other variants of linux, just add it to the maxtix/include section
# with the OS required libs for that platform. Some additional changes (like apt to dnf) will
# need to occur elsewhere in this workflow. ie via the steps.which-os.outputs.thisos == 'some other linux OS'
# Be aware, the global env package vars do not get expanded in the matrix.
jobs:
ci_ubuntu_linux:
name: ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- {os: ubuntu-22.04, arch: X64, packages: build-essential autoconf curl git cmake libtool libxkbcommon-dev libudev-dev yasm libva-dev libpulse-dev libegl1-mesa-dev libgles2-mesa-dev libgbm-dev libgl1-mesa-dev libxkbcommon-x11-dev}
- {os: ubuntu-22.04-arm, arch: ARM64, packages: build-essential autoconf curl git cmake libtool libxkbcommon-dev libudev-dev yasm libva-dev libpulse-dev libegl1-mesa-dev libgles2-mesa-dev libgbm-dev libgl1-mesa-dev libxkbcommon-x11-dev}
steps:
- uses: actions/checkout@v5
- name: Create our own var with the ImageOS value for cache use
id: which-os
run: |
export ImageOS=$(grep -E '^ID=' /etc/os-release | cut -d'=' -f2 | tr -d '"')$(grep -E '^VERSION_ID=' /etc/os-release | cut -d'=' -f2 | tr -d '"')
echo "thisos=$ImageOS" >> $GITHUB_OUTPUT
shell: bash
# Move all of our cache checks here, so we know if we need to free bunches of disk space
- name: Cache Check libusb 1.0.29
id: cache-usb
uses: actions/cache/restore@v4
with:
path: /home/runner/work/JS8Call-improved/JS8Call-improved/local/libusb
key: ${{ runner.os }}-${{ steps.which-os.outputs.thisos }}-${{ runner.arch }}-libusb1029
- name: Cache Check ffmpeg 7.1.3
id: cache-ffmpeg
uses: actions/cache/restore@v4
with:
path: /home/runner/work/JS8Call-improved/JS8Call-improved/local/ffmpeg
key: ${{ runner.os }}-${{ steps.which-os.outputs.thisos }}-${{ runner.arch }}-ffmpeg713
- name: Cache Check Hamlib 4.6.5
id: cache-hamlib
uses: actions/cache/restore@v4
with:
path: /home/runner/work/JS8Call-improved/JS8Call-improved/local/hamlib
key: ${{ runner.os }}-${{ steps.which-os.outputs.thisos }}-${{ runner.arch }}-hamlib465
- name: Cache Check fftw 3.3.10
id: cache-fftw
uses: actions/cache/restore@v4
with:
path: /home/runner/work/JS8Call-improved/JS8Call-improved/local/fftw
key: ${{ runner.os }}-${{ steps.which-os.outputs.thisos }}-${{ runner.arch }}-fftw3310
- name: Cache Check Boost 1.88
id: cache-boost
uses: actions/cache/restore@v4
with:
path: /home/runner/work/JS8Call-improved/JS8Call-improved/local/boost
key: ${{ runner.os }}-${{ steps.which-os.outputs.thisos }}-${{ runner.arch }}-boost188
- name: Cache Check QT 6.9.3
id: cache-qt
uses: actions/cache/restore@v4
with:
path: /home/runner/work/JS8Call-improved/JS8Call-improved/local/qt693-install
key: ${{ runner.os }}-${{ steps.which-os.outputs.thisos }}-${{ runner.arch }}-wayland-qt693
# End cache checks
# We have to empty the runners to build QT as they are only 50G and upto 78% full
# This does NOT work with container builds
- name: Free Disk Space (Ubuntu)
if: steps.cache-qt.outputs.cache-hit != 'true' && steps.which-os.outputs.thisos == 'ubuntu22.04'
uses: jlumbroso/free-disk-space@main
with:
tool-cache: false
android: true
dotnet: true
haskell: true
large-packages: true
docker-images: true
swap-storage: true
- name: Install minimum required dependencies (Ubuntu)
if: ${{ steps.which-os.outputs.thisos == 'ubuntu22.04' }}
run: |
sudo apt-get update
sudo apt-get install -y ${{ matrix.packages }}
- name: Install dependencies needed to build libs (Ubuntu)
if: |
(steps.cache-usb.outputs.cache-hit != 'true' ||
steps.cache-ffmpeg.outputs.cache-hit != 'true' ||
steps.cache-hamlib.outputs.cache-hit != 'true' ||
steps.cache-fftw.outputs.cache-hit != 'true' ||
steps.cache-boost.outputs.cache-hit != 'true' ||
steps.cache-qt.outputs.cache-hit != 'true') &&
steps.which-os.outputs.thisos == 'ubuntu22.04'
run: |
sudo apt-get install -y ${{ env.ffmpeg_build }} ${{ env.opengl_package2 }} ${{ env.opengl_package3 }}
sudo apt-get clean
- name: AppImage tools (x86_64)
if: (runner.arch == 'X64')
run: |
curl --location --output /tmp/linuxdeployqt-continuous-x86_64.AppImage https://github.com/probonopd/linuxdeployqt/releases/download/continuous/linuxdeployqt-continuous-x86_64.AppImage
chmod a+x /tmp/linuxdeployqt-continuous-x86_64.AppImage
sudo apt-get install -y ${{ env.ffmpeg_build }} ${{ env.opengl_package1 }} ${{ env.opengl_package2 }} ${{ env.opengl_package3 }}
- name: AppImage tools (arm64)
if: (runner.arch == 'ARM64')
run: |
curl --location --output /tmp/linuxdeployqt-continuous-aarch64.AppImage https://github.com/probonopd/linuxdeployqt/releases/download/continuous/linuxdeployqt-continuous-aarch64.AppImage
chmod a+x /tmp/linuxdeployqt-continuous-aarch64.AppImage
sudo apt-get install -y ${{ env.ffmpeg_build }} ${{ env.opengl_package1 }} ${{ env.opengl_package2 }} ${{ env.opengl_package3 }}
## libusb
- name: Install libusb 1.0.29
if: steps.cache-usb.outputs.cache-hit != 'true'
id: install-usb
run: |
curl --location --output /tmp/v1.0.29.tar.gz https://github.com/libusb/libusb/archive/refs/tags/v1.0.29.tar.gz
cd /tmp
tar zxf v1.0.29.tar.gz
cd libusb-1.0.29
./bootstrap.sh
./configure --prefix=${GITHUB_WORKSPACE}/local/libusb
make
make install
- name: Save libusb cache
if: steps.cache-usb.outputs.cache-hit != 'true'
uses: actions/cache/save@v4
with:
key: ${{ runner.os }}-${{ steps.which-os.outputs.thisos }}-${{ runner.arch }}-libusb1029
path: /home/runner/work/JS8Call-improved/JS8Call-improved/local/libusb
## ffmpeg
- name: Install ffmpeg 7.1.3
if: steps.cache-ffmpeg.outputs.cache-hit != 'true'
id: install-ffmpeg
run: |
git clone --depth=1 --branch n7.1.3 https://git.ffmpeg.org/ffmpeg.git /tmp/ffmpeg
mkdir -p /tmp/ffmpeg/build
cd /tmp/ffmpeg/build
../configure --prefix=${GITHUB_WORKSPACE}/local/ffmpeg --enable-shared --disable-doc --enable-network
make -j install
- name: Save ffmpeg cache
if: steps.cache-ffmpeg.outputs.cache-hit != 'true'
uses: actions/cache/save@v4
with:
key: ${{ runner.os }}-${{ steps.which-os.outputs.thisos }}-${{ runner.arch }}-ffmpeg713
path: /home/runner/work/JS8Call-improved/JS8Call-improved/local/ffmpeg
## hamlib
- name: Install Hamlib 4.6.5
if: steps.cache-hamlib.outputs.cache-hit != 'true'
id: install-hamlib
run: |
git clone --depth=1 --branch=4.6.5 https://github.com/Hamlib/Hamlib.git /tmp/hamlib
cd /tmp/hamlib
./bootstrap
./configure --prefix=${GITHUB_WORKSPACE}/local/hamlib
make -j 4
make install-strip
sudo ldconfig
- name: Save Hamlib cache
if: steps.cache-hamlib.outputs.cache-hit != 'true'
uses: actions/cache/save@v4
with:
key: ${{ runner.os }}-${{ steps.which-os.outputs.thisos }}-${{ runner.arch }}-hamlib465
path: /home/runner/work/JS8Call-improved/JS8Call-improved/local/hamlib
## fftw
- name: Install fftw 3.3.10
if: (steps.cache-fftw.outputs.cache-hit != 'true' && runner.arch == 'X64')
id: install-fftw
run: |
cd /tmp
curl --location --output /tmp/fftw-3.3.10.tar.gz https://www.fftw.org/fftw-3.3.10.tar.gz
tar zxf fftw-3.3.10.tar.gz
cd fftw-3.3.10
./configure --prefix=${GITHUB_WORKSPACE}/local/fftw --enable-threads --enable-shared --enable-sse2 --enable-avx --enable-avx2 --enable-float
make
make install
- name: Install fftw 3.3.10 (arm64)
if: (steps.cache-fftw.outputs.cache-hit != 'true' && runner.arch == 'ARM64')
id: install-fftw-arm64
run: |
cd /tmp
curl --location --output /tmp/fftw-3.3.10.tar.gz https://www.fftw.org/fftw-3.3.10.tar.gz
tar zxf fftw-3.3.10.tar.gz
cd fftw-3.3.10
./configure --prefix=${GITHUB_WORKSPACE}/local/fftw --enable-threads --enable-shared --enable-neon --enable-float
make
make install
- name: Save fftw 3.3.10 cache
if: steps.cache-fftw.outputs.cache-hit != 'true'
uses: actions/cache/save@v4
with:
key: ${{ runner.os }}-${{ steps.which-os.outputs.thisos }}-${{ runner.arch }}-fftw3310
path: /home/runner/work/JS8Call-improved/JS8Call-improved/local/fftw
## boost
- name: Install Boost 1.88
if: steps.cache-boost.outputs.cache-hit != 'true'
id: install-boost
run: |
cd /tmp
curl --location --output /tmp/boost-1.88.0.tar.gz https://archives.boost.io/release/1.88.0/source/boost_1_88_0.tar.gz
tar zxf boost-1.88.0.tar.gz
cd boost_1_88_0
./bootstrap.sh --prefix=${GITHUB_WORKSPACE}/local/boost
./b2 install
- name: Save Boost 1.88 cache
if: steps.cache-boost.outputs.cache-hit != 'true'
uses: actions/cache/save@v4
with:
key: ${{ runner.os }}-${{ steps.which-os.outputs.thisos }}-${{ runner.arch }}-boost188
path: /home/runner/work/JS8Call-improved/JS8Call-improved/local/boost
# QT6.9.3
# Takes about 1 hour if not cached
- name: Install QT 6.9.3
if: steps.cache-qt.outputs.cache-hit != 'true'
id: install-qt693
run: |
git clone --depth=1 --branch=6.9.3 https://github.com/qt/qt5.git /tmp/qt6
mkdir -p /tmp/qt6/build
cd /tmp/qt6/build
/tmp/qt6/configure -DCMAKE_PREFIX_PATH="${GITHUB_WORKSPACE}/local/ffmpeg" --prefix=${GITHUB_WORKSPACE}/local/qt693-install -init-submodules -submodules qtmultimedia,qtserialport,qtwayland -ffmpeg-dir /home/runner/work/JS8Call-improved/JS8Call-improved/local/ffmpeg
cmake --build . --parallel
cmake --install .
- name: Save QT 6.9.3 cache
if: steps.cache-qt.outputs.cache-hit != 'true'
uses: actions/cache/save@v4
with:
key: ${{ runner.os }}-${{ steps.which-os.outputs.thisos }}-${{ runner.arch }}-wayland-qt693
path: /home/runner/work/JS8Call-improved/JS8Call-improved/local/qt693-install
- name: QT 6.9.3 Summary
if: steps.cache-qt.outputs.cache-hit != 'true'
run: cat /tmp/qt6/build/config.summary
- name: Build JS8Call
run: |
mkdir -p build && cd build
cmake -DCMAKE_PREFIX_PATH="${GITHUB_WORKSPACE}/local/qt693-install;${GITHUB_WORKSPACE}/local/hamlib;${GITHUB_WORKSPACE}/local/fftw;${GITHUB_WORKSPACE}/local/boost;${GITHUB_WORKSPACE}/local/libusb" ..
make -j 4
# AppImage
- name: AppImage Directory Setup and File Copy
run: |
mkdir -p ${GITHUB_WORKSPACE}/AppImage/AppDir/usr/share/icons/hicolor/128x128/apps/
mkdir -p ${GITHUB_WORKSPACE}/AppImage/AppDir/usr/share/applications/
mkdir -p ${GITHUB_WORKSPACE}/AppImage/AppDir/usr/plugins/platforms/
mkdir -p ${GITHUB_WORKSPACE}/AppImage/AppDir/usr/bin/
mkdir -p ${GITHUB_WORKSPACE}/AppImage/AppDir/usr/lib/
cp build/JS8Call ${GITHUB_WORKSPACE}/AppImage/AppDir/usr/bin/
cp icons/Unix/js8call_icon.png ${GITHUB_WORKSPACE}/AppImage/AppDir/usr/share/icons/hicolor/128x128/apps/
cp ${GITHUB_WORKSPACE}/local/qt693-install/plugins/platforms/*.so ${GITHUB_WORKSPACE}/AppImage/AppDir/usr/plugins/platforms/
cp -R ${GITHUB_WORKSPACE}/local/qt693-install/plugins/wayland-decoration-client ${GITHUB_WORKSPACE}/AppImage/AppDir/usr/plugins/
cp -R ${GITHUB_WORKSPACE}/local/qt693-install/plugins/wayland-graphics-integration-client ${GITHUB_WORKSPACE}/AppImage/AppDir/usr/plugins/
cp -R ${GITHUB_WORKSPACE}/local/qt693-install/plugins/wayland-shell-integration ${GITHUB_WORKSPACE}/AppImage/AppDir/usr/plugins/
cp -R ${GITHUB_WORKSPACE}/local/qt693-install/plugins/xcbglintegrations ${GITHUB_WORKSPACE}/AppImage/AppDir/usr/plugins/
cp -R ${GITHUB_WORKSPACE}/local/ffmpeg/lib/libavcodec.so.61.19.101 ${GITHUB_WORKSPACE}/AppImage/AppDir/usr/lib/libavcodec.so.61
cp -R ${GITHUB_WORKSPACE}/local/ffmpeg/lib/libavdevice.so.61.3.100 ${GITHUB_WORKSPACE}/AppImage/AppDir/usr/lib/libavdevice.so.61
cp -R ${GITHUB_WORKSPACE}/local/ffmpeg/lib/libavfilter.so.10.4.100 ${GITHUB_WORKSPACE}/AppImage/AppDir/usr/lib/libavfilter.so.10
cp -R ${GITHUB_WORKSPACE}/local/ffmpeg/lib/libavformat.so.61.7.100 ${GITHUB_WORKSPACE}/AppImage/AppDir/usr/lib/libavformat.so.61
cp -R ${GITHUB_WORKSPACE}/local/ffmpeg/lib/libavutil.so.59.39.100 ${GITHUB_WORKSPACE}/AppImage/AppDir/usr/lib/libavutil.so.59
cp -R ${GITHUB_WORKSPACE}/local/ffmpeg/lib/libswresample.so.5.3.100 ${GITHUB_WORKSPACE}/AppImage/AppDir/usr/lib/libswresample.so.5
cp -R ${GITHUB_WORKSPACE}/local/ffmpeg/lib/libswscale.so.8.3.100 ${GITHUB_WORKSPACE}/AppImage/AppDir/usr/lib/libswscale.so.8
- name: AppImage Copy Files
run: |
cp JS8Call.desktop ${GITHUB_WORKSPACE}/AppImage/AppDir/usr/share/applications/JS8Call.desktop
- name: AppImage deploy (x86_64 Release Build)
if: (runner.arch == 'X64' && inputs.release-ver)
run: |
export VERSION=${{ inputs.release-ver }}
cd ${GITHUB_WORKSPACE}/AppImage/
/tmp/linuxdeployqt-continuous-x86_64.AppImage AppDir/usr/share/applications/JS8Call.desktop \
-executable=AppDir/usr/bin/JS8Call \
-qmake=/home/runner/work/JS8Call-improved/JS8Call-improved/local/qt693-install/bin/qmake \
-appimage -verbose=1 -no-translations
chmod a+x *.AppImage
continue-on-error: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: AppImage deploy (x86_64 CI Build)
if: (runner.arch == 'X64' && !inputs.release-ver )
run: |
export VERSION=devel
cd ${GITHUB_WORKSPACE}/AppImage/
/tmp/linuxdeployqt-continuous-x86_64.AppImage AppDir/usr/share/applications/JS8Call.desktop \
-executable=AppDir/usr/bin/JS8Call \
-qmake=/home/runner/work/JS8Call-improved/JS8Call-improved/local/qt693-install/bin/qmake \
-appimage -verbose=2 -no-translations
chmod a+x *.AppImage
continue-on-error: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: AppImage deploy (arm64 Release Build)
if: (runner.arch == 'ARM64' && inputs.release-ver )
run: |
export VERSION=${{ inputs.release-ver }}
cd ${GITHUB_WORKSPACE}/AppImage/
/tmp/linuxdeployqt-continuous-aarch64.AppImage AppDir/usr/share/applications/JS8Call.desktop \
-executable=AppDir/usr/bin/JS8Call \
-qmake=/home/runner/work/JS8Call-improved/JS8Call-improved/local/qt693-install/bin/qmake \
-appimage -verbose=1 -no-translations
chmod a+x *.AppImage
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: AppImage deploy (arm64 CI Build)
if: (runner.arch == 'ARM64' && !inputs.release-ver )
run: |
export VERSION=devel
cd ${GITHUB_WORKSPACE}/AppImage/
/tmp/linuxdeployqt-continuous-aarch64.AppImage AppDir/usr/share/applications/JS8Call.desktop \
-executable=AppDir/usr/bin/JS8Call \
-qmake=/home/runner/work/JS8Call-improved/JS8Call-improved/local/qt693-install/bin/qmake \
-appimage -verbose=2 -no-translations
chmod a+x *.AppImage
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Attestation (Release Only)
if: ${{ inputs.release-ver }}
uses: actions/attest-build-provenance@v3
with:
subject-path: '${{ github.workspace }}/AppImage/*.AppImage*'
- name: Upload Artifact (Release build)
if: ${{ inputs.release-ver }}
uses: actions/upload-artifact@v5
with:
name: js8call-improved-${{ matrix.os }}
path: ./AppImage/*.AppImage*
- name: Upload Artifact (CI Build)
if: ${{ !inputs.release-ver }}
uses: actions/upload-artifact@v5
with:
name: js8call-improved-${{ matrix.os }}
path: ./AppImage/
|