-
Notifications
You must be signed in to change notification settings - Fork 128
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CMake: Raise minimum version to 3.20, add GitHub Actions for BinDiff
- Better support for MSVC runtime on Windows PiperOrigin-RevId: 601758012 Change-Id: I4015c23ba6790ebdbe2405102f8d9885d56f7aca
- Loading branch information
1 parent
76dd947
commit e87083b
Showing
2 changed files
with
88 additions
and
5 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,78 @@ | ||
name: cmake-build | ||
|
||
on: [push, pull_request] | ||
|
||
env: | ||
BUILD_TYPE: Release | ||
|
||
jobs: | ||
build: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
include: | ||
- os: ubuntu-22.04 | ||
- os: macos-12 | ||
- os: windows-2022 | ||
runs-on: ${{ matrix.os }} | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
path: bindiff | ||
- uses: actions/checkout@v4 | ||
with: | ||
repository: google/binexport | ||
path: binexport | ||
|
||
- name: Install ninja-build tool | ||
uses: turtlesec-no/[email protected] | ||
|
||
- name: Create Build Environment | ||
env: | ||
IDASDK_SECRET: ${{ secrets.IDASDK_SECRET }} | ||
working-directory: ${{ github.workspace }} | ||
shell: bash | ||
run: | | ||
mkdir -p "${{ runner.workspace }}/build" \ | ||
ida/idasdk | ||
mv binexport/ida/idasdk/idasdk*.gpg \ | ||
ida/idasdk/ | ||
binexport/.github/scripts/decrypt_secret.sh | ||
unzip -q "${{ runner.workspace }}/build/idasdk_teams80.zip" \ | ||
-d "${{ runner.workspace }}/build/" | ||
- name: Enable Developer Command Prompt (Windows) | ||
if: matrix.os == 'windows-2022' | ||
uses: ilammy/[email protected] | ||
|
||
- name: Enable mold linker (Linux) | ||
if: matrix.os == 'ubuntu-22.04' | ||
uses: rui314/setup-mold@v1 | ||
|
||
- name: Configure CMake | ||
working-directory: ${{ runner.workspace }}/build | ||
shell: bash | ||
run: | | ||
cmake "${{ github.workspace }}/bindiff" -G Ninja \ | ||
"-DCMAKE_BUILD_TYPE=${BUILD_TYPE}" \ | ||
"-DIdaSdk_ROOT_DIR=${{ runner.workspace }}/build/idasdk_teams80" | ||
- name: Build | ||
working-directory: ${{ runner.workspace }}/build | ||
shell: bash | ||
run: cmake --build . --config "${BUILD_TYPE}" | ||
|
||
- name: Test | ||
working-directory: ${{ runner.workspace }}/build | ||
shell: bash | ||
run: ctest --build-config "${BUILD_TYPE}" --output-on-failure -R '^[A-Z]' | ||
|
||
- name: Upload Build Artifacts | ||
uses: actions/[email protected] | ||
with: | ||
name: BinDiff-${{ runner.os }} | ||
path: | | ||
${{ runner.workspace }}/build/bindiff | ||
${{ runner.workspace }}/build/ida/bindiff* | ||
${{ runner.workspace }}/build/tools/bindiff* |
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