-
Notifications
You must be signed in to change notification settings - Fork 113
76 lines (64 loc) · 2.42 KB
/
presubmit.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
name: Presubmit
permissions:
contents: read
# Controls when the action will run.
on:
push:
workflow_dispatch:
pull_request:
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 '*'
# These steps are potentially parallelizeable
build:
name: Build spec artifacts
runs-on: ubuntu-latest
# needs: checkout
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 '*'
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 apihtml chtml envhtml exthtml cxx4openclhtml
- name: Generate core + extension specs (HTML)
run: |
python3 makeSpec -clean -spec khr OUTDIR=out.khr -j -O html
- name: Generate reference pages
run: |
python3 makeSpec -spec khr OUTDIR=out.refpages -j 12 -O manhtmlpages