Skip to content

add some doc

add some doc #307

Workflow file for this run

name: Build
on: [push, pull_request]
jobs:
build-cmake:
strategy:
fail-fast: false
matrix:
include:
- name: Windows
os: windows-latest
android: none
- name: Ubuntu
os: ubuntu-22.04
android: none
# - name: MacOS
# os: macOS-latest
# android: none
# - name: Android
# os: ubuntu-latest
# android: arm64
name: ${{ matrix.name }}
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Prepare cmake
uses: lukka/get-cmake@latest
- uses: actions/setup-python@v5
with:
python-version: '3.13'
cache: 'pip' # caching pip dependencies
- name: Pip install requirements
run: |
python -m pip install -r ./engine/engine/refl_code_generator/requirements.txt
- name: Prepare Ubuntu
if: contains(matrix.os, 'ubuntu') && matrix.android == 'none'
run: |
sudo apt update -y
sudo apt install build-essential make pkg-config gnome-desktop-testing libasound2-dev libpulse-dev libaudio-dev libjack-dev libsndio-dev libx11-dev libxext-dev libxrandr-dev libxcursor-dev libxfixes-dev libxi-dev libxss-dev libxkbcommon-dev libdrm-dev libgbm-dev libgl1-mesa-dev libgles2-mesa-dev libegl1-mesa-dev libdbus-1-dev libibus-1.0-dev libudev-dev fcitx-libs-dev libpipewire-0.3-dev libwayland-dev libdecor-0-dev liburing-dev -y
- name: Prepare MacOS
if: contains(matrix.os, 'macOS')
run: |
brew install ninja
- name: Config cmake(Ubuntu&MacOS)
if: ${{ !contains(matrix.os, 'windows') && matrix.android == 'none' }}
working-directory: ./engine
run: |
${{ matrix.cmake-path }}cmake --preset=CI-Linux
- name: Config cmake(Windows)
if: contains(matrix.os, 'windows')
working-directory: ./engine
run: |
${{ matrix.cmake-path}}cmake --preset=CI-Windows
- name: Build under PC
if: matrix.android == 'none'
working-directory: ./engine
run: ${{ matrix.cmake-path }}cmake --build cmake-build
- name: Prepare Android JDK
if: runner.os == 'Linux' && matrix.android != 'none'
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'adopt'
- name: Setup Android SDK
if: runner.os == 'Linux' && matrix.android != 'none'
uses: android-actions/setup-android@v3
- name: Prepare Android Project
if: runner.os == 'Linux' && matrix.android != 'none'
run: |
sudo apt update -y
sudo apt install cmake ninja-build -y
yes | sdkmanager --licenses
cp -r ./engine ./android-project/app/jni/
chmod +x ./android-project/gradlew
- name: Build under Android
if: runner.os == 'Linux' && matrix.android != 'none'
working-directory: ./android-project
run: |
ninja --version
./gradlew build