Skip to content

Commit

Permalink
ci: test fixes for static build on linux
Browse files Browse the repository at this point in the history
  • Loading branch information
adriweb committed Aug 9, 2024
1 parent 654259d commit d5ac591
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 256 deletions.
10 changes: 3 additions & 7 deletions .github/workflows/build.linux.workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Build Linux

on:
push:
branches: [ master, feature/github-actions ]
branches: [ master, feature/github-actions, ci_linux_static ]
pull_request:
branches: [ master, feature/github-actions ]
release:
Expand All @@ -18,16 +18,12 @@ jobs:
os: [ubuntu-20.04]
arch: [x64]
config: [Release]
statictype: [ON, OFF]
statictype: [ON]
include:
- statictype: ON
qtver: Qt6
host_triplet: release
release_suffix: static
- statictype: OFF
qtver: Qt6-Dynamic
host_triplet: dynamic
release_suffix: shared

steps:
- name: Checkout Git Repo
Expand All @@ -42,7 +38,7 @@ jobs:
- name: Install dependencies
run: |
set -e
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
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 libbsd-dev
- name: Install latest CMake
uses: lukka/get-cmake@a70f1cfa1857a3eecfe0d34962269e1b1e8be56c # latest as of 2024-08-08
Expand Down
127 changes: 0 additions & 127 deletions .github/workflows/build.mac.workflow.yml

This file was deleted.

86 changes: 0 additions & 86 deletions .github/workflows/build.windows.workflow.yml

This file was deleted.

36 changes: 0 additions & 36 deletions .github/workflows/coverity.workflow.yml

This file was deleted.

16 changes: 16 additions & 0 deletions gui/qt/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
cmake_minimum_required(VERSION 3.21.1)

set(X_VCPKG_FORCE_VCPKG_X_LIBRARIES ON)

option(USE_QT5 "Build with Qt5 instead of Qt6" OFF)

if(USE_QT5)
Expand Down Expand Up @@ -275,6 +277,12 @@ else()
message(WARNING "No LibPNG found! APNG capture will not be available")
endif()

#if(LINUX AND TRY_STATIC_LIBS)
# target_link_libraries(CEmu PRIVATE
# -lxcb -lxcb-image
# )
#endif()

target_link_libraries(CEmu PRIVATE
Qt::Core
Qt::Gui
Expand All @@ -283,6 +291,14 @@ target_link_libraries(CEmu PRIVATE
Qt::Widgets
)

if(LINUX AND TRY_STATIC_LIBS)
target_link_libraries(CEmu PRIVATE
/usr/lib/x86_64-linux-gnu/libXau.a
/usr/lib/x86_64-linux-gnu/libXdmcp.a
/usr/lib/x86_64-linux-gnu/libbsd.a
)
endif()

include(CheckIPOSupported)
check_ipo_supported(RESULT lto_supported OUTPUT error)
if(lto_supported)
Expand Down
4 changes: 4 additions & 0 deletions gui/qt/vcpkg.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@
"default-features": false,
"features": [ "xcb" ],
"platform": "linux"
},
{
"name": "xcb-image",
"platform": "linux"
}
]
}
Expand Down

0 comments on commit d5ac591

Please sign in to comment.