Simplify and unparallelize CI to test the 'fatal: erf HEAD is not a s… #206
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Presubmit | |
permissions: | |
contents: read | |
# Controls when the action will run. | |
on: | |
push: | |
workflow_dispatch: | |
pull_request: | |
# These jobs are potentially parallelizeable | |
jobs: | |
build: | |
name: Build spec artifacts | |
runs-on: ubuntu-latest | |
# Refer to the build container by its SHA instead of the name, to | |
# prevent caching problems when updating the image. | |
# container: khronosgroup/docker-images:asciidoctor-spec.20240702 | |
container: khronosgroup/docker-images@sha256:4aab96a03ef292439c9bd0f972adfa29cdf838d0909b1cb4ec2a6d7b2d14a37f | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
# If fetch-depth: 0 is not specified, then | |
# git describe --tags --dirty | |
# below fails. | |
# This could also affect SPECREVISION in the Makefile. | |
fetch-depth: 0 | |
# 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' | |
# The 'git config' is a brute-force workaround. | |
- name: Git safe directory workaround | |
run: | | |
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 only, for testing) | |
run: | | |
python3 makeSpec -clean -spec core QUIET= OUTDIR=out.core -O html |