mirror of
https://github.com/WerWolv/ImHex.git
synced 2026-03-30 13:05:25 -05:00
138 lines
3.6 KiB
YAML
138 lines
3.6 KiB
YAML
name: Build
|
|
|
|
on:
|
|
push:
|
|
pull_request:
|
|
|
|
env:
|
|
BUILD_TYPE: Release
|
|
|
|
jobs:
|
|
|
|
linux:
|
|
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 \
|
|
nlohmann-json3-dev \
|
|
python3-dev \
|
|
libfreetype-dev \
|
|
|
|
- name: ✋ Build
|
|
run: |
|
|
mkdir build
|
|
cd build
|
|
CC=gcc-10 CXX=g++-10 cmake -DCMAKE_BUILD_TYPE=$BUILD_TYPE ..
|
|
make -j 4
|
|
|
|
- name: 📦 Uploading artifact
|
|
uses: actions/upload-artifact@v2
|
|
with:
|
|
name: Linux ELF
|
|
path: build/imhex
|
|
|
|
|
|
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 }}
|
|
defaults:
|
|
run:
|
|
shell: msys2 {0}
|
|
env:
|
|
MINGW_INSTALLS: ${{ matrix.msystem }}
|
|
steps:
|
|
|
|
- name: 🧰 Checkout
|
|
uses: actions/checkout@v2
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: ⬇️ Install dependencies
|
|
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 }}-nlohmann-json
|
|
mingw-w64-${{ matrix.arch }}-openssl
|
|
mingw-w64-${{ matrix.arch }}-polly
|
|
mingw-w64-${{ matrix.arch }}-python
|
|
mingw-w64-${{ matrix.arch }}-dlfcn
|
|
mingw-w64-${{ matrix.arch }}-freetype
|
|
|
|
- name: ✋ Build
|
|
run: |
|
|
mkdir build
|
|
cd build
|
|
ls -1 C:/hostedtoolcache/windows/Python/3.9.1/x64/python39.dll | xargs -L1 -I{} cp {} .
|
|
ls -1 D:/a/_temp/msys/msys64/mingw64/bin/libwinpthread-?.dll | xargs -L1 -I{} cp {} .
|
|
cmake -G "MinGW Makefiles" -DCMAKE_BUILD_TYPE=$BUILD_TYPE ..
|
|
mingw32-make -j 4
|
|
- name: 📦 Uploading artifact
|
|
uses: actions/upload-artifact@v2
|
|
with:
|
|
name: Windows EXE
|
|
path: |
|
|
build/*.exe
|
|
build/python39.dll
|
|
build/libwinpthread-?.dll
|
|
|
|
macos-build:
|
|
runs-on: macos-11.0
|
|
name: 🍎 macOS 11.0
|
|
steps:
|
|
|
|
- name: 🧰 Checkout
|
|
uses: actions/checkout@v2
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: ⬇️ Install dependencies
|
|
run: |
|
|
brew bundle --no-lock --file dist/Brewfile
|
|
|
|
- name: ✋ Build
|
|
run: |
|
|
mkdir build
|
|
cd build
|
|
CC=$(brew --prefix llvm)/bin/clang CXX=$(brew --prefix llvm)/bin/clang++ PKG_CONFIG_PATH="$(brew --prefix openssl)/lib/pkgconfig":"$(brew --prefix)/lib/pkgconfig" cmake -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DCREATE_BUNDLE=ON -DCREATE_PACKAGE=ON ..
|
|
make -j 4 package
|
|
|
|
- name: 📦 Uploading artifact
|
|
uses: actions/upload-artifact@v2
|
|
with:
|
|
name: macOS DMG
|
|
path: build/*.dmg |