mirror of https://github.com/WerWolv/ImHex.git
git: Make sure Linux CI doesn't build ImHex twice (#689)
* install deb package in a different folder than AppImage * added comment for Ubuntu cmake build * fixed typos * separate cmake build for deb and appimage
This commit is contained in:
parent
be82ee15b7
commit
6a88c7cbaa
|
@ -187,7 +187,7 @@ jobs:
|
||||||
with:
|
with:
|
||||||
submodules: recursive
|
submodules: recursive
|
||||||
|
|
||||||
- name: 📜 Restore cache
|
- name: 📜 Restore ccache
|
||||||
uses: actions/cache@v3
|
uses: actions/cache@v3
|
||||||
with:
|
with:
|
||||||
path: |
|
path: |
|
||||||
|
@ -200,6 +200,7 @@ jobs:
|
||||||
with:
|
with:
|
||||||
path: |
|
path: |
|
||||||
build/CMakeCache.txt
|
build/CMakeCache.txt
|
||||||
|
build-appimage/CMakeCache.txt
|
||||||
.flatpak-builder
|
.flatpak-builder
|
||||||
key: ${{ runner.os }}-${{ secrets.CACHE_VERSION }}-build-${{ hashFiles('**/CMakeLists.txt') }}
|
key: ${{ runner.os }}-${{ secrets.CACHE_VERSION }}-build-${{ hashFiles('**/CMakeLists.txt') }}
|
||||||
|
|
||||||
|
@ -225,13 +226,14 @@ jobs:
|
||||||
$HOME/.cargo/bin/rustup target add x86_64-unknown-linux-gnu
|
$HOME/.cargo/bin/rustup target add x86_64-unknown-linux-gnu
|
||||||
$HOME/.cargo/bin/rustup default nightly
|
$HOME/.cargo/bin/rustup default nightly
|
||||||
|
|
||||||
|
# Ubuntu cmake build
|
||||||
- name: 🛠️ Build
|
- name: 🛠️ Build
|
||||||
run: |
|
run: |
|
||||||
mkdir -p build
|
mkdir -p build
|
||||||
cd build
|
cd build
|
||||||
CC=gcc-12 CXX=g++-12 cmake \
|
CC=gcc-12 CXX=g++-12 cmake \
|
||||||
-DCMAKE_BUILD_TYPE=$BUILD_TYPE \
|
-DCMAKE_BUILD_TYPE=$BUILD_TYPE \
|
||||||
-DCMAKE_INSTALL_PREFIX="/usr" \
|
-DCMAKE_INSTALL_PREFIX="/usr" \
|
||||||
-DCMAKE_C_COMPILER_LAUNCHER=ccache \
|
-DCMAKE_C_COMPILER_LAUNCHER=ccache \
|
||||||
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
|
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
|
||||||
-DCMAKE_C_FLAGS="-fuse-ld=lld" \
|
-DCMAKE_C_FLAGS="-fuse-ld=lld" \
|
||||||
|
@ -239,7 +241,7 @@ jobs:
|
||||||
-DRUST_PATH="$HOME/.cargo/bin/" \
|
-DRUST_PATH="$HOME/.cargo/bin/" \
|
||||||
-DIMHEX_PATTERNS_PULL_MASTER=ON \
|
-DIMHEX_PATTERNS_PULL_MASTER=ON \
|
||||||
..
|
..
|
||||||
make -j 4 install DESTDIR=AppDir
|
make -j 4 install DESTDIR=DebDir
|
||||||
|
|
||||||
- name: 📜 Set version variable
|
- name: 📜 Set version variable
|
||||||
run: |
|
run: |
|
||||||
|
@ -256,27 +258,31 @@ jobs:
|
||||||
|
|
||||||
- name: 📦 Bundle DEB
|
- name: 📦 Bundle DEB
|
||||||
run: |
|
run: |
|
||||||
cp -r build/DEBIAN build/AppDir
|
cp -r build/DEBIAN build/DebDir
|
||||||
dpkg-deb -Zgzip --build build/AppDir
|
dpkg-deb -Zgzip --build build/DebDir
|
||||||
mv build/AppDir.deb imhex-${{env.IMHEX_VERSION}}.deb
|
mv build/DebDir.deb imhex-${{env.IMHEX_VERSION}}.deb
|
||||||
rm -rf build/AppDir/DEBIAN
|
|
||||||
|
|
||||||
|
# AppImage cmake build
|
||||||
- name: 🛠️ Reconfigure build for AppImage
|
- name: 🛠️ Reconfigure build for AppImage
|
||||||
run: |
|
run: |
|
||||||
# Reconfigure CMake to include a flag needed for AppImage
|
mkdir -p build-appimage
|
||||||
# Other flags are kept from old configuration
|
cd build-appimage
|
||||||
|
CC=gcc-12 CXX=g++-12 cmake \
|
||||||
cd build
|
-DCMAKE_BUILD_TYPE=$BUILD_TYPE \
|
||||||
cmake \
|
-DCMAKE_INSTALL_PREFIX="/usr" \
|
||||||
-DIMHEX_PLUGINS_IN_SHARE=ON \
|
-DCMAKE_C_COMPILER_LAUNCHER=ccache \
|
||||||
..
|
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
|
||||||
|
-DCMAKE_C_FLAGS="-fuse-ld=lld" \
|
||||||
rm -rf AppDir
|
-DCMAKE_CXX_FLAGS="-fuse-ld=lld" \
|
||||||
|
-DRUST_PATH="$HOME/.cargo/bin/" \
|
||||||
|
-DIMHEX_PATTERNS_PULL_MASTER=ON \
|
||||||
|
-DIMHEX_PLUGINS_IN_SHARE=ON \
|
||||||
|
..
|
||||||
make -j 4 install DESTDIR=AppDir
|
make -j 4 install DESTDIR=AppDir
|
||||||
|
|
||||||
- name: 📦 Bundle AppImage
|
- name: 📦 Bundle AppImage
|
||||||
run: |
|
run: |
|
||||||
cd build
|
cd build-appimage
|
||||||
appimage-builder --recipe ../dist/AppImageBuilder.yml
|
appimage-builder --recipe ../dist/AppImageBuilder.yml
|
||||||
mv ImHex-AppImage-x86_64.AppImage ../imhex-${{env.IMHEX_VERSION}}.AppImage
|
mv ImHex-AppImage-x86_64.AppImage ../imhex-${{env.IMHEX_VERSION}}.AppImage
|
||||||
cd ..
|
cd ..
|
||||||
|
|
|
@ -4,7 +4,7 @@ cmake_minimum_required(VERSION 3.20)
|
||||||
option(IMHEX_PLUGINS_IN_SHARE "Put the plugins in share/imhex/plugins instead of lib[..]/imhex/plugins" OFF)
|
option(IMHEX_PLUGINS_IN_SHARE "Put the plugins in share/imhex/plugins instead of lib[..]/imhex/plugins" OFF)
|
||||||
option(IMHEX_STRIP_RELEASE "Strip the release builds" ON)
|
option(IMHEX_STRIP_RELEASE "Strip the release builds" ON)
|
||||||
option(IMHEX_OFFLINE_BUILD "Enable offline build" OFF)
|
option(IMHEX_OFFLINE_BUILD "Enable offline build" OFF)
|
||||||
option(IMHEX_IGNORE_BAD_CLONE "Disabled the bad clone prevention checks" OFF)
|
option(IMHEX_IGNORE_BAD_CLONE "Disable the bad clone prevention checks" OFF)
|
||||||
option(IMHEX_PATTERNS_PULL_MASTER "Download latest files from master branch of the ImHex-Patterns repo" OFF)
|
option(IMHEX_PATTERNS_PULL_MASTER "Download latest files from master branch of the ImHex-Patterns repo" OFF)
|
||||||
option(IMHEX_IGNORE_BAD_COMPILER "Allow compiling with an unsupported compiler" OFF)
|
option(IMHEX_IGNORE_BAD_COMPILER "Allow compiling with an unsupported compiler" OFF)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue