diff --git a/.github/workflows/presubmit.yml b/.github/workflows/presubmit.yml index 9dcecfc1e..e4563c5bf 100644 --- a/.github/workflows/presubmit.yml +++ b/.github/workflows/presubmit.yml @@ -5,33 +5,37 @@ permissions: # Controls when the action will run. on: - # Triggers the workflow on push or manual dispatch push: - # Allows you to run this workflow manually from the Actions tab workflow_dispatch: - # When a pull request is opened from a local branch or fork pull_request: - # - name: Install required packages - # run: | - # sudo apt-get install -y libpango1.0-dev libwebp-dev ghostscript fonts-lyx jing libavalon-framework-java libbatik-java python3-pyparsing - # sudo gem install asciidoctor -v 2.0.16 - # sudo gem install coderay -v 1.1.1 - # sudo gem install rouge -v 3.19.0 - # sudo gem install ttfunk -v 1.7.0 - # sudo gem install hexapdf -v 0.27.0 - # sudo gem install asciidoctor-pdf -v 2.3.4 - # sudo gem install asciidoctor-mathematical -v 0.3.5 - # sudo pip install pyparsing +# jobs: +# checkout: +# name: Checkout repository and setup build +# runs-on: ubuntu-latest +# # Refer to the khronosgroup/docker-images:asciidoctor-spec container by +# # its SHA instead of the name, to prevent caching problems when updating +# # the image. +# container: khronosgroup/docker-images@sha256:bd30a83285a2ea062598f053b5bd8ebc843e16c639c0e4cd88ab4bbb4e63ead3 +# +# steps: +# - uses: actions/checkout@v4 +# with: +# fetch-depth: 0 +# submodules: recursive +# # Ownerships in the working directory are odd. +# # . is owned by UID 1001, while repo files are owned by root +# # This leads to many odd messages like +# # fatal: detected dubious ownership in repository at '/__w/OpenCL-Docs/OpenCL-Docs' +# - name: Git safe directory workaround +# run: | +# git config --global --add safe.directory '*' - -jobs: + # These steps are potentially parallelizeable build: - name: Build all specs + name: Build spec artifacts runs-on: ubuntu-latest - # Refer to the khronosgroup/docker-images:asciidoctor-spec container by - # its SHA instead of the name, to prevent caching problems when updating - # the image. + needs: checkout container: khronosgroup/docker-images@sha256:bd30a83285a2ea062598f053b5bd8ebc843e16c639c0e4cd88ab4bbb4e63ead3 steps: @@ -40,17 +44,26 @@ jobs: fetch-depth: 0 submodules: recursive - - name: Understand CI file / repo structure and ownership + # Ownerships in the working directory are odd. + # . is owned by UID 1001, while repo files are owned by root + # This leads to many odd messages like + # fatal: detected dubious ownership in repository at '/__w/OpenCL-Docs/OpenCL-Docs' + - name: Git safe directory workaround run: | - /bin/pwd - id -u - id -g - ls -la . - ls -la .. + git config --global --add safe.directory '*' + ls -lda . .. .git Makefile + + - name: List git tag + run: | + git describe --tags --dirty + + - name: Validate XML + run: | + make -C xml validate - name: Generate core specs (HTML and PDF) + # May also want to generate PDF targets run: | - # python3 makeSpec -clean -spec core OUTDIR=out.core -j 5 -O api c env ext cxx4opencl python3 makeSpec -clean -spec core OUTDIR=out.core -j 5 -O apihtml chtml envhtml exthtml cxx4openclhtml - name: Generate core + extension specs (HTML) @@ -60,18 +73,3 @@ jobs: - name: Generate reference pages run: | python3 makeSpec -spec khr OUTDIR=out.refpages -j 12 -O manhtmlpages - - - name: Validate XML - run: | - make -C xml validate - - - name: List git tag - run: | - /bin/pwd - ls -la - # Unclear why this is needed when running in the container, but - # ownership of '.' / directory contents are different (user 1001 / - # root) - git config --global --add safe.directory '*' - git describe --tags --dirty -