Skip to content

Commit

Permalink
Merge pull request #1 from mrexodia/gh-actions
Browse files Browse the repository at this point in the history
GitHub Actions
  • Loading branch information
expend20 authored Sep 9, 2022
2 parents de2e023 + 843569f commit 4d5dcdd
Show file tree
Hide file tree
Showing 6 changed files with 78 additions and 7 deletions.
69 changes: 69 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
name: Rust

on: [push, pull_request]

jobs:
build:
# Skip building pull requests from the same repository
if: ${{ github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository) }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [windows-2019]
env:
BUILD_TYPE: Release
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Cache LLVM and Clang
id: cache-llvm
uses: actions/cache@v2
with:
path: |
C:/Program Files/LLVM
./llvm
key: llvm-14.0.6

- name: Install LLVM and Clang
uses: KyleMayes/install-llvm-action@c538b5e281d5fc40848a3a62636a3a2b6f5a1cfa
with:
version: "14.0.6"
cached: ${{ steps.cache-llvm.outputs.cache-hit }}

- name: Rust toolchain
run: |
rustup set auto-self-update disable
rustup toolchain install beta --profile minimal
rustup default beta
set LIBCLANG_PATH=C:\Program Files\LLVM\bin
- uses: Swatinem/rust-cache@6720f05bc48b77f96918929a9019fb2203ff71f8

- name: Build
run: |
cargo build --release --all-features
mkdir bin\x64\plugins
copy target\release\x64dbg_ext.dll bin\x64\plugins\ext.dp64
- name: Upload artifacts
uses: actions/upload-artifact@v2
with:
name: ${{ github.event.repository.name }}-${{ matrix.os }}
path: bin/*

- name: Compress artifacts
uses: vimtor/action-zip@d78955ce8ce0b145b9f777076e53e1869efcadf6
with:
files: bin/
dest: ${{ github.event.repository.name }}-${{ github.sha }}.zip

- name: Release
uses: softprops/action-gh-release@1e07f4398721186383de40550babbdf2b84acfc5
if: ${{ startsWith(github.ref, 'refs/tags/') }}
with:
prerelease: ${{ !startsWith(github.ref, 'refs/tags/v') || contains(github.ref, '-pre') }}
files: ${{ github.event.repository.name }}-${{ github.sha }}.zip
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
target/
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 2 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,8 @@ edition = "2021"
crate-type=["dylib"]

[dependencies]
# due to unmerged PR of updates to bindings https://github.com/luyikk/dbg64_plugins/pull/1
# please use my fork for now https://github.com/expend20/dbg64_plugins/tree/update-01-09-2022
x64dbg_sdk_sys = { path = "../dbg64_plugins_fork" }
# waiting for: https://github.com/luyikk/dbg64_plugins/pull/1
x64dbg_sdk_sys = { git = "https://github.com/expend20/dbg64_plugins", branch = "update-01-09-2022" }
iced-x86 = "1.17.0"
unicorn-engine = "2.0.0"
lazy_static = "1"

8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,18 @@ Here is how `context` looks like:

# Build

Set `LIBCLANG_PATH` for bindgen to work
You need at least rust 1.64.0 (at the time of writing beta: `rustup install beta`)

Set `LIBCLANG_PATH` for bindgen to work.

```
set LIBCLANG_PATH=C:\Program Files\LLVM\bin
cargo build --release
rustup run beta cargo build --release
```

## Development build

Build [PluginDebHelper](https://github.com/x64dbg/PluginDevHelper), then:
Build [PluginDevHelper](https://github.com/x64dbg/PluginDevHelper), then:

```
mklink target\release\x64dbg_ext.dll <x64dbg plugins>\ext.dp64
Expand Down
Binary file removed bin/ext.dp64
Binary file not shown.

0 comments on commit 4d5dcdd

Please sign in to comment.