spirv-tools: vendor as full-fork recipe (path=source, patches baked)
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
# Copyright 2023 Google LLC
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
version: 2
|
||||
updates:
|
||||
- package-ecosystem: github-actions
|
||||
directory: /
|
||||
schedule:
|
||||
interval: daily
|
||||
groups:
|
||||
github-actions:
|
||||
patterns:
|
||||
- "*"
|
||||
open-pull-requests-limit: 3
|
||||
@@ -0,0 +1,59 @@
|
||||
name: Update dependencies
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: '0 2 * * *'
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
update-dependencies:
|
||||
if: github.repository == 'KhronosGroup/SPIRV-Tools'
|
||||
permissions:
|
||||
contents: write
|
||||
pull-requests: write
|
||||
name: Update dependencies
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
||||
with:
|
||||
persist-credentials: false
|
||||
|
||||
# Checkout the depot tools they are needed by roll_deps.sh
|
||||
- name: Checkout depot tools
|
||||
run: git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git $GITHUB_WORKSPACE/../depot_tools
|
||||
|
||||
- name: Update PATH
|
||||
run: echo "$GITHUB_WORKSPACE/../depot_tools" >> $GITHUB_PATH
|
||||
|
||||
- name: Download dependencies
|
||||
run: python3 utils/git-sync-deps
|
||||
|
||||
- name: Setup git user information
|
||||
run: |
|
||||
git config user.name "GitHub Actions[bot]"
|
||||
git config user.email "<>"
|
||||
git checkout -b roll_deps
|
||||
|
||||
- name: Update dependencies
|
||||
run: |
|
||||
utils/roll_deps.sh
|
||||
if [[ `git diff HEAD..origin/main --name-only | wc -l` == 0 ]]; then
|
||||
echo "changed=false" >> $GITHUB_OUTPUT
|
||||
else
|
||||
echo "changed=true" >> $GITHUB_OUTPUT
|
||||
fi
|
||||
id: update_dependencies
|
||||
- name: Push changes and create PR
|
||||
if: steps.update_dependencies.outputs.changed == 'true'
|
||||
run: |
|
||||
git push --force https://x-access-token:$GITHUB_TOKEN@github.com/$GITHUB_REPOSITORY.git roll_deps
|
||||
# Create a PR. If it aready exists, the command fails, so ignore the return code.
|
||||
gh pr create --head roll_deps --base main -f || true
|
||||
# Add the 'kokoro:run' label so that the kokoro tests will be run.
|
||||
gh pr edit roll_deps --add-label 'kokoro:run'
|
||||
gh pr merge roll_deps --auto --squash
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ github.token }}
|
||||
@@ -0,0 +1,62 @@
|
||||
name: Build and Test with Bazel
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- 'main'
|
||||
pull_request:
|
||||
types: [opened, synchronize, reopened, unlabeled]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
if: github.event.action != 'unlabeled' || github.event.label.name == 'kokoro:run'
|
||||
timeout-minutes: 120
|
||||
strategy:
|
||||
matrix:
|
||||
os: [ubuntu-latest, windows-2025]
|
||||
|
||||
runs-on: ${{matrix.os}}
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
||||
with:
|
||||
fetch-depth: '0'
|
||||
persist-credentials: false
|
||||
- name: Download dependencies
|
||||
run: python3 utils/git-sync-deps
|
||||
- name: Mount Bazel cache
|
||||
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
|
||||
with:
|
||||
path: ~/.bazel/cache
|
||||
# Force a new cache version by updating the number in 'generationN'
|
||||
key: bazel-cache-${{ runner.os }}-generation3
|
||||
- name: Build All
|
||||
run: bazel --output_user_root=~/.bazel/cache build //...
|
||||
- name: Test All
|
||||
run: bazel --output_user_root=~/.bazel/cache test --test_output=errors //...
|
||||
|
||||
# iOS is 10x expensive to run on GitHub machines, so only run if we know something else passed
|
||||
# The steps are unfortunately duplicated because github actions requires 2 jobs for a dependency
|
||||
build-macos:
|
||||
needs: build
|
||||
timeout-minutes: 120
|
||||
runs-on: macos-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
||||
with:
|
||||
fetch-depth: '0'
|
||||
persist-credentials: false
|
||||
- name: Download dependencies
|
||||
run: python3 utils/git-sync-deps
|
||||
- name: Mount Bazel cache
|
||||
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
|
||||
with:
|
||||
path: ~/.bazel/cache
|
||||
key: bazel-cache-${{ runner.os }}
|
||||
- name: Build All
|
||||
run: bazel --output_user_root=~/.bazel/cache build //...
|
||||
- name: Test All
|
||||
run: bazel --output_user_root=~/.bazel/cache test --test_output=errors //...
|
||||
@@ -0,0 +1,35 @@
|
||||
name: iOS
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
on:
|
||||
workflow_run:
|
||||
# iOS is 10x expensive to run on GitHub machines, so only run if we know something else passed
|
||||
workflows: ["Wasm Build"]
|
||||
types:
|
||||
- completed
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: macos-latest
|
||||
if: ${{ github.event.workflow_run.conclusion == 'success' }}
|
||||
steps:
|
||||
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
||||
with:
|
||||
persist-credentials: false
|
||||
- uses: lukka/get-cmake@e6906078ebd1ccb8ce51ab4626ac46a1b5a517e3 # v4.4.0
|
||||
- name: Download dependencies
|
||||
run: python3 utils/git-sync-deps
|
||||
# NOTE: The MacOS SDK ships universal binaries. CI should reflect this.
|
||||
- name: Configure Universal Binary for iOS
|
||||
run: |
|
||||
cmake -S . -B build \
|
||||
-D CMAKE_BUILD_TYPE=Debug \
|
||||
-D CMAKE_SYSTEM_NAME=iOS \
|
||||
"-D CMAKE_OSX_ARCHITECTURES=arm64;x86_64" \
|
||||
-G Ninja
|
||||
env:
|
||||
# Linker warnings as errors
|
||||
LDFLAGS: -Wl,-fatal_warnings
|
||||
- run: cmake --build build
|
||||
- run: cmake --install build --prefix /tmp
|
||||
@@ -0,0 +1,27 @@
|
||||
name: Create a release branch from release tag
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- 'v[0-9]+.[0-9]+'
|
||||
- 'vulkan-sdk-[0-9]+.[0-9]+.[0-9]+.[0-9]+'
|
||||
- '!v[0-9]+.[0-9]+.rc*'
|
||||
|
||||
jobs:
|
||||
prepare-release-job:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
||||
with:
|
||||
persist-credentials: false
|
||||
- name: Prepare CHANGELOG for version
|
||||
run: |
|
||||
python utils/generate_changelog.py CHANGES "${GITHUB_REF_NAME}" VERSION_CHANGELOG
|
||||
- name: Create release
|
||||
run: |
|
||||
gh release create -t "Release ${GITHUB_REF_NAME}" -F VERSION_CHANGELOG "${GITHUB_REF_NAME}"
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ github.token }}
|
||||
|
||||
@@ -0,0 +1,53 @@
|
||||
name: Scorecard supply-chain security
|
||||
on:
|
||||
# For Branch-Protection check. Only the default branch is supported. See
|
||||
# https://github.com/ossf/scorecard/blob/main/docs/checks.md#branch-protection
|
||||
branch_protection_rule:
|
||||
# To guarantee Maintained check is occasionally updated. See
|
||||
# https://github.com/ossf/scorecard/blob/main/docs/checks.md#maintained
|
||||
schedule:
|
||||
- cron: '36 17 * * 5'
|
||||
push:
|
||||
branches: [ "main" ]
|
||||
|
||||
# Declare default permissions as read only.
|
||||
permissions: read-all
|
||||
|
||||
jobs:
|
||||
analysis:
|
||||
name: Scorecard analysis
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
security-events: write # to upload the results to code-scanning dashboard
|
||||
id-token: write # to publish results and get a badge
|
||||
|
||||
steps:
|
||||
- name: "Checkout code"
|
||||
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
||||
with:
|
||||
persist-credentials: false
|
||||
|
||||
- name: "Run analysis"
|
||||
uses: ossf/scorecard-action@4eaacf0543bb3f2c246792bd56e8cdeffafb205a # v2.4.3
|
||||
with:
|
||||
results_file: results.sarif
|
||||
results_format: sarif
|
||||
# To enable Branch-Protection uncomment the `repo_token` line below
|
||||
# To create the Fine-grained PAT, follow the steps in https://github.com/ossf/scorecard-action#authentication-with-fine-grained-pat-optional.
|
||||
# repo_token: ${{ secrets.SCORECARD_TOKEN }}
|
||||
publish_results: true # allows the repo to include the Scorecard badge
|
||||
|
||||
# Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF
|
||||
# format to the repository Actions tab.
|
||||
- name: "Upload artifact"
|
||||
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
|
||||
with:
|
||||
name: SARIF file
|
||||
path: results.sarif
|
||||
retention-days: 5
|
||||
|
||||
# Upload the results to GitHub's code scanning dashboard.
|
||||
- name: "Upload to code-scanning"
|
||||
uses: github/codeql-action/upload-sarif@7188fc363630916deb702c7fdcf4e481b751f97a # v4.37.1
|
||||
with:
|
||||
sarif_file: results.sarif
|
||||
@@ -0,0 +1,25 @@
|
||||
name: Wasm Build
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- 'main'
|
||||
pull_request:
|
||||
types: [opened, synchronize, reopened, unlabeled]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
if: github.event.action != 'unlabeled' || github.event.label.name == 'kokoro:run'
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
||||
with:
|
||||
fetch-depth: '0'
|
||||
persist-credentials: false
|
||||
- name: Build web
|
||||
run: docker compose -f source/wasm/docker-compose.yml --project-directory . up
|
||||
- name: Run tests
|
||||
run: node test/wasm/test.js
|
||||
Reference in New Issue
Block a user