Skip to content

try to fix coverity #492

try to fix coverity

try to fix coverity #492

name: Build Linux
on:
push:
branches: [ master, test-ci ]
pull_request:
branches: [ master ]
jobs:
build:
name: "Build: ${{ matrix.os }} - ${{ matrix.archvariant }}"
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-22.04]
arch: [x64]
config: [Release]
statictype: [ON, OFF]
include:
- statictype: ON
archvariant: "x64"
host_triplet: release
release_suffix: static
- statictype: OFF
archvariant: "x64-Dynamic"
host_triplet: dynamic-apng-release
release_suffix: shared
steps:
- name: Checkout Git Repo
uses: actions/checkout@v5
with:
submodules: 'recursive'
- name: workaround for default apt mirror connectivity issues
run: |
sudo sed -i 's/azure\.//' /etc/apt/sources.list
- name: Remove windows-only qt version override in vcpkg.json
run: |
sed -i '/For Windows only/d' ${{ github.workspace }}/gui/qt/vcpkg.json
- name: Install dependencies
run: |
set -e
sudo apt update
sudo apt install -y autoconf automake autoconf-archive '^libxcb.*-dev' libx11-xcb-dev libglu1-mesa-dev libxrender-dev libxi-dev libxkbcommon-dev libxkbcommon-x11-dev libegl1-mesa-dev libudev-dev libusb-1.0-0-dev
- name: Install latest CMake
uses: lukka/get-cmake@628dd514bed37cb0a609e84a6186cbbaa2fc0140 # latest as of 2025-10-04
- name: Restore artifacts, or setup vcpkg (do not install any package)
uses: lukka/run-vcpkg@b3dd708d38df5c856fe1c18dc0d59ab771f93921 # latest as of 2025-10-04
with:
vcpkgJsonGlob: '**/gui/qt/vcpkg.json'
- name: Build CEmu ${{ matrix.archvariant }} ${{ matrix.config }} on Linux ${{ matrix.arch }}
uses: lukka/run-cmake@67c73a83a46f86c4e0b96b741ac37ff495478c38 # latest as of 2025-10-04
with:
cmakeListsTxtPath: '${{ github.workspace }}/gui/qt/CMakeLists.txt'
configurePreset: 'Linux-${{ matrix.archvariant }}'
configurePresetAdditionalArgs: "['-DDEPS_RELEASE_ONLY=ON', '-DSHORT_VERSION=v3.0']"
buildPreset: 'Linux-${{ matrix.archvariant }}-${{ matrix.config }}'
env:
VCPKG_DEFAULT_HOST_TRIPLET: ${{ matrix.arch }}-linux-${{ matrix.host_triplet }}
VCPKG_FORCE_SYSTEM_BINARIES: 1
- name: Upload binary as artifact
uses: actions/upload-artifact@v4
with:
name: CEmu_linux_${{ matrix.archvariant }}_master
path: ${{ github.workspace }}/gui/qt/CEmu.build/Linux-${{ matrix.archvariant }}/${{ matrix.config }}/CEmu
- name: Prepare binary for release upload
run: |
mv ${{ github.workspace }}/gui/qt/CEmu.build/Linux-${{ matrix.archvariant }}/${{ matrix.config }}/CEmu ${{ github.workspace }}/CEmu-nightly_linux64_${{ matrix.release_suffix }}
- name: Update nightly release
if: ${{ github.ref == 'refs/heads/master' && github.event_name != 'pull_request' }}
uses: softprops/action-gh-release@62c96d0c4e8a889135c1f3a25910db8dbe0e85f7 # latest as of 2025-10-04
with:
tag_name: nightly
prerelease: true
token: ${{secrets.GITHUB_TOKEN}}
files: |
${{ github.workspace }}/CEmu-nightly_linux64_${{ matrix.release_suffix }}