-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow build on MacOS (MX) #30
Merged
+500
−192
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
d0f69c8
Allow build on MacOS (MX)
DarkaMaul 637a474
ci: Upload artifacts for both 32 and 64 bits build
DarkaMaul 442f0b0
ci: Fix name of artifacts files
DarkaMaul 5c81752
ci: Update GitHub actions to also build on MacOS
DarkaMaul f80877e
Remove leftovers
patacca 0cc2d66
Update CI to support macOS builds
patacca File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 | ||||
---|---|---|---|---|---|---|
|
@@ -9,7 +9,7 @@ jobs: | |||||
build: | ||||||
strategy: | ||||||
matrix: | ||||||
os: [ubuntu-latest, windows-latest] | ||||||
os: [ubuntu-latest, windows-latest, macos-latest] | ||||||
ida_sdk: [74, 77, 80, 81, 82, 83, 84] | ||||||
include: | ||||||
- ida_sdk: 74 | ||||||
|
@@ -30,6 +30,12 @@ jobs: | |||||
ext: so | ||||||
- os: windows-latest | ||||||
ext: dll | ||||||
- os: macos-latest | ||||||
ext: dylib | ||||||
exclude: | ||||||
# We exclude these because ARM libraries were not available in 7.4 and the latest macos runner on GitHub are Mx machines | ||||||
- os: macos-latest | ||||||
ida_sdk: 74 | ||||||
|
||||||
runs-on: ${{ matrix.os }} | ||||||
steps: | ||||||
|
@@ -48,12 +54,12 @@ jobs: | |||||
with: | ||||||
cmake-version: 'latest' | ||||||
|
||||||
- name: Install Ninja (Linux only) | ||||||
if: ${{ matrix.os == 'ubuntu-latest' }} | ||||||
uses: seanmiddleditch/gha-setup-ninja@master | ||||||
- name: Install Ninja (Linux / MacOS) | ||||||
if: ${{ matrix.os == 'ubuntu-latest' || matrix.os == 'macos-latest' }} | ||||||
uses: seanmiddleditch/gha-setup-ninja@v4 | ||||||
|
||||||
- name: Fetch IDA SDKs (Linux) | ||||||
if: ${{ matrix.os == 'ubuntu-latest' && steps.cache-sdk.outputs.cache-hit != 'true' }} | ||||||
- name: Fetch IDA SDKs (Linux / MacOS) | ||||||
if: ${{ (matrix.os == 'ubuntu-latest' || matrix.os == 'macos-latest') && steps.cache-sdk.outputs.cache-hit != 'true' }} | ||||||
run: | | ||||||
cd scripts | ||||||
./fetch_sdk.sh | ||||||
|
@@ -75,6 +81,24 @@ jobs: | |||||
[ -f third_party/$IDA_SDK_VERSION/include/regex.h ] && mv third_party/$IDA_SDK_VERSION/include/regex.h third_party/$IDA_SDK_VERSION/include/regex.bak | ||||||
cmake -B $CMAKE_BUILD_DIR -S $GITHUB_WORKSPACE -G Ninja -DCMAKE_BUILD_TYPE=${BUILD_TYPE} -DIdaSdk_ROOT_DIR=${GITHUB_WORKSPACE}/third_party/$IDA_SDK_VERSION | ||||||
|
||||||
# We need to differentiate MacOS build from Linux because we want to use a specific compiler on MacOS | ||||||
- name: Prepare build environment (MacOS) | ||||||
if: ${{ matrix.os == 'macos-latest' }} | ||||||
env: | ||||||
IDA_SDK_VERSION: idasdk${{ matrix.ida_sdk }} | ||||||
IDA_SDK_PASSWORD: ${{ secrets[matrix.sdk_password] }} | ||||||
CMAKE_BUILD_DIR: build${{ matrix.ida_sdk }} | ||||||
run: | | ||||||
[ ! -d third_party/$IDA_SDK_VERSION ] && unzip -d third_party -P $IDA_SDK_PASSWORD third_party/$IDA_SDK_VERSION.zip | ||||||
[ -f third_party/$IDA_SDK_VERSION/include/regex.h ] && mv third_party/$IDA_SDK_VERSION/include/regex.h third_party/$IDA_SDK_VERSION/include/regex.bak | ||||||
cmake -B $CMAKE_BUILD_DIR \ | ||||||
-S $GITHUB_WORKSPACE \ | ||||||
-G Ninja \ | ||||||
-DCMAKE_BUILD_TYPE=${BUILD_TYPE} \ | ||||||
-DIdaSdk_ROOT_DIR=${GITHUB_WORKSPACE}/third_party/$IDA_SDK_VERSION \ | ||||||
-DCMAKE_C_COMPILER=$(brew --prefix llvm@15)/bin/clang \ | ||||||
-DCMAKE_CXX_COMPILER=$(brew --prefix llvm@15)/bin/clang++ | ||||||
|
||||||
- name: Prepare build environment (Windows) | ||||||
if: ${{ matrix.os == 'windows-latest' }} | ||||||
env: | ||||||
|
@@ -96,16 +120,26 @@ jobs: | |||||
|
||||||
- name: Rename Plugin | ||||||
shell: bash | ||||||
run: | ||||||
mv build${{ matrix.ida_sdk }}/quokka-install/quokka_* ${{ matrix.ida_sdk }}-quokka_plugin0064.${{ matrix.ext }} | ||||||
run: | | ||||||
mv build${{ matrix.ida_sdk }}/quokka-install/quokka_plugin64.${{ matrix.ext }} ${{ matrix.ida_sdk }}-quokka_plugin0064.${{ matrix.ext }} | ||||||
mv build${{ matrix.ida_sdk }}/quokka-install/quokka_plugin.${{ matrix.ext }} ${{ matrix.ida_sdk }}-quokka_plugin0032.${{ matrix.ext }} | ||||||
|
||||||
- name: Upload Artifacts | ||||||
uses: actions/upload-artifact@v4 | ||||||
# We need one action per file | ||||||
# See https://github.com/actions/upload-artifact/issues/331 | ||||||
- name: Upload Artifacts (64) | ||||||
uses: actions/[email protected] | ||||||
with: | ||||||
name: idaplugin-${{ matrix.os }}-${{ matrix.ida_sdk }} | ||||||
path: ${{ matrix.ida_sdk }}-quokka_plugin0064.${{ matrix.ext }} | ||||||
if-no-files-found: error | ||||||
|
||||||
- name: Upload Artifacts (32) | ||||||
uses: actions/[email protected] | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
with: | ||||||
name: idaplugin-${{ matrix.os }}-${{ matrix.ida_sdk }}-32 | ||||||
path: ${{ matrix.ida_sdk }}-quokka_plugin0032.${{ matrix.ext }} | ||||||
if-no-files-found: error | ||||||
|
||||||
upload: | ||||||
name: Upload artifacts for Release | ||||||
needs: [build] | ||||||
|
@@ -114,18 +148,25 @@ jobs: | |||||
|
||||||
strategy: | ||||||
matrix: | ||||||
os: [ubuntu-latest, windows-latest] | ||||||
os: [ubuntu-latest, windows-latest, macos-latest] | ||||||
ida_sdk: [74, 77, 80, 81, 82, 83, 84] | ||||||
bitness: ['', '-32'] | ||||||
include: | ||||||
- os: windows-latest | ||||||
ext: dll | ||||||
- os: ubuntu-latest | ||||||
ext: so | ||||||
- os: macos-latest | ||||||
ext: dylib | ||||||
exclude: | ||||||
- os: macos-latest | ||||||
ida_sdk: 74 | ||||||
|
||||||
steps: | ||||||
- name: Download Artefact | ||||||
uses: actions/download-artifact@v4 | ||||||
with: | ||||||
name: idaplugin-${{ matrix.os }}-${{ matrix.ida_sdk }} | ||||||
name: idaplugin-${{ matrix.os }}-${{ matrix.ida_sdk }}${{ matrix.bitness }} | ||||||
|
||||||
- name: Release | ||||||
uses: softprops/[email protected] | ||||||
|
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
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.