-
Notifications
You must be signed in to change notification settings - Fork 574
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
i#2154 Android64: Simplify build and add GitHub CI workflow (#7248)
Adds a job to the GitHub CI that builds DynamoRIO for AArch64 Android. This patch also simplifies the 64-bit Android CMake file to remove the need for the user to build `zlib`, instead allowing CMake to find the `zlib` included in the NDK. Also, the user now only needs to pass the root folder of the NDK, and a bug relating to the default Android API level has been fixed. The Android CMake files have also been renamed to better reflect their differences - i.e. they are now named `gcc` & `llvm` rather than `android` and `android-aarch64` (the latter is arch-independent). Issue: #2154
- Loading branch information
1 parent
8fb15c2
commit 93bc28e
Showing
4 changed files
with
119 additions
and
35 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 |
---|---|---|
|
@@ -212,7 +212,7 @@ jobs: | |
|
||
- run: git fetch --no-tags --depth=1 origin master | ||
|
||
# Fetch and install Android NDK for Andoid cross-compile build. | ||
# Fetch and install Android NDK for Android cross-compile build. | ||
- name: Create Build Environment | ||
run: | | ||
sudo apt-get update | ||
|
@@ -241,7 +241,7 @@ jobs: | |
DYNAMORIO_ANDROID_TOOLCHAIN: /tmp/android-gcc-arm-ndk-10e | ||
CI_TRIGGER: ${{ github.event_name }} | ||
CI_BRANCH: ${{ github.ref }} | ||
run: ./suite/runsuite_wrapper.pl automated_ci | ||
run: ./suite/runsuite_wrapper.pl automated_ci 32_only | ||
|
||
- name: Send failure mail to dynamorio-devs | ||
if: failure() && github.ref == 'refs/heads/master' | ||
|
@@ -267,6 +267,72 @@ jobs: | |
to: [email protected] | ||
from: Github Action CI | ||
|
||
# Android AArch64 cross-compile with LLVM, no tests: | ||
android-aarch64-cross-compile: | ||
runs-on: ubuntu-22.04 | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
submodules: true | ||
|
||
# Cancel any prior runs for a PR (but do not cancel master branch runs). | ||
- uses: n1hility/cancel-previous-runs@v2 | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
if: ${{ github.event_name == 'pull_request' }} | ||
|
||
- run: git fetch --no-tags --depth=1 origin master | ||
|
||
# Fetch the Android NDK for Android cross-compile build. | ||
- name: Create Build Environment | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get -y install doxygen vera++ | ||
cd /tmp | ||
wget https://dl.google.com/android/repository/android-ndk-r27c-linux.zip | ||
unzip -q android-ndk-r27c-linux.zip | ||
export ANDROID_NDK_ROOT=/tmp/android-ndk-r27c | ||
- name: Setup cmake | ||
uses: lukka/get-cmake@latest | ||
with: | ||
cmakeVersion: '3.26.4' | ||
|
||
- name: Run Suite | ||
working-directory: ${{ github.workspace }} | ||
env: | ||
DYNAMORIO_CROSS_ANDROID_ONLY: yes | ||
DYNAMORIO_ANDROID_NDK: /tmp/android-ndk-r27c | ||
DYNAMORIO_ANDROID_API_LEVEL: 35 | ||
CI_TRIGGER: ${{ github.event_name }} | ||
CI_BRANCH: ${{ github.ref }} | ||
run: ./suite/runsuite_wrapper.pl automated_ci 64_only | ||
|
||
- name: Send failure mail to dynamorio-devs | ||
if: failure() && github.ref == 'refs/heads/master' | ||
uses: dawidd6/action-send-mail@v2 | ||
with: | ||
server_address: smtp.gmail.com | ||
server_port: 465 | ||
username: ${{secrets.DYNAMORIO_NOTIFICATION_EMAIL_USERNAME}} | ||
password: ${{secrets.DYNAMORIO_NOTIFICATION_EMAIL_PASSWORD}} | ||
subject: | | ||
[${{github.repository}}] ${{github.workflow}} FAILED | ||
on ${{github.event_name}} at ${{github.ref}} | ||
body: | | ||
Github Actions CI workflow run FAILED! | ||
Workflow: ${{github.workflow}}/android-aarch64-cross-compile | ||
Repository: ${{github.repository}} | ||
Branch ref: ${{github.ref}} | ||
SHA: ${{github.sha}} | ||
Triggering actor: ${{github.actor}} | ||
Triggering event: ${{github.event_name}} | ||
Run Id: ${{github.run_id}} | ||
See more details on github.com/DynamoRIO/dynamorio/actions/runs/${{github.run_id}} | ||
to: [email protected] | ||
from: Github Action CI | ||
|
||
# AArch64 drdecode and drmemtrace on x86: | ||
a64-on-x86: | ||
runs-on: ubuntu-20.04 | ||
|
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