Skip to content

Commit

Permalink
Add a build job to the CI
Browse files Browse the repository at this point in the history
  • Loading branch information
ergrelet committed Jul 28, 2024
1 parent ebe500c commit 76e590b
Show file tree
Hide file tree
Showing 5 changed files with 17,435 additions and 0 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Build

on: [push]

jobs:
build_windows:
runs-on: windows-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Install stable toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
override: true

- name: Build binaryninja-core placeholder
working-directory: ${{ runner.workspace }}/ci/binaryninja-api
run: |
cmake -B build
cmake --build build --config Release
- name: Build
run: cargo build --release
36 changes: 36 additions & 0 deletions ci/binaryninja-api/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
project(binaryninja-api)

include(FetchContent)

if(TRITON_BN_BINARYNINJA_CHANNEL STREQUAL "stable")
set(_triton_bn_binaryninjacore_suffix "_stable")
set(_triton_bn_binaryninja_git_tag "v4.0.4958-stable")
else()
set(_triton_bn_binaryninjacore_suffix "")
set(_triton_bn_binaryninja_git_tag
"68ac3ce7b8442c4a5bcc8259dd1fa156cdcefa03") # 2024-04-05
endif()
FetchContent_Declare(binaryninjaapi
GIT_REPOSITORY https://github.com/Vector35/binaryninja-api.git
GIT_TAG ${_triton_bn_binaryninja_git_tag}
)
FetchContent_GetProperties(binaryninjaapi)
if(NOT binaryninjaapi_POPULATED)
FetchContent_Populate(binaryninjaapi) # For binaryninjaapi_SOURCE_DIR
endif()
add_library(binaryninjacore SHARED
binaryninjacore${_triton_bn_binaryninjacore_suffix}.cc
)
set_target_properties(binaryninjacore PROPERTIES
SOVERSION 1
)
target_include_directories(binaryninjacore PRIVATE
"${binaryninjaapi_SOURCE_DIR}"
)
set(CORE_LIBRARY binaryninjacore)
set(BN_CORE_LIBRARY "${CORE_LIBRARY}")
set(HEADLESS TRUE)
if(binaryninjaapi_POPULATED)
add_subdirectory("${binaryninjaapi_SOURCE_DIR}" "${binaryninjaapi_BINARY_DIR}")
endif()
add_library(BinaryNinja::API ALIAS binaryninjaapi)
Loading

0 comments on commit 76e590b

Please sign in to comment.