This repository was archived by the owner on Jun 30, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
78 lines (66 loc) · 2.06 KB
/
Copy pathci.yml
File metadata and controls
78 lines (66 loc) · 2.06 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
name: CI
on:
push:
branches: [ "main", "*-ci-*" ]
pull_request:
branches: [ "main" ]
env:
ANDROID_ROOT: /usr/local/lib/android
ANDROID_SDK_ROOT: /usr/local/lib/android/sdk
NDK_VERSION: 23.2.8568313
jobs:
build:
strategy:
fail-fast: false
matrix:
config:
- preset: android-arm
os: ubuntu-latest
target: android
- preset: android-arm64
os: ubuntu-latest
target: android
- preset: linux-x64
os: ubuntu-latest
target: linux
- preset: windows-x64
os: windows-latest
target: windows
runs-on: ${{matrix.config.os}}
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: System Dependencies
if: runner.os == 'linux'
run: |
sudo apt-get update -y
sudo apt-get install cmake ninja-build -y
- uses: actions/setup-java@v1
if: matrix.config.target == 'android'
with:
java-version: "11.x"
- name: Configure NDK
if: matrix.config.target == 'android'
run: |
SDKMANAGER=${ANDROID_SDK_ROOT}/cmdline-tools/latest/bin/sdkmanager
echo "y" | $SDKMANAGER "ndk;$NDK_VERSION"
echo ANDROID_NDK_HOME=${ANDROID_SDK_ROOT}/ndk/${NDK_VERSION} >> $env:GITHUB_ENV
- name: Configure the Build
run: |
cmake -S . --preset ${{matrix.config.preset}}
- name: Build Debug
run: cmake --build --preset ${{matrix.config.preset}} --config Debug
- name: Build Release
run: cmake --build --preset ${{matrix.config.preset}} --config Release
- name: Run LLD on Tests Linux
if: matrix.config.target == 'linux'
run: |
find build/${{matrix.config.preset}}/tests -name '*-test' | xargs ldd || true
- name: Run LLD on Tests Windows
if: matrix.config.target == 'windows'
run: |
ldd build/${{matrix.config.preset}}/tests/**/*-test.exe
- name: Run Tests
if: matrix.config.target != 'android'
run: |
ctest --preset ${{matrix.config.preset}}