代码拉取完成,页面将自动刷新
# Copyright (c) 2018-2020 The Khronos Group Inc.
#
# SPDX-License-Identifier: Apache-2.0
# Gitlab CI file for vulkan spec and header generation
# All stages use the same Docker image, so there are no prerequisites
image: khronosgroup/docker-images:vulkan-docs
# Verify repository license compliance
license-check:
stage: build
before_script:
# Nothing, all prerequisites are in the Docker image
script:
- reuse lint
allow_failure: false
terminology_check:
stage: build
before_script:
# Nothing, all prerequisites are in the Docker image
script:
- scripts/ci/check_undefined
allow_failure: false
# Verify SPEC_VERSION = 1 for extension development branches
# This only runs on merge requests
spec_version_check:
stage: build
before_script:
# Nothing, all prerequisites are in the Docker image
script:
# Only run the test if CI_COMMIT_BRANCH is defined
- test -z "$CI_COMMIT_BRANCH" || scripts/testSpecVersion.py -branch $CI_COMMIT_BRANCH
allow_failure: false
# Build the vulkan specification and generate any associated files (such as vulkan.h)
spec-generate:
stage: build
before_script:
# Nothing, all prerequisites are in the Docker image
script:
- NODE_PATH="/usr/lib/node_modules"
- export NODE_PATH
# Internal self-test of the check_spec_links script
- ( cd scripts && py.test-3 test*.py )
- mkdir -p gen/out/checks
- scripts/check_spec_links.py --html=gen/out/checks/problems.html > /dev/null || true
# Breaking the build if # of errors increases. We should manually ratchet ignore_count down as errors get fixed.
# If there are unfixable errors, add '--ignore_count #' where '#' is the
# number of them. This is a slightly crude way of enforcing "don't add
# errors" but simpler than the alternatives (running against master,
# diff, etc)
- scripts/check_spec_links.py -Werror --ignore_count 0
# Build the actual spec, and other common targets
- ./makeSpec -clean -spec all QUIET= -j${nproc} -Otarget manhtmlpages validusage styleguide registry html
# Build the core-only spec, to try and catch ifdef errors in extension markup
- ./makeSpec -clean -spec core -genpath gencore QUIET= -j${nproc} -Otarget html
# Build headers, for use by all later stages
- ( cd xml && make validate test install )
artifacts:
when: always
paths:
- src/
- gen/
- gencore/
expire_in: 1 week
# Generate the vulkan C++ header (vulkan.hpp)
hpp-generate:
stage: build
before_script:
- SPEC_DIR="${PWD}"
- cd /tmp
- rm -rf Vulkan-Hpp
- git clone https://github.com/KhronosGroup/Vulkan-Hpp.git
- cd Vulkan-Hpp
- git submodule update --init --recursive -- tinyxml2
- rm -rf Vulkan-Docs
- cp -r "${SPEC_DIR}" Vulkan-Docs
# Copy Vulkan C headers into subdir copy used by Vulkan-Hpp
- cp -p ${SPEC_DIR}/include/vulkan/*.h Vulkan-Docs/include/vulkan/
script:
- cd /tmp/Vulkan-Hpp
- cmake -H. -Bbuild
- make -C build
- cd build
- ./VulkanHppGenerator "${SPEC_DIR}"/xml/vk.xml
after_script:
- mkdir -p Vulkan-Hpp/vulkan/
- cp /tmp/Vulkan-Hpp/vulkan/vulkan.hpp Vulkan-Hpp/vulkan/
artifacts:
paths:
- Vulkan-Hpp/vulkan/
expire_in: 1 week
allow_failure: true
# Compile a simple test program that uses vulkan.h
# The fake platform headers in tests/ allow compiling with all Vulkan
# platforms at once.
h-compile:
stage: test
dependencies:
- spec-generate
before_script:
# Nothing, all prerequisites are in the Docker image
script:
- gcc -c -std=c11 -Igen/include -Itests -Wall -Wextra -Werror tests/htest.c
- clang -c -std=c11 -Igen/include -Itests -Wall -Wextra -Werror tests/htest.c
# Compile a simple test program that uses vulkan.hpp
hpp-compile:
stage: test
dependencies:
- spec-generate
- hpp-generate
before_script:
# Nothing, all prerequisites are in the Docker image
script:
- g++ -c -std=c++11 -Igen/include -IVulkan-Hpp -Wall -Wextra -Werror tests/hpptest.cpp
- clang++ -c -std=c++11 -Igen/include -IVulkan-Hpp -Wall -Wextra -Werror tests/hpptest.cpp
allow_failure: true
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。