51 lines
1.5 KiB
YAML
51 lines
1.5 KiB
YAML
name: Build
|
|
|
|
on:
|
|
push:
|
|
branches: [ "main", "master" ]
|
|
pull_request:
|
|
branches: [ "main", "master" ]
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
submodules: recursive
|
|
|
|
- name: Install tools
|
|
run: |
|
|
sudo apt-get update
|
|
sudo apt-get install -y cmake mingw-w64 libssl-dev dotnet-sdk-8.0
|
|
|
|
- name: Build OpenSSL for MinGW
|
|
run: |
|
|
wget -q https://www.openssl.org/source/openssl-3.3.0.tar.gz
|
|
tar xzf openssl-3.3.0.tar.gz
|
|
cd openssl-3.3.0
|
|
./Configure mingw64 \
|
|
--cross-compile-prefix=x86_64-w64-mingw32- \
|
|
--prefix=/usr/x86_64-w64-mingw32 \
|
|
no-shared no-tests
|
|
make -j$(nproc)
|
|
sudo make install_sw
|
|
|
|
- name: Configure CMake
|
|
run: |
|
|
cmake -B build -S . \
|
|
-DCMAKE_SYSTEM_NAME=Windows \
|
|
-DCMAKE_C_COMPILER=x86_64-w64-mingw32-gcc \
|
|
-DCMAKE_CXX_COMPILER=x86_64-w64-mingw32-g++ \
|
|
-DCMAKE_RC_COMPILER=x86_64-w64-mingw32-windres \
|
|
-DOPENSSL_ROOT_DIR=/usr/x86_64-w64-mingw32 \
|
|
-DOPENSSL_INCLUDE_DIR=/usr/x86_64-w64-mingw32/include \
|
|
-DOPENSSL_LIBRARIES="/usr/x86_64-w64-mingw32/lib/libssl.a;/usr/x86_64-w64-mingw32/lib/libcrypto.a"
|
|
|
|
- name: Build Unlocker
|
|
run: cmake --build build --target dbd-unlocker
|
|
|
|
- name: Build Dumper
|
|
run: dotnet build src/dumper/dbd-dumper.csproj -c Release --runtime win-x64 |