From 9426be61e1865b066a7e4efb95ba6b2c604bf33e Mon Sep 17 00:00:00 2001 From: Jason Kridner <jkridner@beagleboard.org> Date: Tue, 23 Jan 2024 11:59:27 -0500 Subject: [PATCH] ci: WIP --- .gitlab-ci.yml | 9 ++------- gitlab-build.sh | 29 ++++++++++++----------------- 2 files changed, 14 insertions(+), 24 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 67dcf32e..67bec970 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -3,15 +3,10 @@ image: beagle/sphinx-build-env:latest variables: GIT_SUBMODULE_STRATEGY: recursive -cache: - key: bbdocs - paths: - - public - build: stage: build tags: - - docker-arm64 + - docker-amd64 parallel: matrix: - TARGET: [html, pdf] @@ -24,7 +19,7 @@ pages: - "build: [html]" - "build: [pdf]" tags: - - docker-arm64 + - docker-amd64 script: - ./gitlab-build.sh publish artifacts: diff --git a/gitlab-build.sh b/gitlab-build.sh index 04c0cf4d..66185a32 100755 --- a/gitlab-build.sh +++ b/gitlab-build.sh @@ -8,20 +8,6 @@ export VERSION_TWEAK=$(( $(date "+10#%H * 60 + 10#%M") )) function do_build() { echo "**** Updating $PAGES_URL/$VER_DIR: $1 ****" - if [ "x$1" != "xpublish" ]; then - echo "**** make clean ****" - # Clean build directory - make clean BUILDDIR=public/$VER_DIR - fi - - echo "**** make librobotcontrol xml ****" - if [ -e projects/librobotcontrol/docs ] ; then - cd projects/librobotcontrol/docs - doxygen - cd ../../.. - fi - - if [ "x$1" == "xhtml" ]; then cat << EOF > PAGES PAGES_URL = $PAGES_URL PAGES_SLUG = $PAGES_SLUG @@ -39,6 +25,14 @@ VERSION_TWEAK = $VERSION_TWEAK EXTRAVERSION = $EXTRAVERSION EOF + echo "**** make librobotcontrol xml ****" + if [ -e projects/librobotcontrol/docs ] ; then + cd projects/librobotcontrol/docs + doxygen + cd ../../.. + fi + + if [ "x$1" == "xhtml" ]; then mkdir -p public cat <<HERE > public/index.html <!DOCTYPE html> @@ -55,7 +49,6 @@ HERE echo "**** make html ****" # Build and serve HTML make html -j$(nproc) BUILDDIR=public/$VER_DIR - mv public/$VER_DIR/html/* public/$VER_DIR/ fi if [ "x$1" == "xpdf" ]; then @@ -67,8 +60,6 @@ HERE pdfcpu version pdfcpu optimize public/$VER_DIR/latex/beagleboard-docs.pdf - mv public/$VER_DIR/latex/beagleboard-docs.pdf public/$VER_DIR/ - echo "**** cleanup ****" # Cleanup rm -rf public/$VER_DIR/doctrees @@ -76,6 +67,10 @@ HERE fi if [ "x$1" == "xpublish" ]; then + # Move files + mv public/$VER_DIR/html/* public/$VER_DIR/ + mv public/$VER_DIR/latex/beagleboard-docs.pdf public/$VER_DIR/ + # Update docs.beagleboard.org if [ "$CI_COMMIT_TAG" != "" ]; then if [ "$VER_DIR" = "latest" ]; then -- GitLab