Skip to content

add mising file

add mising file #1184

Workflow file for this run

# Copyright 2021-2024 The Khronos Group, Inc.
# SPDX-License-Identifier: Apache-2.0
# CI to build asciidoctor spec targets, on push or manually
name: CI
# Controls when the action will run.
on:
# Triggers the workflow on push or manual dispatch
push:
branches:
tags:
# Also build when some pull requests are created
pull_request:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest
# Use the Khronos container with the asciidoctor toolchain preinstalled. We
# reference the image by its SHA rather than its tag because they sometimes
# overwrite a tag with a different image (which has a different SHA). This
# SHA corresponds to tag "asciidoctor-spec.20240727".
container: khronosgroup/docker-images@sha256:089687083ceb36483a3917389e4278718ab19c594099634f5dd80e22540c960f
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v4
# Unfortunately, asciidoctor-pdf gets pathname-specific errors
# building under the usual $GITHUB_WORKSPACE (/__w). As a workaround,
# generate the outputs in /tmp.
- name: Build spec targets
run: |
cd adoc
make OUTDIR=/tmp/out QUIET= COMMIT_SHA=$GITHUB_SHA html pdf
- name: Verify reflow conformance
run: |
./adoc/scripts/verify_reflow_conformance.sh
- name: Archive generated files
uses: actions/upload-artifact@v4
with:
name: spec-outputs
path: |
/tmp/out
check-clang-format:
if: github.event_name == 'pull_request'
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0 # Need to check out base branch as well
- name: Install clang-format
run: sudo apt update; sudo apt install -y clang-format
# Inspired by SYCL-CTS
- name: Run clang-format on changed files
run: |
set -o errexit -o pipefail -o noclobber -o nounset
DIFF=$( git diff -U0 --no-color -C ./adoc/code/ ${{ github.event.pull_request.base.sha }} | ./adoc/scripts/clang-format-diff.py -p1 )
if [ ! -z "$DIFF" ]; then
echo 'The following changes are not formatted according to `clang-format`:' >> $GITHUB_STEP_SUMMARY
echo '```diff' >> $GITHUB_STEP_SUMMARY
echo "$DIFF" >> $GITHUB_STEP_SUMMARY
echo '```' >> $GITHUB_STEP_SUMMARY
echo "Not all files are formatted according to clang-format. See workflow summary for details."
exit 1 # Fail CI run
fi