Skip to content

Build DIE-engine

Build DIE-engine #314

Workflow file for this run

name: Build DIE-engine
on:
workflow_dispatch:
release:
types: [created]
schedule:
- cron: '0 0 * * *'
pull_request:
types: [opened, synchronize, reopened]
env:
SRC_PATH: ${{ github.workspace }}/src
SRC_PATH_WIN: ${{ github.workspace }}\src
RELEASE_PATH: ${{ github.workspace }}/src/release
# the jobs are based on these notes:
# https://github.com/horsicq/Detect-It-Easy/blob/master/docs/BUILD.md
jobs:
build-ubuntu-24:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
with:
submodules: 'recursive'
path: ${{ env.SRC_PATH }}
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install qtbase5-dev qtscript5-dev qttools5-dev-tools libqt5svg5-dev qtchooser qt5-qmake build-essential -y
- name: Build
working-directory: ${{ env.SRC_PATH }}
run: |
bash -x build_dpkg.sh
- name: Upload Release as Download
if: github.event_name != 'pull_request'
uses: softprops/action-gh-release@v2
env:
RELEASE_TOKEN: ${{ secrets.RELEASE_TOKEN }}
with:
tag_name: Beta
draft: false
prerelease: true
files: |
${{ env.RELEASE_PATH }}/*.deb
build-ubuntu-24-arm:
runs-on: ubuntu-24.04-arm
steps:
- uses: actions/checkout@v4
with:
submodules: 'recursive'
path: ${{ env.SRC_PATH }}
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install qtbase5-dev qtscript5-dev qttools5-dev-tools libqt5svg5-dev qtchooser qt5-qmake build-essential -y
- name: Build
working-directory: ${{ env.SRC_PATH }}
run: |
bash -x build_dpkg.sh
- name: Upload Release as Download
if: github.event_name != 'pull_request'
uses: softprops/action-gh-release@v2
env:
RELEASE_TOKEN: ${{ secrets.RELEASE_TOKEN }}
with:
tag_name: Beta
draft: false
prerelease: true
files: |
${{ env.RELEASE_PATH }}/*.deb
build-ubuntu-22:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
with:
submodules: 'recursive'
path: ${{ env.SRC_PATH }}
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install qtbase5-dev qtscript5-dev qttools5-dev-tools libqt5svg5-dev qtchooser qt5-qmake build-essential -y
- name: Build
working-directory: ${{ env.SRC_PATH }}
run: |
bash -x build_dpkg.sh
- name: Upload Release as Download
if: github.event_name != 'pull_request'
uses: softprops/action-gh-release@v2
env:
RELEASE_TOKEN: ${{ secrets.RELEASE_TOKEN }}
with:
tag_name: Beta
draft: false
prerelease: true
files: |
${{ env.RELEASE_PATH }}/*.deb
build-windows-32:
runs-on: windows-2022
steps:
- uses: actions/checkout@v4
with:
submodules: 'recursive'
path: ${{ env.SRC_PATH }}
- name: Setup MSVC
uses: ilammy/msvc-dev-cmd@v1
with:
arch: x86
- name: Install Qt
uses: jurplel/install-qt-action@v4
with:
version: '5.15.2'
host: 'windows'
target: 'desktop'
arch: 'win32_msvc2019'
dir: ${{ github.workspace }}
modules: qtscript
- name: Build
shell: cmd
working-directory: ${{ env.SRC_PATH }}
run: |
set VSVARS_PATH="C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvars32.bat"
set QMAKE_PATH="${{ github.workspace }}\Qt\5.15.2\msvc2019\bin\qmake.exe"
set SEVENZIP_PATH="C:\Program Files\7-Zip\7z.exe"
set INNOSETUP_PATH="C:\Program Files (x86)\Inno Setup 6\ISCC.exe"
set X_BUILD_NAME=die
set X_BUILD_PREFIX=win32
set X_SOURCE_PATH=${{ env.SRC_PATH_WIN }}
for /f "delims=" %%x in ('type "%X_SOURCE_PATH%\release_version.txt"') do set X_RELEASE_VERSION=%%x
echo on
call "%X_SOURCE_PATH%\build_win_generic_check.cmd"
dir "%X_SOURCE_PATH%\release\*.zip" >nul 2>&1
if %ERRORLEVEL% neq 0 (
echo "ZIP file does not exist"
exit /b 1
)
- name: Upload Release as Download
if: github.event_name != 'pull_request'
uses: softprops/action-gh-release@v2
env:
RELEASE_TOKEN: ${{ secrets.RELEASE_TOKEN }}
with:
tag_name: Beta
draft: false
prerelease: true
files: |
${{ env.RELEASE_PATH }}/*.zip
build-windows-64:
runs-on: windows-2022
steps:
- uses: actions/checkout@v4
with:
submodules: 'recursive'
path: ${{ env.SRC_PATH }}
- name: Setup MSVC
uses: ilammy/msvc-dev-cmd@v1
with:
arch: x64
- name: Install Qt
uses: jurplel/install-qt-action@v4
with:
version: '5.15.2'
host: 'windows'
target: 'desktop'
arch: 'win64_msvc2019_64'
dir: ${{ github.workspace }}
modules: qtscript
- name: Build
shell: cmd
working-directory: ${{ env.SRC_PATH }}
run: |
set VSVARS_PATH="C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
set QMAKE_PATH="${{ github.workspace }}\Qt\5.15.2\msvc2019_64\bin\qmake.exe"
set SEVENZIP_PATH="C:\Program Files\7-Zip\7z.exe"
set INNOSETUP_PATH="C:\Program Files (x86)\Inno Setup 6\ISCC.exe"
set X_BUILD_NAME=die
set X_BUILD_PREFIX=win64
set X_SOURCE_PATH=${{ env.SRC_PATH_WIN }}
for /f "delims=" %%x in ('type "%X_SOURCE_PATH%\release_version.txt"') do set X_RELEASE_VERSION=%%x
echo on
call "%X_SOURCE_PATH%\build_win_generic_check.cmd"
dir "%X_SOURCE_PATH%\release\*.zip" >nul 2>&1
if %ERRORLEVEL% neq 0 (
echo "ZIP file does not exist"
exit /b 1
)
- name: Upload Release as Download
if: github.event_name != 'pull_request'
uses: softprops/action-gh-release@v2
env:
RELEASE_TOKEN: ${{ secrets.RELEASE_TOKEN }}
with:
tag_name: Beta
draft: false
prerelease: true
files: |
${{ env.RELEASE_PATH }}/*.zip
build-windows-64-qt6:
runs-on: windows-2022
steps:
- uses: actions/checkout@v4
with:
submodules: 'recursive'
path: ${{ env.SRC_PATH }}
- name: Setup MSVC
uses: ilammy/msvc-dev-cmd@v1
with:
arch: x64
- name: Install Qt
uses: jurplel/install-qt-action@v4
with:
version: '6.8.3'
host: 'windows'
target: 'desktop'
arch: 'win64_msvc2022_64'
dir: ${{ github.workspace }}
modules: qt5compat
- name: Build
shell: cmd
working-directory: ${{ env.SRC_PATH }}
run: |
set VSVARS_PATH="C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
set QMAKE_PATH="${{ github.workspace }}\Qt\6.8.3\msvc2022_64\bin\qmake.exe"
set SEVENZIP_PATH="C:\Program Files\7-Zip\7z.exe"
set INNOSETUP_PATH="C:\Program Files (x86)\Inno Setup 6\ISCC.exe"
set X_BUILD_NAME=die
set X_BUILD_PREFIX=win64_qt6
set X_SOURCE_PATH=${{ env.SRC_PATH_WIN }}
for /f "delims=" %%x in ('type "%X_SOURCE_PATH%\release_version.txt"') do set X_RELEASE_VERSION=%%x
echo on
call "%X_SOURCE_PATH%\build_win_generic_qt6.cmd"
dir "%X_SOURCE_PATH%\release\*.zip" >nul 2>&1
if %ERRORLEVEL% neq 0 (
echo "ZIP file does not exist"
exit /b 1
)
- name: Upload Release as Download
if: github.event_name != 'pull_request'
uses: softprops/action-gh-release@v2
env:
RELEASE_TOKEN: ${{ secrets.RELEASE_TOKEN }}
with:
tag_name: Beta
draft: false
prerelease: true
files: |
${{ env.RELEASE_PATH }}/*.zip
build-arch:
runs-on: ubuntu-latest
container: archlinux:base-devel
steps:
- name: Install dependencies
run: |
pacman -Syu --noconfirm
pacman -S --noconfirm qt5-base qt5-script qt5-svg qt5-tools base-devel git
pacman -S --noconfirm imagemagick
- name: Create user
run: |
useradd builduser -m
passwd -d builduser
echo 'builduser ALL=(ALL) ALL' | tee -a /etc/sudoers
- name: Clone DIE-engine
run: |
cd $HOME
pwd
git clone --recursive https://github.com/horsicq/DIE-engine
- name: Build
run: |
sudo chown -R builduser /__w/DIE-engine/DIE-engine
sudo chown -R builduser /github/home/DIE-engine
cd /github/home/DIE-engine
pwd
sudo -u builduser bash -c 'bash -x build_archpkg.sh'
rm -Rf /__w/DIE-engine/DIE-engine/release/*debug*
rm -Rf /github/home/DIE-engine/release/*debug*
- name: Upload Release as Download
if: github.event_name != 'pull_request'
uses: softprops/action-gh-release@v2
env:
RELEASE_TOKEN: ${{ secrets.RELEASE_TOKEN }}
with:
tag_name: Beta
draft: false
prerelease: true
files: |
/github/home/DIE-engine/release/*.pkg.tar.zst
# build-osx:
# runs-on: macos-latest
# steps:
# - uses: actions/checkout@v4
# with:
# submodules: 'recursive'
# path: ${{ env.SRC_PATH }}
# - name: Install Qt
# uses: jurplel/install-qt-action@v4
# with:
# version: '5.15.2'
# host: 'mac'
# target: 'desktop'
# arch: 'clang_64'
# # I make it match what build_mac.sh expects. Although I could also use Qt5_DIR
# #dir: ${{ env.HOME }}
# dir: /Users/runner
# modules: qtscript
# - name: Build
# working-directory: ${{ env.SRC_PATH }}
# run: |
# bash -x build_mac.sh