Skip to content

Commit

Permalink
DEBUGINFRA-1118: Create workflows for building Linux with GCC, with C…
Browse files Browse the repository at this point in the history
…lang and Android with NDK
  • Loading branch information
lb991 committed Jul 17, 2024
1 parent d73f610 commit 622eabc
Show file tree
Hide file tree
Showing 3 changed files with 85 additions and 0 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/android-clang.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Build for Android with Clang using the NDK

on:
workflow_dispatch:
pull_request:
branches:
- main

jobs:
build:
runs-on: ubuntu-22.04

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up JDK
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: '21'

- name: Download and set up Android NDK
run: |
wget https://dl.google.com/android/repository/android-ndk-r27-linux.zip
unzip android-ndk-r27-linux.zip
echo "export ANDROID_NDK_HOME=$GITHUB_WORKSPACE/android-ndk-r27" >> $GITHUB_ENV
echo "export PATH=$ANDROID_NDK_HOME/toolchains/llvm/prebuilt/linux/bin:$PATH" >> $GITHUB_ENV
- name: Build with Clang and Android NDK
run: |
mkdir -p build
cd build
cmake -DCMAKE_TOOLCHAIN_FILE=$ANDROID_NDK_HOME/build/cmake/android.toolchain.cmake -DANDROID_ABI=arm64-v8a -DANDROID_PLATFORM=android-23 ..
make
25 changes: 25 additions & 0 deletions .github/workflows/linux-clang.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Build for Linux with Clang

on:
workflow_dispatch:
pull_request:
branches:
- main

jobs:
build:
runs-on: ubuntu-22.04

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Clang
run: sudo apt-get install -y clang

- name: Build with Clang
run: |
mkdir -p build
cd build
cmake -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ ..
make
25 changes: 25 additions & 0 deletions .github/workflows/linux-gcc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Build for Linux with GCC

on:
workflow_dispatch:
pull_request:
branches:
- main

jobs:
build:
runs-on: ubuntu-22.04

steps:
- name: Git checkout
uses: actions/checkout@v4

- name: Set up GCC
run: sudo apt-get install -y build-essential

- name: Build with GCC
run: |
mkdir -p build
cd build
cmake -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ ..
make

0 comments on commit 622eabc

Please sign in to comment.