HyperDbg Source Snapshot #81
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build HyperDbg Unified Driver | |
| on: | |
| push: | |
| branches: | |
| - master | |
| - dev | |
| pull_request: | |
| branches: | |
| - master | |
| - dev | |
| workflow_dispatch: | |
| schedule: | |
| - cron: '0 */6 * * *' | |
| env: | |
| WDK_URL: https://go.microsoft.com/fwlink/?linkid=2196230 | |
| BUILD_DIR: ./build | |
| CONFIG: Release | |
| FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true | |
| jobs: | |
| build-and-release: | |
| runs-on: windows-2022 | |
| permissions: | |
| contents: write | |
| strategy: | |
| matrix: | |
| BUILD_CONFIGURATION: [Release] | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Clone HyperDbg repository | |
| run: | | |
| git clone --recursive -b dev https://github.com/HyperDbg/HyperDbg.git HyperDbg | |
| - name: Apply compilation fix patch | |
| working-directory: . | |
| run: | | |
| cd HyperDbg | |
| git apply --check -p1 ../driver_compilation_fix.patch | |
| git apply -p1 ../driver_compilation_fix.patch | |
| - name: Setup WDK version 22H2 | |
| run: | | |
| $wdkSetupPath = "$Env:TEMP\wdksetup.exe" | |
| (New-Object Net.WebClient).DownloadFile('${{env.WDK_URL}}', $wdkSetupPath) | |
| Start-Process -FilePath $wdkSetupPath -ArgumentList "/quiet" -NoNewWindow -Wait | |
| - name: Add MSBuild to PATH | |
| uses: microsoft/setup-msbuild@v1.1 | |
| - name: Setup CMake | |
| uses: jwlawson/actions-setup-cmake@v2 | |
| with: | |
| cmake-version: '3.28' | |
| - name: Create build directory | |
| run: | | |
| if (Test-Path $env:BUILD_DIR) { | |
| Remove-Item -Path $env:BUILD_DIR -Recurse -Force | |
| } | |
| New-Item -ItemType Directory -Path $env:BUILD_DIR | Out-Null | |
| - name: Configure CMake | |
| working-directory: ${{env.BUILD_DIR}} | |
| run: | | |
| cmake -G "Visual Studio 17 2022" -A x64 -DCMAKE_BUILD_TYPE=${{matrix.BUILD_CONFIGURATION}} .. | |
| - name: Build with CMake | |
| working-directory: ${{env.BUILD_DIR}} | |
| run: | | |
| cmake --build . --config ${{matrix.BUILD_CONFIGURATION}} | |
| - name: List build outputs | |
| working-directory: ${{env.BUILD_DIR}} | |
| run: | | |
| Write-Host "=== Build Output Directory ===" | |
| Get-ChildItem -Path ${{matrix.BUILD_CONFIGURATION}} -Recurse | Select-Object FullName, Length | |
| - name: Upload driver artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: driver_${{matrix.BUILD_CONFIGURATION}} | |
| path: | | |
| ${{env.BUILD_DIR}}/${{matrix.BUILD_CONFIGURATION}}/*.sys | |
| ${{env.BUILD_DIR}}/${{matrix.BUILD_CONFIGURATION}}/*.pdb | |
| - name: Create HyperDbg archive | |
| if: matrix.BUILD_CONFIGURATION == 'Release' | |
| working-directory: . | |
| run: | | |
| tar --zstd -cvf HyperDbg.tar.zst HyperDbg | |
| - name: Upload HyperDbg archive | |
| if: matrix.BUILD_CONFIGURATION == 'Release' | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: hyperdbg_archive | |
| path: HyperDbg.tar.zst | |
| deploy-release: | |
| name: Deploy Release | |
| needs: build-and-release | |
| runs-on: windows-2022 | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Download driver artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: driver_Release | |
| path: ./ | |
| - name: Download HyperDbg archive | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: hyperdbg_archive | |
| path: ./ | |
| - name: Get HyperDbg commit info | |
| id: hyperdbg_info | |
| working-directory: HyperDbg | |
| run: | | |
| $commit = git rev-parse HEAD | |
| $date = git log -1 --format=%cd --date=short | |
| echo "commit=$commit" >> $env:GITHUB_OUTPUT | |
| echo "date=$date" >> $env:GITHUB_OUTPUT | |
| - name: Create Release | |
| uses: softprops/action-gh-release@v1 | |
| with: | |
| tag_name: latest | |
| name: HyperDbg Unified Driver - Latest | |
| files: | | |
| *.sys | |
| *.pdb | |
| HyperDbg.tar.zst | |
| body: | | |
| HyperDbg Unified Driver - Latest Build | |
| Build Configuration: Release | |
| Build Date: ${{ steps.hyperdbg_info.outputs.date }} | |
| HyperDbg Commit: ${{ steps.hyperdbg_info.outputs.commit }} | |
| Unified Repo Commit: ${{ github.sha }} | |
| This release is automatically updated with each successful build. | |
| draft: false | |
| prerelease: true | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |