From 32b59539fe192e0b125a31735f8c5f8401b07376 Mon Sep 17 00:00:00 2001 From: neru Date: Fri, 20 Mar 2026 21:55:09 -0300 Subject: [PATCH] build: change approach --- .github/workflows/build.yml | 35 +++++++++++++++++++++-------------- 1 file changed, 21 insertions(+), 14 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 4a473ac..a05fdb0 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -10,29 +10,36 @@ on: jobs: build: runs-on: ubuntu-latest - + steps: - uses: actions/checkout@v4 with: submodules: recursive - - - name: Install cross-compilation tools + + - name: Install tools run: | sudo apt-get update - sudo apt-get install -y cmake gcc-mingw-w64-x86-64 g++-mingw-w64-x86-64 dotnet-sdk-8.0 - - - name: Configure CMake for Windows + sudo apt-get install -y cmake mingw-w64 libssl-dev dotnet-sdk-8.0 + + - name: Install OpenSSL for MinGW + run: | + wget -q https://github.com/nicowillis/openssl-mingw/releases/download/3.3.0/openssl-3.3.0-mingw64.tar.gz -O openssl-mingw.tar.gz || true + sudo apt-get install -y libssl-dev:amd64 2>/dev/null || true + sudo apt-get install -y libssl-mingw-w64 2>/dev/null || true + + - name: Configure CMake run: | cmake -B build -S . \ - -DCMAKE_TOOLCHAIN_FILE=/usr/share/mingw-w64/toolchain-x86_64.cmake \ -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 - + -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 --config Release --target dbd-unlocker - - - name: Build Dumper (Windows) - run: dotnet build src/dumper/dbd-dumper.csproj -c Release --runtime win-x64 - \ No newline at end of file + run: cmake --build build --target dbd-unlocker + + - name: Build Dumper + run: dotnet build src/dumper/dbd-dumper.csproj -c Release --runtime win-x64 \ No newline at end of file