ci: rework (#31)
This commit is contained in:
parent
366dc80dc0
commit
e3b5a55eba
172
.github/workflows/build.yml
vendored
Normal file
172
.github/workflows/build.yml
vendored
Normal file
@ -0,0 +1,172 @@
|
||||
name: Build
|
||||
|
||||
on:
|
||||
push:
|
||||
pull_request:
|
||||
|
||||
env:
|
||||
BUILD_TYPE: Release
|
||||
|
||||
jobs:
|
||||
|
||||
|
||||
lin:
|
||||
runs-on: ubuntu-20.04
|
||||
name: 🐧 Ubuntu 20.04
|
||||
steps:
|
||||
|
||||
- name: 🧰 Checkout
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: ⬇️ Install dependencies
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y \
|
||||
build-essential \
|
||||
gcc-10 \
|
||||
g++-10 \
|
||||
pkg-config \
|
||||
cmake \
|
||||
make \
|
||||
libglfw3-dev \
|
||||
libglm-dev \
|
||||
libmagic-dev \
|
||||
libssl-dev \
|
||||
libcapstone-dev \
|
||||
llvm-dev \
|
||||
nlohmann-json3-dev \
|
||||
python3-dev \
|
||||
|
||||
- name: ✋ Build
|
||||
run: |
|
||||
mkdir build
|
||||
cd build
|
||||
CC=gcc-10 CXX=g++-10 cmake ..
|
||||
make -j 4
|
||||
|
||||
|
||||
win-manual:
|
||||
runs-on: windows-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- { msystem: MINGW64, arch: x86_64 }
|
||||
#- { msystem: MINGW32, arch: i686 } # currently fail
|
||||
name: 🟪 ${{ matrix.msystem }} · ${{ matrix.arch }} · manual
|
||||
defaults:
|
||||
run:
|
||||
shell: msys2 {0}
|
||||
env:
|
||||
MINGW_INSTALLS: ${{ matrix.msystem }}
|
||||
steps:
|
||||
|
||||
- name: 🧰 Checkout
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: 🟪 Setup MSYS2
|
||||
uses: msys2/setup-msys2@v2
|
||||
with:
|
||||
msystem: ${{ matrix.msystem }}
|
||||
update: true
|
||||
install: >
|
||||
mingw-w64-${{ matrix.arch }}-gcc
|
||||
mingw-w64-${{ matrix.arch }}-cmake
|
||||
mingw-w64-${{ matrix.arch }}-make
|
||||
mingw-w64-${{ matrix.arch }}-capstone
|
||||
mingw-w64-${{ matrix.arch }}-glfw
|
||||
mingw-w64-${{ matrix.arch }}-glm
|
||||
mingw-w64-${{ matrix.arch }}-file
|
||||
mingw-w64-${{ matrix.arch }}-llvm
|
||||
mingw-w64-${{ matrix.arch }}-nlohmann-json
|
||||
mingw-w64-${{ matrix.arch }}-openssl
|
||||
mingw-w64-${{ matrix.arch }}-polly
|
||||
mingw-w64-${{ matrix.arch }}-python
|
||||
|
||||
- name: ✋ Build
|
||||
run: |
|
||||
mkdir build
|
||||
cd build
|
||||
cmake -G "MinGW Makefiles" ..
|
||||
mingw32-make -j 4
|
||||
|
||||
|
||||
win-makepkg:
|
||||
runs-on: windows-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- { msystem: MINGW64, arch: x86_64 }
|
||||
#- { msystem: MINGW32, arch: i686 } # currently fail
|
||||
name: 🟪 ${{ matrix.msystem }} · ${{ matrix.arch }} · makepkg
|
||||
defaults:
|
||||
run:
|
||||
shell: msys2 {0}
|
||||
steps:
|
||||
|
||||
- run: git config --global core.autocrlf input
|
||||
shell: bash
|
||||
|
||||
- name: 🧰 Checkout
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: 🟪 Setup MSYS2
|
||||
uses: msys2/setup-msys2@v2
|
||||
with:
|
||||
msystem: ${{ matrix.msystem }}
|
||||
update: true
|
||||
install: >
|
||||
base-devel
|
||||
mingw-w64-${{ matrix.arch }}-toolchain
|
||||
|
||||
- name: 🔧 Build
|
||||
run: |
|
||||
cd msys2
|
||||
makepkg-mingw --noconfirm --noprogressbar -sCLf
|
||||
env:
|
||||
MINGW_INSTALLS: ${{ matrix.msystem }}
|
||||
|
||||
- name: '📤 Upload artifact: package'
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
path: msys2/*.zst
|
||||
|
||||
|
||||
win-test:
|
||||
needs: win-makepkg
|
||||
runs-on: windows-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- { msystem: MINGW64, arch: x86_64 }
|
||||
#- { msystem: MINGW32, arch: i686 } # currently fail
|
||||
name: 🟪 ${{ matrix.msystem }} · ${{ matrix.arch }} · test
|
||||
defaults:
|
||||
run:
|
||||
shell: msys2 {0}
|
||||
steps:
|
||||
|
||||
- name: 🟪 Setup MSYS2
|
||||
uses: msys2/setup-msys2@v2
|
||||
with:
|
||||
msystem: ${{ matrix.msystem }}
|
||||
update: true
|
||||
|
||||
- name: '📥 Download artifacts'
|
||||
uses: actions/download-artifact@v2
|
||||
|
||||
- name: ⚙️ Install
|
||||
run: |
|
||||
pacman -U --noconfirm --noprogressbar artifact/*.zst
|
||||
|
||||
- name: ▶️ Test
|
||||
run: |
|
||||
which ImHex
|
44
.github/workflows/build_linux.yml
vendored
44
.github/workflows/build_linux.yml
vendored
@ -1,44 +0,0 @@
|
||||
name: build-linux
|
||||
|
||||
on:
|
||||
push:
|
||||
pull_request:
|
||||
|
||||
env:
|
||||
BUILD_TYPE: Release
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-20.04
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Setup
|
||||
shell: bash
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y build-essential \
|
||||
gcc-10 \
|
||||
g++-10 \
|
||||
pkg-config \
|
||||
cmake \
|
||||
make \
|
||||
libglfw3-dev \
|
||||
libglm-dev \
|
||||
libmagic-dev \
|
||||
libssl-dev \
|
||||
libcapstone-dev \
|
||||
llvm-dev \
|
||||
nlohmann-json3-dev \
|
||||
python3-dev \
|
||||
|
||||
- name: Build
|
||||
shell: bash
|
||||
run: |
|
||||
mkdir build
|
||||
cd build
|
||||
CC=gcc-10 CXX=g++-10 cmake ..
|
||||
make -j 4
|
40
.github/workflows/build_win.yml
vendored
40
.github/workflows/build_win.yml
vendored
@ -1,40 +0,0 @@
|
||||
name: build-win
|
||||
|
||||
on:
|
||||
push:
|
||||
pull_request:
|
||||
|
||||
env:
|
||||
BUILD_TYPE: Release
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: windows-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include: [
|
||||
{ msystem: MINGW64, arch: x86_64 },
|
||||
# currently fail
|
||||
#{ msystem: MINGW32, arch: i686 }
|
||||
]
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Setup
|
||||
uses: msys2/setup-msys2@v2
|
||||
with:
|
||||
msystem: ${{ matrix.msystem }}
|
||||
install: mingw-w64-${{ matrix.arch }}-gcc mingw-w64-${{ matrix.arch }}-cmake mingw-w64-${{ matrix.arch }}-make mingw-w64-${{ matrix.arch }}-capstone mingw-w64-${{ matrix.arch }}-glfw mingw-w64-${{ matrix.arch }}-glm mingw-w64-${{ matrix.arch }}-file mingw-w64-${{ matrix.arch }}-llvm mingw-w64-${{ matrix.arch }}-nlohmann-json mingw-w64-${{ matrix.arch }}-openssl mingw-w64-${{ matrix.arch }}-polly mingw-w64-${{ matrix.arch }}-python
|
||||
update: true
|
||||
|
||||
- name: Build
|
||||
shell: msys2 {0}
|
||||
run: |
|
||||
mkdir build
|
||||
cd build
|
||||
cmake -G "MinGW Makefiles" ..
|
||||
mingw32-make -j 4
|
@ -96,4 +96,6 @@ endif (WIN32)
|
||||
|
||||
if (UNIX)
|
||||
target_link_libraries(ImHex libglfw.so libmagic.so libcrypto.so libdl.so libcapstone.so ${llvm_libs} ${Python_LIBRARIES} nlohmann_json::nlohmann_json)
|
||||
endif (UNIX)
|
||||
endif (UNIX)
|
||||
|
||||
install(TARGETS ImHex DESTINATION bin)
|
||||
|
@ -1,3 +1,8 @@
|
||||
<p align="center">
|
||||
<a title="'Build' workflow Status" href="https://github.com/WerWolv/ImHex/actions?query=workflow%3ABuild"><img alt="'Build' workflow Status" src="https://img.shields.io/github/workflow/status/WerWolv/ImHex/Build?longCache=true&style=for-the-badge&label=Build&logoColor=fff&logo=GitHub%20Actions"></a><!--
|
||||
-->
|
||||
</p>
|
||||
|
||||
# ImHex
|
||||
|
||||
A Hex Editor for Reverse Engineers, Programmers and people that value their eye sight when working at 3 AM.
|
||||
@ -6,9 +11,11 @@ A Hex Editor for Reverse Engineers, Programmers and people that value their eye
|
||||
|
||||
If you like my work, consider supporting me on GitHub Sponsors, Patreon or PayPal. Thanks a lot!
|
||||
|
||||
<p align="center">
|
||||
<a href="https://github.com/sponsors/WerWolv"><img src="https://werwolv.net/assets/github_banner.png" alt="GitHub donate button" /> </a>
|
||||
<a href="https://www.patreon.com/werwolv"><img src="https://c5.patreon.com/external/logo/become_a_patron_button.png" alt="Patreon donate button" /> </a>
|
||||
<a href="https://werwolv.net/donate"><img src="https://werwolv.net/assets/paypal_banner.png" alt="PayPal donate button" /> </a>
|
||||
</p>
|
||||
|
||||
## Features
|
||||
|
||||
|
46
msys2/PKGBUILD
Normal file
46
msys2/PKGBUILD
Normal file
@ -0,0 +1,46 @@
|
||||
_realname=ImHex
|
||||
pkgbase=mingw-w64-${_realname}
|
||||
pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}"
|
||||
pkgver=ci
|
||||
pkgrel=1
|
||||
pkgdesc="${_realname}: a Hex Editor for Reverse Engineers, Programmers and people that value their eye sight when working at 3 AM (mingw-w64)"
|
||||
arch=('any')
|
||||
url="https://github.com/WerWolv/ImHex"
|
||||
license=('GPLv2')
|
||||
depends=("${MINGW_PACKAGE_PREFIX}-python")
|
||||
makedepends=("${MINGW_PACKAGE_PREFIX}-gcc"
|
||||
"${MINGW_PACKAGE_PREFIX}-cmake"
|
||||
"${MINGW_PACKAGE_PREFIX}-make"
|
||||
"${MINGW_PACKAGE_PREFIX}-capstone"
|
||||
"${MINGW_PACKAGE_PREFIX}-glfw"
|
||||
"${MINGW_PACKAGE_PREFIX}-glm"
|
||||
"${MINGW_PACKAGE_PREFIX}-file"
|
||||
"${MINGW_PACKAGE_PREFIX}-llvm"
|
||||
"${MINGW_PACKAGE_PREFIX}-nlohmann-json"
|
||||
"${MINGW_PACKAGE_PREFIX}-openssl"
|
||||
"${MINGW_PACKAGE_PREFIX}-polly"
|
||||
"${MINGW_PACKAGE_PREFIX}-python")
|
||||
|
||||
source=()
|
||||
sha256sums=()
|
||||
|
||||
build() {
|
||||
cd "${srcdir}"/../..
|
||||
mkdir build
|
||||
cd build
|
||||
export BUILD_TYPE='Release'
|
||||
MSYS2_ARG_CONV_EXCL=- cmake \
|
||||
-G "MinGW Makefiles" \
|
||||
-DCMAKE_INSTALL_PREFIX="${MINGW_PREFIX}" \
|
||||
../
|
||||
mingw32-make
|
||||
}
|
||||
|
||||
package() {
|
||||
cd "${srcdir}"/../../build
|
||||
mingw32-make DESTDIR="${pkgdir}" install
|
||||
|
||||
_licenses="${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}"
|
||||
mkdir -p "${_licenses}"
|
||||
install -m 644 ../LICENSE "${_licenses}"
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user