build: Fixed various issues with the CI and Linux packages (#548)

* Ci: added workflow_dispatch trigger

* Ci: removed fetch depth

* Ci: Add information to generated artifacts

* Ci: Updated Linux runner to Ubuntu 22.04

* Packaging: Updated .deb dependencies

* Ci: Removed ELF artifact

* Ci: Upgraded actions versions

* Ci: Switch to gcc-11 for unit tests and analysis
This commit is contained in:
iTrooz_ 2022-06-23 23:48:02 +02:00 committed by GitHub
parent a5aa002752
commit c6989c2ef7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 56 additions and 69 deletions

View File

@ -15,18 +15,17 @@ jobs:
steps:
- name: 🧰 Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0
submodules: recursive
- name: ✋ Initialize CodeQL
uses: github/codeql-action/init@v1
uses: github/codeql-action/init@v2
with:
languages: 'cpp'
- name: 📜 Restore cache
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: |
~/.ccache
@ -42,7 +41,7 @@ jobs:
run: |
mkdir -p build
cd build
CC=gcc-10 CXX=g++-10 cmake \
CC=gcc-11 CXX=g++-11 cmake \
-DCMAKE_BUILD_TYPE=$BUILD_TYPE \
-DCMAKE_INSTALL_PREFIX="$PWD/install" \
-DCMAKE_C_COMPILER_LAUNCHER=ccache \
@ -53,4 +52,4 @@ jobs:
make -j 4 install
- name: 🗯️ Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
uses: github/codeql-action/analyze@v2

View File

@ -4,6 +4,7 @@ on:
push:
branches: ["*"]
pull_request:
workflow_dispatch:
env:
BUILD_TYPE: Release
@ -23,9 +24,8 @@ jobs:
CCACHE_COMPRESS: "true"
steps:
- name: 🧰 Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0
submodules: recursive
- name: 🟦 Install msys2
@ -61,7 +61,7 @@ jobs:
echo "::set-output name=dir::$CCACHE_DIR"
- name: 📜 Restore Cache
uses: actions/cache@v1
uses: actions/cache@v3
id: cache-ccache
with:
path: ${{ steps.prep-ccache.outputs.dir }}
@ -91,14 +91,14 @@ jobs:
cpack
- name: ⬆️ Upload Portable ZIP
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: Windows Portable ZIP
path: |
build/install/*
- name: ⬆️ Upload Windows Installer
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: Windows Installer
path: |
@ -111,9 +111,8 @@ jobs:
steps:
- name: 🧰 Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0
submodules: recursive
- name: ⬇️ Install dependencies
@ -121,7 +120,7 @@ jobs:
brew bundle --no-lock --file dist/Brewfile
- name: 📜 Restore cache
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: |
~/.ccache
@ -146,25 +145,24 @@ jobs:
make -j4 package
- name: ⬆️ Upload DMG
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: macOS DMG
path: build/*.dmg
# Linux build
linux:
runs-on: ubuntu-20.04
name: 🐧 Ubuntu 20.04
runs-on: ubuntu-22.04
name: 🐧 Ubuntu 22.04
steps:
- name: 🧰 Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0
submodules: recursive
- name: 📜 Restore cache
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: |
~/.ccache
@ -218,13 +216,6 @@ jobs:
# flatpak-builder --jobs=4 --repo=imhex _flatpak dist/net.werwolv.ImHex.yaml --ccache --keep-build-dirs
# flatpak build-bundle imhex imhex.flatpak net.werwolv.ImHex stable
- name: ⬆️ Upload ELF
uses: actions/upload-artifact@v2
with:
name: Linux ELF
path: |
build/AppDir/*
- name: 📦 Bundle DEB
run: |
cp -r build/DEBIAN build/AppDir
@ -240,21 +231,21 @@ jobs:
cd ..
#- name: ⬆️ Upload Flatpak
# uses: actions/upload-artifact@v2
# uses: actions/upload-artifact@v3
# with:
# name: Linux Flatpak
# path: |
# imhex.flatpak
- name: ⬆️ Upload DEB
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: Linux DEB
name: Linux DEB (Ubuntu 22.04)
path: |
imhex.deb
- name: ⬆️ Upload AppImage
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: Linux AppImage
path: |

View File

@ -17,13 +17,12 @@ jobs:
steps:
- name: 🧰 Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0
submodules: recursive
- name: 📜 Restore cache
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: |
~/.ccache
@ -39,7 +38,7 @@ jobs:
run: |
mkdir -p build
cd build
CC=gcc-10 CXX=g++-10 cmake \
CC=gcc-11 CXX=g++-11 cmake \
-DCMAKE_BUILD_TYPE=$BUILD_TYPE \
-DCMAKE_INSTALL_PREFIX="$PWD/install" \
-DCMAKE_C_COMPILER_LAUNCHER=ccache \

View File

@ -1,21 +1,7 @@
# appimage-builder recipe see https://appimage-builder.readthedocs.io for details
version: 1
script:
- rm -rf AppDir | true
- CC=gcc-11 CXX=g++11 cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr
- make -j3 install DESTDIR=AppDir
- mv AppDir/usr/share/imhex/plugins AppDir/usr/bin/plugins
- mv AppDir/usr/constants AppDir/usr/bin/constants
- mv AppDir/usr/encodings AppDir/usr/bin/encodings
- mv AppDir/usr/includes AppDir/usr/bin/includes
- mv AppDir/usr/magic AppDir/usr/bin/magic
- mv AppDir/usr/patterns AppDir/usr/bin/patterns
- mkdir -p AppDir/usr/share/icons/hicolor/512x512
- cp AppDir/usr/share/pixmaps/imhex.png AppDir/usr/share/icons/hicolor/512x512/imhex.png
AppDir:
path: ./AppDir
path: .AppDir
app_info:
id: imhex
name: ImHex
@ -28,18 +14,19 @@ AppDir:
- amd64
allow_unauthenticated: true
sources:
- sourceline: deb http://us.archive.ubuntu.com/ubuntu/ impish main restricted
- sourceline: deb http://us.archive.ubuntu.com/ubuntu/ impish-updates main restricted
- sourceline: deb http://us.archive.ubuntu.com/ubuntu/ impish universe
- sourceline: deb http://us.archive.ubuntu.com/ubuntu/ impish-updates universe
- sourceline: deb http://us.archive.ubuntu.com/ubuntu/ impish multiverse
- sourceline: deb http://us.archive.ubuntu.com/ubuntu/ impish-updates multiverse
- sourceline: deb http://us.archive.ubuntu.com/ubuntu/ impish-backports main restricted
- sourceline: deb http://us.archive.ubuntu.com/ubuntu/ jammy main restricted
- sourceline: deb http://us.archive.ubuntu.com/ubuntu/ jammy-updates main restricted
- sourceline: deb http://us.archive.ubuntu.com/ubuntu/ jammy universe
- sourceline: deb http://us.archive.ubuntu.com/ubuntu/ jammy-updates universe
- sourceline: deb http://us.archive.ubuntu.com/ubuntu/ jammy multiverse
- sourceline: deb http://us.archive.ubuntu.com/ubuntu/ jammy-updates multiverse
- sourceline: deb http://.archive.ubuntu.com/ubuntu/ jammy-backports main restricted
universe multiverse
- sourceline: deb http://security.ubuntu.com/ubuntu impish-security main restricted
- sourceline: deb http://security.ubuntu.com/ubuntu impish-security universe
- sourceline: deb http://security.ubuntu.com/ubuntu impish-security multiverse
- sourceline: deb http://security.ubuntu.com/ubuntu jammy-security main restricted
- sourceline: deb http://security.ubuntu.com/ubuntu jammy-security universe
- sourceline: deb http://security.ubuntu.com/ubuntu jammy-security multiverse
include:
- adwaita-icon-theme-full # wtf ?
- libbz2-1.0:amd64
- libcap2:amd64
- libdbus-1-3:amd64
@ -53,7 +40,7 @@ AppDir:
include:
- /lib/x86_64-linux-gnu/libGLX.so.0
- /lib/x86_64-linux-gnu/libGLdispatch.so.0
- /lib/x86_64-linux-gnu/libLLVM-12.so.1
- /lib/x86_64-linux-gnu/libLLVM-13.so.1
- /lib/x86_64-linux-gnu/libOpenGL.so.0
- /lib/x86_64-linux-gnu/libX11.so.6
- /lib/x86_64-linux-gnu/libXau.so.6
@ -81,7 +68,7 @@ AppDir:
- /lib/x86_64-linux-gnu/libedit.so.2
- /lib/x86_64-linux-gnu/libelf.so.1
- /lib/x86_64-linux-gnu/libepoxy.so.0
- /lib/x86_64-linux-gnu/libffi.so.7
- /lib/x86_64-linux-gnu/libffi.so.8
- /lib/x86_64-linux-gnu/libfontconfig.so.1
- /lib/x86_64-linux-gnu/libfreetype.so.6
- /lib/x86_64-linux-gnu/libfribidi.so.0
@ -93,31 +80,42 @@ AppDir:
- /lib/x86_64-linux-gnu/libglfw.so.3
- /lib/x86_64-linux-gnu/libglib-2.0.so.0
- /lib/x86_64-linux-gnu/libgmodule-2.0.so.0
- /lib/x86_64-linux-gnu/libgmp.so.10
- /lib/x86_64-linux-gnu/libgnutls.so.30
- /lib/x86_64-linux-gnu/libgobject-2.0.so.0
- /lib/x86_64-linux-gnu/libgraphite2.so.3
- /lib/x86_64-linux-gnu/libgtk-3.so.0
- /lib/x86_64-linux-gnu/libharfbuzz.so.0
- /lib/x86_64-linux-gnu/libicudata.so.66
- /lib/x86_64-linux-gnu/libicuuc.so.66
- /lib/x86_64-linux-gnu/libhogweed.so.6
- /lib/x86_64-linux-gnu/libicudata.so.70
- /lib/x86_64-linux-gnu/libicuuc.so.70
- /lib/x86_64-linux-gnu/libidn2.so.0
- /lib/x86_64-linux-gnu/libjpeg.so.8
- /lib/x86_64-linux-gnu/liblber-2.5.so.0
- /lib/x86_64-linux-gnu/libldap-2.5.so.0
- /lib/x86_64-linux-gnu/liblz4.so.1
- /lib/x86_64-linux-gnu/libmagic.so.1
- /lib/x86_64-linux-gnu/libmbedcrypto.so.3
- /lib/x86_64-linux-gnu/libmbedtls.so.12
- /lib/x86_64-linux-gnu/libmbedx509.so.0
- /lib/x86_64-linux-gnu/libmbedcrypto.so.7
- /lib/x86_64-linux-gnu/libmbedtls.so.14
- /lib/x86_64-linux-gnu/libmbedx509.so.1
- /lib/x86_64-linux-gnu/libmd.so.0
- /lib/x86_64-linux-gnu/libmount.so.1
- /lib/x86_64-linux-gnu/libnettle.so.8
- /lib/x86_64-linux-gnu/libp11-kit.so.0
- /lib/x86_64-linux-gnu/libpango-1.0.so.0
- /lib/x86_64-linux-gnu/libpangocairo-1.0.so.0
- /lib/x86_64-linux-gnu/libpangoft2-1.0.so.0
- /lib/x86_64-linux-gnu/libpcre2-8.so.0
- /lib/x86_64-linux-gnu/libpixman-1.so.0
- /lib/x86_64-linux-gnu/libpng16.so.16
- /lib/x86_64-linux-gnu/libpython3.8.so.1.0
- /lib/x86_64-linux-gnu/libpython3.10.so.1.0
- /lib/x86_64-linux-gnu/libsasl2.so.2
- /lib/x86_64-linux-gnu/libsensors.so.5
- /lib/x86_64-linux-gnu/libstdc++.so.6
- /lib/x86_64-linux-gnu/libsystemd.so.0
- /lib/x86_64-linux-gnu/libtasn1.so.6
- /lib/x86_64-linux-gnu/libthai.so.0
- /lib/x86_64-linux-gnu/libunistring.so.2
- /lib/x86_64-linux-gnu/libuuid.so.1
- /lib/x86_64-linux-gnu/libvulkan.so.1
- /lib/x86_64-linux-gnu/libwayland-client.so.0

View File

@ -4,7 +4,7 @@ Section: editors
Priority: optional
Architecture: amd64
License: GNU GPL-2
Depends: libglfw3-dev, libmagic-dev, libmbedtls-dev, libcapstone-dev, python3-dev, libfreetype-dev, libgtk-3-dev, libldap2-dev
Depends: libglfw3, libmagic1, libmbedtls14, libpython3.10, libfreetype6, libopengl0, libgtk-3-0
Maintainer: WerWolv <hey@werwolv.net>
Description: ImHex Hex Editor
A Hex Editor for Reverse Engineers, Programmers and