-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
upgrade to the latest lief version (#86)
* upgrade to the latest lief version * fix formatting * LIEF dropped MT postfix for windows, we will need to test the debug build to see if that also needs to change * update version.txt to 0.0.2 * add caching to speed up windows debug dependency builds Co-authored-by: Farzon Lotfi <[email protected]>
- Loading branch information
Showing
9 changed files
with
239 additions
and
23 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,133 @@ | ||
name: CMake Debug | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
branches: | ||
- '**' | ||
|
||
env: | ||
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.) | ||
BUILD_TYPE: Debug | ||
|
||
jobs: | ||
build: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest, macos-latest, windows-2019] | ||
include: | ||
- os: ubuntu-latest | ||
artifact_dlib_ext: .so | ||
artifact_staticlib_ext: .a | ||
- os: windows-2019 | ||
artifact_exec_ext: .exe | ||
artifact_dlib_ext: .dll | ||
artifact_staticlib_ext: .lib | ||
# Note: I wanted to use env.BUILD_TYPE, but it isn't taking | ||
#artifact_out_dir: ${{ BUILD_TYPE }}/ | ||
artifact_out_dir: Debug/ | ||
artifact_os_name: Windows | ||
artifact_arch: x86_64 | ||
- os: macos-latest | ||
artifact_dlib_ext: .dylib | ||
artifact_staticlib_ext: .a | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- run: | | ||
sudo apt install libcapstone-dev nasm mingw-w64 libedit-dev \ | ||
libgl1-mesa-dev mesa-utils libgl1-mesa-glx libxrandr-dev \ | ||
libxinerama-dev libxcursor-dev libxi-dev | ||
if: matrix.os == 'ubuntu-latest' | ||
- run: brew install capstone nasm mingw-w64 glfw glm | ||
if: matrix.os == 'macOS-latest' | ||
- run: choco install python3 nasm | ||
if: matrix.os == 'windows-2019' | ||
- name: Create Build Environment | ||
# Some projects don't allow in-source building, so create a separate build directory | ||
# We'll use this as our working directory for all subsequent commands | ||
run: cmake -E make_directory ${{github.workspace}}/build | ||
- name: Cache C++ dependencies in Packages Directory | ||
uses: actions/cache@v3 | ||
with: | ||
path: | | ||
${{github.workspace}}/packages | ||
key: ${{ runner.OS }}-c++-packages-cache-${{ hashFiles('${{github.workspace}}/depsCache.json') }} | ||
restore-keys: | | ||
${{ runner.OS }}-c++-packages-cache | ||
#NOTE: this is temporary until i understand a bit more why i can't build binutil | ||
# Monitored with issue-32 https://github.com/farzonl/Disassembler/issues/32 | ||
- name: Configure CMake (Mac) | ||
if: matrix.os == 'macOS-latest' | ||
# Use a bash shell so we can use the same syntax for environment variable | ||
# access regardless of the host operating system | ||
shell: bash | ||
working-directory: ${{github.workspace}}/build | ||
# Note the current convention is to use the -S and -B options here to specify source | ||
# and build directories, but this is only available with CMake 3.13 and higher. | ||
# The CMake binaries on the Github Actions machines are (as of this writing) 3.12 | ||
run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE | ||
|
||
- name: Configure CMake (Linux\Windows) | ||
if: matrix.os == 'ubuntu-latest' || matrix.os == 'windows-2019' | ||
# Use a bash shell so we can use the same syntax for environment variable | ||
# access regardless of the host operating system | ||
shell: bash | ||
working-directory: ${{github.workspace}}/build | ||
# Note the current convention is to use the -S and -B options here to specify source | ||
# and build directories, but this is only available with CMake 3.13 and higher. | ||
# The CMake binaries on the Github Actions machines are (as of this writing) 3.12 | ||
run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DBUILD_INT_TESTS=true | ||
|
||
- name: Build | ||
working-directory: ${{github.workspace}}/build | ||
shell: bash | ||
# Execute the build. You can specify a specific target with "--target <NAME>" | ||
run: cmake --build . --config $BUILD_TYPE | ||
|
||
- name: Test (Unix-like) | ||
if: matrix.os == 'ubuntu-latest' || matrix.os == 'macOS-latest' | ||
working-directory: ${{github.workspace}}/build | ||
shell: bash | ||
# Execute tests defined by the CMake configuration. | ||
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail | ||
run: ./src/test/Disassembler_TEST | ||
|
||
- name: Test Windows | ||
if: matrix.os == 'windows-2019' | ||
working-directory: ${{github.workspace}}/build | ||
shell: bash | ||
# Execute tests defined by the CMake configuration. | ||
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail | ||
run: ./src/test/$BUILD_TYPE/Disassembler_TEST.exe | ||
- name: Prepare Binaries for upload (Mac\Linux) | ||
if: matrix.os == 'ubuntu-latest' || matrix.os == 'macOS-latest' | ||
shell: bash | ||
run: | | ||
mkdir ${{github.workspace}}/artifacts | ||
cp build/src/libDisassembler${{ matrix.artifact_staticlib_ext }} ${{github.workspace}}/artifacts | ||
cp build/src/cli/disasm ${{github.workspace}}/artifacts | ||
cp build/src/gui/disasm-gui ${{github.workspace}}/artifacts | ||
cp build/plugins/xedPlugin/libxedPlugin${{ matrix.artifact_dlib_ext }} ${{github.workspace}}/artifacts | ||
pushd ${{github.workspace}} | ||
zip -r Gozihr-$(uname -s)-$(uname -m).zip artifacts | ||
popd | ||
- name: Prepare Binaries for upload (windows) | ||
if: matrix.os == 'windows-2019' | ||
shell: powershell | ||
run: | | ||
[system.io.directory]::CreateDirectory("${{github.workspace}}/artifacts") | ||
Copy-Item "build/src/${{ matrix.artifact_out_dir}}Disassembler${{ matrix.artifact_staticlib_ext }}" -Destination "${{github.workspace}}/artifacts" | ||
Copy-Item "build/src/cli/${{ matrix.artifact_out_dir }}disasm${{ matrix.artifact_exec_ext }}" -Destination "${{github.workspace}}/artifacts" | ||
Copy-Item "build/src/gui/${{ matrix.artifact_out_dir }}disasm-gui${{ matrix.artifact_exec_ext }}" -Destination "${{github.workspace}}/artifacts" | ||
Copy-Item "build/plugins/xedPlugin/${{ matrix.artifact_out_dir }}xedPlugin${{ matrix.artifact_dlib_ext }}" -Destination "${{github.workspace}}/artifacts" | ||
Compress-Archive -Path ${{github.workspace}}/artifacts/* -DestinationPath Gozihr-${{matrix.artifact_os_name}}-${{matrix.artifact_arch}}.zip | ||
- name: 'Upload Pull Request Artifact' | ||
uses: actions/upload-artifact@v3 | ||
if: startsWith(github.ref, 'refs/pull/') | ||
with: | ||
name: Gozihr Pull Request Artifacts | ||
path: Gozihr-*.zip | ||
retention-days: 5 |
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
{ | ||
"LIEF" : { | ||
"Src": "465563d8342e148a3d82b6b1cb36bd11", | ||
"Linux": "eb604e6d494e86a888e41ef4df549b3a", | ||
"Windows" : "ca4665c47fb6d4b68a30199195fa7037", | ||
"MacOS": "5d609361f22b6f9a8dc22f2c6fb541a7" | ||
}, | ||
"Catch2" : { | ||
"Src": "209cbb2f8f37224cc5f7261cf9388bc2" | ||
}, | ||
"CMDParser" : { | ||
"Src": "8449f7da1097659698193bc0ddb24ef7" | ||
}, | ||
"nlohmannJson" : { | ||
"Src": "7804b38146921d03374549c9e2a5e3acda097814c43caf2b96a0278e58df26e0" | ||
}, | ||
"Capstone" : { | ||
"Windows": "a6ad5a3bd6842cb7fadc3f3e5ed8bf20" | ||
}, | ||
"myers-diff" : { | ||
"Src" : "90486b3453ab76ab2a1498dc64c79060" | ||
}, | ||
"glad" : { | ||
"Src" : "262e8984dbde2f359207ffa8e609aa50" | ||
}, | ||
"glfw3" : { | ||
"Src": "f794d9ad899a64894782884be79d644b" | ||
}, | ||
"imgui" : { | ||
"Src": "78af0cf170fb3f2a431eb39cac7f55b8" | ||
}, | ||
"ImGuiFileDialog": { | ||
"Src" : "13e1abe33aeb0b869307a238967038ae" | ||
} | ||
} |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
0.0.1 | ||
0.0.2 |