mirror of
https://github.com/HyperDbg/HyperDbg.git
synced 2026-07-10 09:39:36 +00:00
118 lines
3.5 KiB
YAML
118 lines
3.5 KiB
YAML
name: vs2022-ci
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
|
|
# Disabled, uncomment the below line and remove the above lines to activate
|
|
# on:
|
|
# push:
|
|
# branches:
|
|
# - master
|
|
# - dev
|
|
# tags:
|
|
# - 'v*'
|
|
# paths-ignore:
|
|
# - '.gitignore'
|
|
# - '.gitattributes'
|
|
# - '**.cmd'
|
|
# - '**.bat'
|
|
# - '**.md'
|
|
#
|
|
# pull_request:
|
|
# paths-ignore:
|
|
# - '.gitignore'
|
|
# - '.gitattributes'
|
|
# - '**.cmd'
|
|
# - '**.bat'
|
|
# - '**.md'
|
|
|
|
env:
|
|
# WDK for Windows 11, version 22H2
|
|
WDK_URL: https://go.microsoft.com/fwlink/?linkid=2196230
|
|
|
|
# Path to the solution file relative to the root of the project.
|
|
SOLUTION_FILE_PATH: ./hyperdbg/hyperdbg.sln
|
|
|
|
RELEASE_ZIP_FILE_NAME: hyperdbg
|
|
|
|
BUILD_BIN_DIR: ./hyperdbg/build/bin/
|
|
|
|
# Zydis library
|
|
# ZYDIS_REPO_PATH: hyperdbg/dependencies/zydis/
|
|
# ZYDIS_SOLUTION_PATH: hyperdbg/dependencies/zydis/msvc/Zydis.sln
|
|
# ZYDIS_BIN_DIR: hyperdbg/libraries/zydis
|
|
|
|
jobs:
|
|
win-amd64-build:
|
|
runs-on: windows-2022
|
|
strategy:
|
|
matrix:
|
|
BUILD_CONFIGURATION: [release, debug]
|
|
PLATFORM: [x64]
|
|
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
submodules: recursive
|
|
|
|
- name: Checkout submodules recursively
|
|
run: git submodule update --init --recursive --remote
|
|
|
|
# - name: Useful default vars
|
|
# run: |
|
|
# echo "GITHUB_WORKSPACE: $GITHUB_WORKSPACE"
|
|
# echo "github.workspace: ${{ github.workspace }}"
|
|
|
|
- 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: Build third-party dependencies (Release Mode)
|
|
# working-directory: ${{env.GITHUB_WORKSPACE}}
|
|
# run: msbuild /m /p:Configuration="Release MT" /p:Platform=${{matrix.PLATFORM}} /target:zydis /target:zycore /p:OutDir=${{ github.workspace }}/hyperdbg/libraries/zydis/ ${{ github.workspace }}/hyperdbg/dependencies/zydis/msvc/Zydis.sln
|
|
|
|
- name: Build HyperDbg solution
|
|
working-directory: ${{env.GITHUB_WORKSPACE}}
|
|
run: msbuild /m /p:Configuration=${{matrix.BUILD_CONFIGURATION}} /p:Platform=${{matrix.PLATFORM}} ${{env.SOLUTION_FILE_PATH}}
|
|
|
|
- name: Upload build directory
|
|
uses: actions/upload-artifact@v4.4.0
|
|
with:
|
|
name: build_files_${{matrix.BUILD_CONFIGURATION}}
|
|
path: ${{ env.BUILD_BIN_DIR }}
|
|
|
|
deploy-release:
|
|
name: Deploy release
|
|
needs: win-amd64-build
|
|
runs-on: windows-2022
|
|
|
|
if: startsWith(github.ref, 'refs/tags/')
|
|
steps:
|
|
- name: Download build files from "build" job
|
|
uses: actions/download-artifact@v4.1.7
|
|
with:
|
|
name: build_files_release
|
|
path: ${{ env.BUILD_BIN_DIR }}
|
|
|
|
- name: Archive release
|
|
uses: thedoctor0/zip-release@master
|
|
with:
|
|
path: ${{ env.BUILD_BIN_DIR }}release/
|
|
type: 'zip'
|
|
filename: ${{env.RELEASE_ZIP_FILE_NAME}}-${{ github.ref_name }}.zip
|
|
|
|
- name: Release
|
|
uses: softprops/action-gh-release@v1
|
|
if: startsWith(github.ref, 'refs/tags/')
|
|
with:
|
|
files: |
|
|
${{env.RELEASE_ZIP_FILE_NAME}}-${{ github.ref_name }}.zip
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|