Skip to content
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

Switch to Ninja for building the native runtime #6904

Merged
merged 1 commit into from Dec 6, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
12 changes: 10 additions & 2 deletions .github/workflows/build_native_runtime.yml
Expand Up @@ -32,6 +32,14 @@ jobs:
with:
java-version: 11.0.8

- name: Install Ninja (Mac OS)
if: runner.os =='macOS'
run: brew install ninja

- name: Install Ninja (Linux)
if: runner.os =='Linux'
run: sudo apt-get install ninja-build

- name: Cache ICU build output
id: cache-icu
uses: actions/cache@v2
Expand Down Expand Up @@ -61,8 +69,8 @@ jobs:
run: |
mkdir build
cd build
ICU_ROOT_DIR=$HOME/icu-bin cmake -B . -S ../nativeruntime/cpp
make
ICU_ROOT_DIR=$HOME/icu-bin cmake -B . -S ../nativeruntime/cpp -G Ninja
ninja

- name: Rename libnativeruntime for Linux
if: runner.os == 'Linux'
Expand Down
8 changes: 8 additions & 0 deletions .github/workflows/tests.yml
Expand Up @@ -52,6 +52,10 @@ jobs:
make -j4
make install

- name: Install Ninja (Linux)
if: runner.os =='Linux'
run: sudo apt-get install ninja-build

- name: Build
run: ICU_ROOT_DIR=$HOME/icu-bin SKIP_ERRORPRONE=true SKIP_JAVADOC=true ./gradlew clean assemble testClasses --parallel --stacktrace --no-watch-fs

Expand Down Expand Up @@ -93,6 +97,10 @@ jobs:
path: ~/icu-bin
key: ${{ runner.os }}-${{env.CPU_ARCH}}-icu-${{ hashFiles('nativeruntime/external/icu/**') }}

- name: Install Ninja
if: runner.os =='Linux'
run: sudo apt-get install ninja-build

- name: Run unit tests
run: |
ICU_ROOT_DIR=$HOME/icu-bin SKIP_ERRORPRONE=true SKIP_JAVADOC=true ./gradlew test --info --stacktrace --continue \
Expand Down
4 changes: 2 additions & 2 deletions nativeruntime/build.gradle
Expand Up @@ -29,7 +29,7 @@ task cmakeNativeRuntime {
mkdir "$buildDir/cpp"
exec {
workingDir "$buildDir/cpp"
commandLine 'cmake', "-B", ".", "-S","$projectDir/cpp/"
commandLine 'cmake', "-B", ".", "-S","$projectDir/cpp/", "-G", "Ninja"
}
}
}
Expand Down Expand Up @@ -80,7 +80,7 @@ task makeNativeRuntime {
doLast {
exec {
workingDir "$buildDir/cpp"
commandLine 'make'
commandLine 'ninja'
}
}
}
Expand Down