diff --git a/.github/workflows/test-documentation.yml b/.github/workflows/test-documentation.yml new file mode 100644 index 00000000000..28830261db6 --- /dev/null +++ b/.github/workflows/test-documentation.yml @@ -0,0 +1,122 @@ +name: + +on: + pull_request: + branches: + - "master" + - "candidate-*" + - "!candidate-7.10.*" + - "!candidate-7.8.*" + - "!candidate-7.6.*" + - "!candidate-7.4.*" + - "!candidate-7.2.*" + - "!candidate-7.0.*" + - "!candidate-6.*" + paths: + - docs/** + +jobs: + build-documentation: + name: Build Documentation + runs-on: ubuntu-22.04 + + steps: + - name: Free additional disk space (remove Android SDK + Tools) + continue-on-error: true + run: | + df -h + sudo rm -rf ${ANDROID_HOME} + sudo rm -rf ${JAVA_HOME_8_X64} + sudo rm -rf ${JAVA_HOME_11_X64} + sudo rm -rf ${JAVA_HOME_17_X64} + sudo rm -rf ${JAVA_HOME_21_X64} + sudo rm -rf ${CHROMEWEBDRIVER} + sudo rm -rf ${EDGEWEBDRIVER} + sudo rm -rf ${GECKOWEBDRIVER} + sudo rm -rf ${SELENIUM_JAR_PATH} + + - name: Display disk space (post free) + run: | + df -h + + - name: Checkout HPCC-Platform + uses: actions/checkout@v4 + with: + ref: ${{ github.ref }} + submodules: recursive + path: ${{ github.workspace }}/HPCC-Platform + + - name: Calculate vars + id: vars + working-directory: ${{ github.workspace }}/HPCC-Platform/vcpkg + run: | + vcpkg_sha_short=$(git rev-parse --short=8 HEAD) + echo "vcpkg_sha_short=$vcpkg_sha_short" >> $GITHUB_OUTPUT + docker_build_label=hpccsystems/platform-build-ubuntu-22.04 + echo "docker_build_label=$docker_build_label" >> $GITHUB_OUTPUT + echo "docker_tag=$docker_build_label:$vcpkg_sha_short" >> $GITHUB_OUTPUT + community_base_ref=${{ github.event.base_ref || github.ref }} + candidate_branch=$(echo $community_base_ref | cut -d'/' -f3) + candidate_base_branch=$(echo $candidate_branch | awk -F'.' -v OFS='.' '{ $3="x"; print }') + echo "docker_tag_candidate_base=$docker_build_label:$candidate_base_branch" >> $GITHUB_OUTPUT + community_ref=${{ github.ref }} + community_tag=$(echo $community_ref | cut -d'/' -f3) + echo "community_tag=$community_tag" >> $GITHUB_OUTPUT + + + - name: Print vars + run: | + echo "${{ toJSON(steps.vars.outputs) }})" + + + - name: Set up Docker Buildx + id: buildx + uses: docker/setup-buildx-action@v3 + + - name: Login to DockerHub + uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + + - name: Create Build Image + uses: docker/build-push-action@v5 + with: + builder: ${{ steps.buildx.outputs.name }} + file: ${{ github.workspace }}/HPCC-Platform/dockerfiles/vcpkg/ubuntu-22.04.dockerfile + context: ${{ github.workspace }}/HPCC-Platform/dockerfiles/vcpkg + push: false + load: ${{ github.repository_owner != 'hpcc-systems' }} + build-args: | + VCPKG_REF=${{ steps.vars.outputs.vcpkg_sha_short }} + tags: | + ${{ steps.vars.outputs.docker_tag_candidate_base }} + cache-from: | + type=registry,ref=${{ steps.vars.outputs.docker_tag_candidate_base }} + type=registry,ref=${{ steps.vars.outputs.docker_tag }} + cache-to: type=inline + + - name: CMake documentation + run: | + mkdir -p {${{ github.workspace }}/build,EN_US,PT_BR} + docker run --rm --mount source="${{ github.workspace }}/HPCC-Platform",target=/hpcc-dev/HPCC-Platform,type=bind,consistency=cached --mount source="${{ github.workspace }}/build",target=/hpcc-dev/build,type=bind,consistency=cached ${{ steps.vars.outputs.docker_tag_candidate_base }} "\ + cmake -S /hpcc-dev/HPCC-Platform -B /hpcc-dev/build -DVCPKG_FILES_DIR=/hpcc-dev -DMAKE_DOCS_ONLY=ON -DUSE_NATIVE_LIBRARIES=ON -DDOCS_AUTO=ON -DDOC_LANGS=ALL && \ + cmake --build /hpcc-dev/build --parallel $(nproc) --target all" + docker run --rm --mount source="${{ github.workspace }}/HPCC-Platform",target=/hpcc-dev/HPCC-Platform,type=bind,consistency=cached --mount source="${{ github.workspace }}/build",target=/hpcc-dev/build,type=bind,consistency=cached ${{ steps.vars.outputs.docker_tag_candidate_base }} "cd /hpcc-dev/build/Release/docs/EN_US && zip ALL_HPCC_DOCS_EN_US-$(echo '${{ steps.vars.outputs.community_tag }}' | sed 's/community_//' ).zip *.pdf" + docker run --rm --mount source="${{ github.workspace }}/HPCC-Platform",target=/hpcc-dev/HPCC-Platform,type=bind,consistency=cached --mount source="${{ github.workspace }}/build",target=/hpcc-dev/build,type=bind,consistency=cached ${{ steps.vars.outputs.docker_tag_candidate_base }} "cd /hpcc-dev/build/Release/docs/PT_BR && zip ALL_HPCC_DOCS_PT_BR-$(echo '${{ steps.vars.outputs.community_tag }}' | sed 's/community_//' ).zip *.pdf" + + - name: Upload build artifacts + uses: actions/upload-artifact@v4 + with: + name: documentation + path: | + ${{ github.workspace }}/build/Release/docs/*.zip + ${{ github.workspace }}/build/Release/docs/EN_US/*.zip + ${{ github.workspace }}/build/Release/docs/PT_BR/*.zip + ${{ github.workspace }}/build/docs/EN_US/EclipseHelp/*.zip + ${{ github.workspace }}/build/docs/EN_US/HTMLHelp/*.zip + ${{ github.workspace }}/build/docs/PT_BR/HTMLHelp/*.zip + compression-level: 0 + + + \ No newline at end of file diff --git a/docs/empty.md b/docs/empty.md new file mode 100644 index 00000000000..e69de29bb2d