2020-12-11 14:24:42 +01:00
name : Build
on :
push :
2022-06-19 15:16:03 +02:00
branches : [ "*" ]
2020-12-11 14:24:42 +01:00
pull_request :
2022-06-23 23:48:02 +02:00
workflow_dispatch :
2020-12-11 14:24:42 +01:00
env :
BUILD_TYPE : Release
jobs :
2022-01-15 00:14:12 +01:00
# Windows build
2021-01-10 14:22:34 +01:00
win :
2022-01-22 22:15:15 +01:00
runs-on : windows-2022
2022-03-27 00:01:28 +01:00
name : 🪟 Windows MINGW64
2020-12-11 14:24:42 +01:00
defaults :
run :
shell : msys2 {0}
2021-09-19 21:49:09 +02:00
env :
CCACHE_DIR : "${{ github.workspace }}/.ccache"
CCACHE_MAXSIZE : "1000M"
CCACHE_COMPRESS : "true"
2020-12-11 14:24:42 +01:00
steps :
- name : 🧰 Checkout
2022-06-23 23:48:02 +02:00
uses : actions/checkout@v3
2020-12-11 14:24:42 +01:00
with :
2021-02-24 21:04:00 +01:00
submodules : recursive
2021-12-01 20:31:17 +01:00
2022-06-29 00:24:53 +02:00
- name : 📜 Prepare Cache
id : prep-ccache
shell : bash
run : |
mkdir -p "${CCACHE_DIR}"
echo "::set-output name=dir::$CCACHE_DIR"
- name : 📜 Restore ccache
uses : actions/cache@v3
id : cache-ccache
with :
path : |
${{ steps.prep-ccache.outputs.dir }}
key : ${{ runner.os }}-${{ secrets.CACHE_VERSION }}-build-${{ github.run_id }}
restore-keys : ${{ runner.os }}-${{ secrets.CACHE_VERSION }}-build
- name : 📜 Restore CMakeCache
uses : actions/cache@v3
with :
path : |
build/CMakeCache.txt
key : ${{ runner.os }}-${{ secrets.CACHE_VERSION }}-build-${{ hashFiles('**/CMakeLists.txt') }}
2021-02-28 16:05:05 +01:00
- name : 🟦 Install msys2
2020-12-11 14:24:42 +01:00
uses : msys2/setup-msys2@v2
2021-12-01 20:31:17 +01:00
with :
msystem : mingw64
pacboy : >-
gcc:p
2022-01-13 21:31:01 +01:00
lld:p
2021-12-01 20:31:17 +01:00
cmake:p
make:p
ccache:p
glfw:p
file:p
mbedtls:p
python:p
freetype:p
dlfcn:p
2021-09-19 21:49:09 +02:00
2021-02-28 16:05:05 +01:00
- name : ⬇️ Install dependencies
2021-02-28 15:34:44 +01:00
run : |
2021-10-16 11:37:29 +02:00
curl --proto '=https' --tlsv1.2 -sSf https://win.rustup.rs > rustup-init.exe
./rustup-init.exe -y --default-host=x86_64-pc-windows-gnu --default-toolchain=none
rm rustup-init.exe
$USERPROFILE/.cargo/bin/rustup.exe target add x86_64-pc-windows-gnu
$USERPROFILE/.cargo/bin/rustup.exe default nightly
2021-09-19 21:49:09 +02:00
2022-08-04 21:50:41 +02:00
# Windows cmake build
2021-09-11 18:58:53 +02:00
- name : 🛠️ Build
2020-12-11 14:24:42 +01:00
run : |
2021-09-19 21:49:09 +02:00
mkdir -p build
2020-12-11 14:24:42 +01:00
cd build
2021-01-10 14:22:34 +01:00
# Get path to mingw python library
2021-06-07 22:42:56 +02:00
PYTHON_LIB_NAME=$(pkg-config --libs-only-l python3 | sed 's/^-l//' | sed 's/ //')
2021-01-10 14:22:34 +01:00
PYTHON_LIB_PATH=$(cygpath -m $(which lib${PYTHON_LIB_NAME}.dll))
2022-01-13 21:31:01 +01:00
cmake -G "MinGW Makefiles" \
-DCMAKE_BUILD_TYPE=$BUILD_TYPE \
-DCMAKE_INSTALL_PREFIX="$PWD/install" \
-DCREATE_PACKAGE=ON \
-DPython_LIBRARY="$PYTHON_LIB_PATH" \
-DCMAKE_C_COMPILER_LAUNCHER=ccache \
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
-DCMAKE_C_FLAGS="-fuse-ld=lld" \
-DCMAKE_CXX_FLAGS="-fuse-ld=lld" \
-DRUST_PATH="$USERPROFILE/.cargo/bin/" \
2022-07-18 20:02:12 +02:00
-DIMHEX_PATTERNS_PULL_MASTER=ON \
2021-01-10 14:22:34 +01:00
..
2021-09-19 21:49:09 +02:00
mingw32-make -j4 install
2021-01-10 14:22:34 +01:00
cpack
2022-09-02 16:11:19 +02:00
echo "ImHex checks for the existence of this file to determine if it is running in portable mode. You should not delete this file" > $PWD/install/PORTABLE
2021-10-16 11:37:29 +02:00
2022-09-02 16:12:02 +02:00
- name : ⬆️ Upload Windows Installer
uses : actions/upload-artifact@v3
with :
name : Windows Installer
path : |
build/*.msi
2021-09-11 18:58:53 +02:00
- name : ⬆️ Upload Portable ZIP
2022-06-23 23:48:02 +02:00
uses : actions/upload-artifact@v3
2021-01-10 14:22:34 +01:00
with :
2022-06-29 15:01:08 +02:00
name : Windows Portable
2021-01-10 14:22:34 +01:00
path : |
build/install/*
2022-09-02 16:12:02 +02:00
- name : ⬇️ Download Mesa3D for NoGPU version
shell : bash
run : |
echo "NoGPU version Powered by Mesa 3D : https://fdossena.com/?p=mesa%2Findex.frag" > build/install/MESA.md
curl https://downloads.fdossena.com/geth.php?r=mesa64-latest -L -o mesa.7z
7z e mesa.7z
mv opengl32.dll build/install
2021-01-10 14:22:34 +01:00
2022-09-02 16:12:02 +02:00
- name : ⬆️ Upload NoGPU Portable ZIP
2022-06-23 23:48:02 +02:00
uses : actions/upload-artifact@v3
2021-01-08 16:25:12 +01:00
with :
2022-09-02 16:12:02 +02:00
name : Windows Portable NoGPU
2021-01-08 16:25:12 +01:00
path : |
2022-09-02 16:12:02 +02:00
build/install/*
2020-12-11 14:24:42 +01:00
2022-01-15 00:14:12 +01:00
# MacOS build
2021-08-24 15:56:49 +02:00
macos :
2022-07-04 00:11:47 +02:00
runs-on : macos-11
2021-01-25 15:09:30 +01:00
2022-08-30 09:47:39 +02:00
strategy :
matrix :
include :
- suffix : "-NoGPU"
custom_glfw : true
- suffix : ""
custom_glfw : false
name : 🍎 macOS 11.0${{matrix.suffix}}
steps :
2021-01-25 15:09:30 +01:00
- name : 🧰 Checkout
2022-06-23 23:48:02 +02:00
uses : actions/checkout@v3
2021-01-25 15:09:30 +01:00
with :
2021-02-24 21:04:00 +01:00
submodules : recursive
2022-08-30 09:47:39 +02:00
- name : 📜 Set version variable
run : |
echo "IMHEX_VERSION=`cat VERSION`" >> $GITHUB_ENV
2022-06-29 00:24:53 +02:00
- name : 📜 Restore ccache
uses : actions/cache@v3
with :
path : |
~/Library/Caches/ccache
2022-08-30 09:47:39 +02:00
key : ${{ runner.os }}-${{ matrix.suffix }}-${{ secrets.CACHE_VERSION }}-build-${{ github.run_id }}
2022-06-29 00:24:53 +02:00
restore-keys : ${{ runner.os }}-${{ secrets.CACHE_VERSION }}-build
- name : 📜 Restore CMakeCache
uses : actions/cache@v3
with :
path : |
build/CMakeCache.txt
2022-08-30 09:47:39 +02:00
key : ${{ runner.os }}-${{ matrix.suffix }}-${{ secrets.CACHE_VERSION }}-build-${{ hashFiles('**/CMakeLists.txt') }}
2021-01-25 15:09:30 +01:00
- name : ⬇️ Install dependencies
run : |
brew bundle --no-lock --file dist/Brewfile
2022-08-30 09:47:39 +02:00
- name : ⬇️ Install classic glfw
if : ${{! matrix.custom_glfw}}
run : |
brew install glfw
- name : 🧰 Checkout glfw
if : ${{matrix.custom_glfw}}
uses : actions/checkout@v3
with :
repository : glfw/glfw
path : glfw
- name : ⬇️ Patch and install custom glfw
if : ${{matrix.custom_glfw}}
run : |
cd glfw
git apply ../dist/macOS/0001-glfw-SW.patch
mkdir build
cd build
cmake \
-DBUILD_SHARED_LIBS=ON \
-DCMAKE_C_COMPILER_LAUNCHER=ccache \
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
-DCMAKE_OBJC_COMPILER_LAUNCHER=ccache \
-DCMAKE_OBJCXX_COMPILER_LAUNCHER=ccache \
..
make -j 4 install
2022-08-04 21:50:41 +02:00
# MacOS cmake build
2021-09-11 18:58:53 +02:00
- name : 🛠️ Build
2021-01-25 15:09:30 +01:00
run : |
2021-09-19 21:49:09 +02:00
mkdir -p build
2021-01-25 15:09:30 +01:00
cd build
2022-06-25 12:19:59 +02:00
CC=$(brew --prefix gcc@12)/bin/gcc-12 \
CXX=$(brew --prefix gcc@12)/bin/g++-12 \
OBJC=$(brew --prefix llvm)/bin/clang \
OBJCXX=$(brew --prefix llvm)/bin/clang++ \
2021-02-02 23:11:23 +01:00
PKG_CONFIG_PATH="$(brew --prefix openssl)/lib/pkgconfig":"$(brew --prefix)/lib/pkgconfig" \
2022-08-01 14:50:27 +02:00
MACOSX_DEPLOYMENT_TARGET="10.10" \
2022-06-25 12:19:59 +02:00
cmake \
-DCMAKE_BUILD_TYPE=$BUILD_TYPE \
-DCREATE_BUNDLE=ON \
-DCREATE_PACKAGE=ON \
-DCMAKE_C_COMPILER_LAUNCHER=ccache \
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
-DCMAKE_OBJC_COMPILER_LAUNCHER=ccache \
-DCMAKE_OBJCXX_COMPILER_LAUNCHER=ccache \
2022-07-18 20:13:01 +02:00
-DIMHEX_PATTERNS_PULL_MASTER=ON \
2022-08-04 20:39:07 +02:00
-DCMAKE_OSX_DEPLOYMENT_TARGET="10.10" \
2022-08-30 09:47:39 +02:00
-DCPACK_PACKAGE_FILE_NAME="imhex-${{env.IMHEX_VERSION}}-macOS${{matrix.suffix}}" \
2021-02-02 23:11:23 +01:00
..
2021-09-19 21:49:09 +02:00
make -j4 package
2021-01-25 15:09:30 +01:00
2021-09-11 18:58:53 +02:00
- name : ⬆️ Upload DMG
2022-06-23 23:48:02 +02:00
uses : actions/upload-artifact@v3
2021-01-25 15:09:30 +01:00
with :
2022-08-30 09:47:39 +02:00
name : macOS DMG${{matrix.suffix}}
2021-01-25 15:09:30 +01:00
path : build/*.dmg
2022-01-15 00:14:12 +01:00
2022-08-04 21:50:41 +02:00
# Ubuntu build
ubuntu :
2022-06-23 23:48:02 +02:00
runs-on : ubuntu-22.04
name : 🐧 Ubuntu 22.04
2022-01-15 00:14:12 +01:00
steps :
- name : 🧰 Checkout
2022-06-23 23:48:02 +02:00
uses : actions/checkout@v3
2022-01-15 00:14:12 +01:00
with :
submodules : recursive
2022-08-18 23:03:31 +02:00
- name : 📜 Restore ccache
2022-06-23 23:48:02 +02:00
uses : actions/cache@v3
2022-01-15 00:14:12 +01:00
with :
path : |
2022-06-27 00:20:32 +02:00
~/.cache/ccache
2022-06-29 00:24:53 +02:00
key : ${{ runner.os }}-${{ secrets.CACHE_VERSION }}-build-${{ github.run_id }}
restore-keys : ${{ runner.os }}-${{ secrets.CACHE_VERSION }}-build
- name : 📜 Restore other caches
uses : actions/cache@v3
with :
path : |
build/CMakeCache.txt
2022-08-18 23:03:31 +02:00
build-appimage/CMakeCache.txt
2022-01-15 00:14:12 +01:00
.flatpak-builder
key : ${{ runner.os }}-${{ secrets.CACHE_VERSION }}-build-${{ hashFiles('**/CMakeLists.txt') }}
2022-06-27 00:20:32 +02:00
2022-01-15 00:14:12 +01:00
- name : ⬇️ Install dependencies
run : |
sudo rm -rf /usr/share/dotnet
sudo rm -rf /opt/ghc
sudo rm -rf "/usr/local/share/boost"
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
2022-01-22 22:10:49 +01:00
2022-01-15 00:14:12 +01:00
sudo apt update
sudo bash dist/get_deps_debian.sh
2022-03-20 23:43:55 +01:00
2022-08-04 21:50:41 +02:00
sudo apt install -y python3-pip python3-setuptools desktop-file-utils libgdk-pixbuf2.0-dev fuse
2022-03-20 23:43:55 +01:00
sudo wget https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage -O /usr/local/bin/appimagetool
sudo chmod +x /usr/local/bin/appimagetool
2022-05-22 23:23:54 +02:00
sudo pip3 install appimage-builder==1.0.0
2022-01-22 22:10:49 +01:00
2022-01-15 00:14:12 +01:00
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs > rustup-init.sh
sh rustup-init.sh -y --default-toolchain none
rm rustup-init.sh
$HOME/.cargo/bin/rustup install nightly
$HOME/.cargo/bin/rustup target add x86_64-unknown-linux-gnu
$HOME/.cargo/bin/rustup default nightly
2022-08-18 23:03:31 +02:00
# Ubuntu cmake build
2022-01-15 00:14:12 +01:00
- name : 🛠️ Build
run : |
mkdir -p build
cd build
2022-06-25 12:19:59 +02:00
CC=gcc-12 CXX=g++-12 cmake \
2022-01-22 22:10:49 +01:00
-DCMAKE_BUILD_TYPE=$BUILD_TYPE \
2022-08-18 23:03:31 +02:00
-DCMAKE_INSTALL_PREFIX="/usr" \
2022-01-22 22:10:49 +01:00
-DCMAKE_C_COMPILER_LAUNCHER=ccache \
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
-DCMAKE_C_FLAGS="-fuse-ld=lld" \
-DCMAKE_CXX_FLAGS="-fuse-ld=lld" \
-DRUST_PATH="$HOME/.cargo/bin/" \
2022-07-18 20:02:12 +02:00
-DIMHEX_PATTERNS_PULL_MASTER=ON \
2022-01-15 00:14:12 +01:00
..
2022-08-18 23:03:31 +02:00
make -j 4 install DESTDIR=DebDir
2022-01-15 00:14:12 +01:00
2022-06-29 15:01:08 +02:00
- name : 📜 Set version variable
run : |
2022-07-18 20:13:01 +02:00
echo "IMHEX_VERSION=`cat VERSION`" >> $GITHUB_ENV
2022-06-29 15:01:08 +02:00
2022-02-06 00:19:39 +01:00
#- name: 📦 Bundle Flatpak
# run: |
# sudo apt install flatpak flatpak-builder
# flatpak --user remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
# flatpak --user install -y flathub org.freedesktop.Platform//20.08
# flatpak --user install -y flathub org.freedesktop.Sdk//20.08
# 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
2022-01-15 00:14:12 +01:00
2022-03-20 23:43:55 +01:00
- name : 📦 Bundle DEB
run : |
2022-08-18 23:03:31 +02:00
cp -r build/DEBIAN build/DebDir
dpkg-deb -Zgzip --build build/DebDir
2022-09-08 09:30:56 +02:00
mv build/DebDir.deb imhex-${{env.IMHEX_VERSION}}-Ubuntu-22.04.deb
2022-01-15 00:14:12 +01:00
2022-08-18 23:03:31 +02:00
# AppImage cmake build
2022-08-04 20:37:57 +02:00
- name : 🛠️ Reconfigure build for AppImage
run : |
2022-08-18 23:03:31 +02:00
mkdir -p build-appimage
cd build-appimage
CC=gcc-12 CXX=g++-12 cmake \
-DCMAKE_BUILD_TYPE=$BUILD_TYPE \
-DCMAKE_INSTALL_PREFIX="/usr" \
-DCMAKE_C_COMPILER_LAUNCHER=ccache \
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
-DCMAKE_C_FLAGS="-fuse-ld=lld" \
-DCMAKE_CXX_FLAGS="-fuse-ld=lld" \
-DRUST_PATH="$HOME/.cargo/bin/" \
-DIMHEX_PATTERNS_PULL_MASTER=ON \
-DIMHEX_PLUGINS_IN_SHARE=ON \
2022-08-26 00:21:17 +02:00
-DIMHEX_USE_BUNDLED_CA=ON \
2022-08-18 23:03:31 +02:00
..
2022-08-04 20:37:57 +02:00
make -j 4 install DESTDIR=AppDir
2022-03-20 23:43:55 +01:00
- name : 📦 Bundle AppImage
run : |
2022-08-18 23:03:31 +02:00
cd build-appimage
2022-09-08 09:31:49 +02:00
export VERSION=${{env.IMHEX_VERSION}}
2022-03-20 23:43:55 +01:00
appimage-builder --recipe ../dist/AppImageBuilder.yml
cd ..
#- name: ⬆️ Upload Flatpak
2022-06-23 23:48:02 +02:00
# uses: actions/upload-artifact@v3
2022-03-20 23:43:55 +01:00
# with:
# name: Linux Flatpak
# path: |
# imhex.flatpak
- name : ⬆️ Upload DEB
2022-06-23 23:48:02 +02:00
uses : actions/upload-artifact@v3
2022-01-15 00:14:12 +01:00
with :
2022-09-08 09:30:56 +02:00
name : Ubuntu 22.04 DEB
2022-06-29 15:01:08 +02:00
path : '*.deb'
2022-01-15 00:14:12 +01:00
- name : ⬆️ Upload AppImage
2022-06-23 23:48:02 +02:00
uses : actions/upload-artifact@v3
2022-01-15 00:14:12 +01:00
with :
name : Linux AppImage
2022-09-08 09:31:49 +02:00
path : 'build-appimage/*.AppImage'
- name : ⬆️ Upload AppImage zsync
uses : actions/upload-artifact@v3
with :
name : Linux AppImage zsync
path : 'build-appimage/*.AppImage.zsync'
2022-01-22 22:10:49 +01:00
2022-08-04 21:50:41 +02:00
# ArchLinux build
2022-07-04 21:40:22 +02:00
archlinux-build :
name : 🐧 ArchLinux
runs-on : ubuntu-latest
container :
image : archlinux:base-devel
steps :
- name : ⬇️ Update all packages
run : |
pacman -Syyu --noconfirm
- name : ⬇️ Install setup dependencies
run : |
pacman -Syu git ccache --noconfirm
- name : 🧰 Checkout
uses : actions/checkout@v3
with :
submodules : recursive
- name : ⬇️ Install ImHex dependencies
run : |
dist/get_deps_archlinux.sh --noconfirm
- name : 📜 Restore ccache
uses : actions/cache@v3
with :
path : |
~/.cache/ccache
key : archlinux-${{ secrets.CACHE_VERSION }}-build-${{ github.run_id }}
restore-keys : archlinux-${{ secrets.CACHE_VERSION }}-build
- name : 📜 Restore CMakeCache
uses : actions/cache@v3
with :
path : |
build/CMakeCache.txt
key : archlinux-${{ secrets.CACHE_VERSION }}-build-${{ hashFiles('**/CMakeLists.txt') }}
2022-08-04 21:50:41 +02:00
# ArchLinux cmake build
2022-07-04 21:40:22 +02:00
- name : 🛠️ Build
run : |
mkdir -p build
cd build
2022-07-18 20:02:12 +02:00
CC=gcc CXX=g++ cmake \
2022-07-04 21:40:22 +02:00
-DCMAKE_BUILD_TYPE=$BUILD_TYPE \
2022-08-04 21:50:41 +02:00
-DCMAKE_INSTALL_PREFIX="/usr" \
2022-07-04 21:40:22 +02:00
-DCMAKE_C_COMPILER_LAUNCHER=ccache \
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
-DCMAKE_C_FLAGS="-fuse-ld=lld" \
-DCMAKE_CXX_FLAGS="-fuse-ld=lld" \
2022-08-04 21:50:41 +02:00
-DUSE_SYSTEM_CURL=ON \
-DUSE_SYSTEM_FMT=ON \
-DUSE_SYSTEM_YARA=ON \
-DUSE_SYSTEM_NLOHMANN_JSON=ON \
-DUSE_SYSTEM_CAPSTONE=OFF \
2022-07-18 20:13:01 +02:00
-DIMHEX_PATTERNS_PULL_MASTER=ON \
2022-07-04 21:40:22 +02:00
..
make -j 4 install DESTDIR=installDir
- name : 📜 Set version variable
run : |
2022-07-23 20:42:59 +02:00
echo "IMHEX_VERSION=`cat VERSION`" >> $GITHUB_ENV
2022-07-04 21:40:22 +02:00
- name : ✒️ Prepare PKGBUILD
run : |
cp dist/Arch/PKGBUILD build
2022-07-18 20:13:01 +02:00
sed -i 's/%version%/${{env.IMHEX_VERSION}}/g' build/PKGBUILD
2022-07-04 21:40:22 +02:00
# makepkg doesn't want to run as root, so I had to chmod 777 all over
- name : 📦 Package ArchLinux .pkg.tar.zst
run : |
cd build
# the name is a small trick to make makepkg recognize it as the source
# else, it would try to download the file from the release
2022-07-18 20:13:01 +02:00
tar -cvf imhex-${{env.IMHEX_VERSION}}-ArchLinux.pkg.tar.zst -C installDir .
2022-07-04 21:40:22 +02:00
chmod -R 777 .
sudo -u nobody makepkg
2022-07-31 17:29:57 +02:00
# Replace the old file
2022-07-18 20:13:01 +02:00
rm imhex-${{env.IMHEX_VERSION}}-ArchLinux.pkg.tar.zst
mv *.pkg.tar.zst imhex-${{env.IMHEX_VERSION}}-ArchLinux.pkg.tar.zst
2022-07-04 21:40:22 +02:00
- name : ⬆️ Upload imhex-archlinux.pkg.tar.zst
uses : actions/upload-artifact@v3
with :
name : ArchLinux .pkg.tar.zst
path : |
2022-07-18 20:13:01 +02:00
build/imhex-${{env.IMHEX_VERSION}}-ArchLinux.pkg.tar.zst
2022-08-04 21:50:41 +02:00
# Fedora build
2022-07-31 17:29:57 +02:00
fedora-build :
strategy :
matrix :
include :
- docker_image : fedora:latest
release : Latest
- docker_image : fedora:rawhide
release : Rawhide
name : 🐧 Fedora ${{ matrix.release }}
2022-07-31 00:43:42 +02:00
runs-on : ubuntu-latest
container :
2022-07-31 17:29:57 +02:00
image : "${{ matrix.docker_image }}"
2022-07-31 00:43:42 +02:00
steps :
- name : ⬇️ Update all packages
run : |
dnf upgrade -y
- name : ⬇️ Install setup dependencies
run : |
dnf install -y \
ccache \
desktop-file-utils \
fmt-devel \
git \
json-devel \
libcurl-devel \
llvm-devel \
mbedtls-devel \
python3-devel \
rpm-build \
yara-devel
- name : 🧰 Checkout
uses : actions/checkout@v3
with :
submodules : recursive
- name : ⬇️ Install ImHex dependencies
run : |
dist/get_deps_fedora.sh
- name : 📜 Restore ccache
uses : actions/cache@v3
with :
path : |
~/.cache/ccache
2022-07-31 17:29:57 +02:00
key : fedora-${{ matrix.release }}-${{ secrets.CACHE_VERSION }}-build-${{ github.run_id }}
restore-keys : fedora-${{ matrix.release }}-${{ secrets.CACHE_VERSION }}-build
2022-08-14 10:08:58 +02:00
2022-07-31 00:43:42 +02:00
- name : 📜 Set version variable
run : |
echo "IMHEX_VERSION=`cat VERSION`" >> $GITHUB_ENV
2022-08-04 21:50:41 +02:00
# Fedora cmake build (in imhex.spec)
2022-07-31 00:43:42 +02:00
- name : 📦 Build RPM
run : |
2022-07-31 17:29:57 +02:00
rpmbuild -ba --define "_version ${{env.IMHEX_VERSION}}" --define "_src_path $GITHUB_WORKSPACE" --define "_build_type $BUILD_TYPE" $GITHUB_WORKSPACE/dist/rpm/imhex.spec
2022-08-04 20:37:57 +02:00
mv ~/rpmbuild/RPMS/x86_64/*.rpm imhex-${{env.IMHEX_VERSION}}-Fedora-${{matrix.release}}.rpm
2022-07-31 00:43:42 +02:00
- name : ⬆️ Upload RPM
uses : actions/upload-artifact@v3
with :
2022-07-31 17:29:57 +02:00
name : Fedora ${{ matrix.release }} RPM
2022-07-31 00:43:42 +02:00
path : |
2022-08-04 20:37:57 +02:00
imhex-${{env.IMHEX_VERSION}}-Fedora-${{matrix.release}}.rpm