mirror of
https://github.com/lvgl/lvgl.git
synced 2026-05-10 04:37:55 +08:00
ci: build docs on pr (#8089)
This commit is contained in:
@@ -1,14 +1,30 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
# These variables allow us to specify an alternate repository URL and commit reference
|
||||
# This is particularly useful when running in CI environments for pull requests
|
||||
# where we need to build from the contributor's forked repository
|
||||
REPO_URL="${1:-}"
|
||||
COMMIT_REF="${2:-}"
|
||||
|
||||
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
|
||||
CURRENT_REF="$(git rev-parse HEAD)"
|
||||
rm -rf emscripten_builder
|
||||
git clone https://github.com/lvgl/lv_sim_emscripten.git emscripten_builder
|
||||
scripts/genexamplelist.sh > emscripten_builder/examplelist.c
|
||||
cd emscripten_builder
|
||||
git submodule update --init -- lvgl
|
||||
cd lvgl
|
||||
git checkout $CURRENT_REF
|
||||
if [ -n "$REPO_URL" ] && [ -n "$COMMIT_REF" ]; then
|
||||
echo "Using provided repo URL: $REPO_URL and commit ref: $COMMIT_REF for lvgl submodule"
|
||||
git remote set-url origin "$REPO_URL"
|
||||
git fetch origin
|
||||
git checkout "$COMMIT_REF"
|
||||
else
|
||||
CURRENT_REF="$(git rev-parse HEAD)"
|
||||
echo "Using current commit ref: $CURRENT_REF for lvgl"
|
||||
git checkout "$CURRENT_REF"
|
||||
fi
|
||||
cd ..
|
||||
mkdir cmbuild
|
||||
cd cmbuild
|
||||
|
||||
Reference in New Issue
Block a user