Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐛 Fixed Linux CI build missing libraries #3234

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/build-game.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on: [ push, pull_request ]
jobs:
build-gcc:
name: Linux build on Ubuntu
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
with:
Expand All @@ -15,7 +15,7 @@ jobs:
- name: Cache conan
uses: actions/cache@v4
with:
key: conan-ubuntu-${{ hashFiles('conanfile.py') }}
key: conan-ubuntu-20-${{ hashFiles('conanfile.py') }}
path: ~/.conan2/

- name: Install dependencies
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,4 @@ tools/l10n/languages/
tools/l10n/ror\.pot
CMakeUserPresets.json
tools/l10n/TMP.pot
redist/
10 changes: 4 additions & 6 deletions tools/CI/copy_libs.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,7 @@ set(rgx "[A-Za-z0-9.+_-]+.so[0-9.]*")
set(out_dir "${CMAKE_SOURCE_DIR}/redist/lib/")
file(MAKE_DIRECTORY ${out_dir})

set(excludelist_url "https://cdn.statically.io/gh/AppImage/pkg2appimage/master/excludelist")
execute_process(COMMAND bash -c "curl -s -L ${excludelist_url} | sed 's|#.*||g'" OUTPUT_VARIABLE excludelist)
string(REPLACE "\n" ";" excludelist ${excludelist})
execute_process(COMMAND python3 "${CMAKE_CURRENT_LIST_DIR}/get_excludelist.py" OUTPUT_VARIABLE excludelist)

function(copy_libs_for_target target)
execute_process(COMMAND ldd ${target} OUTPUT_VARIABLE linked_libs)
Expand All @@ -25,6 +23,6 @@ function(copy_libs_for_target target)
endforeach()
endfunction()

copy_libs_for_target("${CMAKE_SOURCE_DIR}/bin/RoR")
copy_libs_for_target("${CMAKE_SOURCE_DIR}/bin/Codec_FreeImage.so")
copy_libs_for_target("${CMAKE_SOURCE_DIR}/bin/Plugin_CgProgramManager.so")
copy_libs_for_target("${CMAKE_SOURCE_DIR}/redist/RoR")
copy_libs_for_target("${CMAKE_SOURCE_DIR}/redist/lib/Codec_FreeImage.so")
copy_libs_for_target("${CMAKE_SOURCE_DIR}/redist/lib/Plugin_CgProgramManager.so")
14 changes: 14 additions & 0 deletions tools/CI/get_excludelist.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
from urllib.request import urlopen
import sys

url = "https://cdn.statically.io/gh/AppImage/pkg2appimage/master/excludelist"
output = urlopen(url).read().decode("utf-8")
libs = []

for lib in output.splitlines():
if not lib.startswith("#"):
pl = lib.split("#")[0]
if pl != "":
libs.append(pl.strip())

sys.stdout.write(';'.join(libs))
Loading