Skip to content

Commit

Permalink
github: Use main instead of master
Browse files Browse the repository at this point in the history
closes #5084
  • Loading branch information
juan-lunarg committed Jan 23, 2023
1 parent 21b92ed commit 1dc8160
Show file tree
Hide file tree
Showing 18 changed files with 57 additions and 59 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/build_android.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Copyright (c) 2021-2022 Valve Corporation
# Copyright (c) 2021-2022 LunarG, Inc.
# Copyright (c) 2021-2023 Valve Corporation
# Copyright (c) 2021-2023 LunarG, Inc.

# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand All @@ -23,7 +23,7 @@ on:
push:
pull_request:
branches:
- master
- main

jobs:
android:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build_linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ on:
push:
pull_request:
branches:
- master
- main

jobs:
code-format:
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/build_linux_gn.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Copyright (c) 2021-2022 Valve Corporation
# Copyright (c) 2021-2022 LunarG, Inc.
# Copyright (c) 2021-2023 Valve Corporation
# Copyright (c) 2021-2023 LunarG, Inc.

# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand All @@ -23,7 +23,7 @@ on:
push:
pull_request:
branches:
- master
- main

jobs:
gn:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/build_macos.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2022 Valve Corporation
# Copyright (c) 2022-2023 Valve Corporation
# Copyright (c) 2022-2023 LunarG, Inc.

# Licensed under the Apache License, Version 2.0 (the "License");
Expand All @@ -19,7 +19,7 @@ on:
push:
pull_request:
branches:
- master
- main

jobs:
macos-min-sdk:
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/build_windows.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Copyright (c) 2022 Valve Corporation
# Copyright (c) 2023 LunarG, Inc.
# Copyright (c) 2022-2023 Valve Corporation
# Copyright (c) 2022-2023 LunarG, Inc.

# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand All @@ -23,7 +23,7 @@ on:
push:
pull_request:
branches:
- master
- main

jobs:
windows:
Expand Down
6 changes: 0 additions & 6 deletions BUILD.md
Original file line number Diff line number Diff line change
Expand Up @@ -364,9 +364,6 @@ Tested on OSX version 10.13.3

Setup Homebrew and components

- Follow instructions on [brew.sh](http://brew.sh) to get Homebrew installed.

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

- Ensure Homebrew is at the beginning of your PATH:

Expand Down Expand Up @@ -431,9 +428,6 @@ NOTE: To force the OSX version set the environment variable [MACOSX_DEPLOYMENT_T

Setup Homebrew and components

- Follow instructions on [brew.sh](http://brew.sh) to get Homebrew installed.

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

- Ensure Homebrew is at the beginning of your PATH:

Expand Down
6 changes: 1 addition & 5 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ to work on an issue that is assigned, simply coordinate with the current assigne
- Implemented VUID checks must be accompanied by relevant tests
- Validation source code should be in a separate commit from the tests, unless there are interdependencies. The repo should compile and
pass all tests after each commit.
* Please base your fixes on the master branch. SDK branches are generally not updated except for critical fixes needed to repair an SDK release.
* Please base your fixes on the `main` branch. SDK branches are generally not updated except for critical fixes needed to repair an SDK release.
* The resulting Pull Request will be assigned to a repository maintainer. It is the maintainer's responsibility to ensure the Pull Request
passes the Google/LunarG internal CI processes. Once the Pull Request has been approved and is passing internal CI, a repository maintainer
will merge the PR.
Expand Down Expand Up @@ -104,10 +104,6 @@ that to be accepted into the repository, the pull request must [pass all tests](

* [How to setup tests to run](./tests) and [overview for creating tests](docs/creating_tests.md).

#### **GitHub Cloud CI Testing**
Pull Requests to GitHub are tested in the cloud on Linux and Windows VMs. The Linux VMs use [Github Actions](https://github.com/KhronosGroup/Vulkan-ValidationLayers/actions) with the sequence of commands driven by the [ci_build.yml](https://github.com/KhronosGroup/Vulkan-ValidationLayers/blob/master/.github/workflows/ci_build.yml) file. The Windows VMs use [AppVeyor](https://ci.appveyor.com/project/Khronoswebmaster/vulkan-validationlayers/branch/master) with the sequence of commands driven by the [.appveyor.yml](https://github.com/KhronosGroup/Vulkan-ValidationLayers/blob/master/.appveyor.yml) file.

The Linux testing includes iterating on all of the validation layer tests over multiple [different device](https://github.com/KhronosGroup/Vulkan-ValidationLayers/tree/master/tests/device_profiles) profiles using the [Profile Layer](https://github.com/KhronosGroup/Vulkan-Profiles) in combination with the [mock icd](https://github.com/KhronosGroup/Vulkan-Tools/tree/master/icd). This is a fast way to simulate testing across different devices. Any new tests must pass across all device profiles.

#### **Special Considerations for Validation Layers**
* **Validation Checks:** Validation checks are carried out by the Khronos Validation layer. The CoreChecks validation object
Expand Down
8 changes: 4 additions & 4 deletions LAYER_CONFIGURATION.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<!-- markdownlint-disable MD041 -->
<!-- Copyright 2015-2019,2022 LunarG, Inc. -->

<!-- Copyright 2015-2023 LunarG, Inc. -->
<!-- Copyright 2015-2023 Valve Corporation -->
[![Khronos Vulkan][1]][2]

[1]: https://vulkan.lunarg.com/img/Vulkan_100px_Dec16.png "https://www.khronos.org/vulkan/"
Expand Down Expand Up @@ -33,7 +33,7 @@ In order to enable a Vulkan layer from the command-line, you must first make sur
1. The layer's Manifest JSON file is found by the Vulkan Desktop Loader because it is in:
* One of the standard operating system install paths
* It was added using one of the layer path environment variables (`VK_LAYER_PATH` or `VK_ADD_LAYER_PATH`).
* See the `Layer Discovery` section of the Vulkan Loader's [Layer Interface doc](https://github.com/KhronosGroup/Vulkan-Loader/blob/master/docs/LoaderLayerInterface.md).
* See the `Layer Discovery` section of the Vulkan Loader's [Layer Interface doc](https://github.com/KhronosGroup/Vulkan-Loader/blob/main/docs/LoaderLayerInterface.md).
2. The layer's library file is able to be loaded by the Vulkan Desktop Loader because it is in:
* A standard library path for the operating system
* The library path has been updated using an operating system-specific mechanism such as:
Expand Down Expand Up @@ -117,7 +117,7 @@ $ export VK_LOADER_LAYERS_ENABLE=*api_dump,*validation
```

More info about the new layer filtering environment variables can be found in the `Layer Filtering` section of the
of the [Loader Layer Documentation](https://github.com/KhronosGroup/Vulkan-Loader/blob/master/docs/LoaderLayerInterface.md).
of the [Loader Layer Documentation](https://github.com/KhronosGroup/Vulkan-Loader/blob/main/docs/LoaderLayerInterface.md).

#### Older Loaders

Expand Down
21 changes: 14 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,25 @@

This project provides the Khronos official Vulkan validation layers for Windows, Linux, Android, and MacOS.

## master to main upcoming change (January 23, 2023)
## Default branch changed to 'main' (January 23, 2023)

See https://github.com/KhronosGroup/Vulkan-ValidationLayers/issues/5084 for details.
As discussed in https://github.com/KhronosGroup/Vulkan-ValidationLayers/issues/5084, the default branch of this repository is now 'main'. This change should be largely transparent to repository users, since github rewrites many references to the old 'master' branch to 'main'. However, if you have a checked-out local clone, you may wish to take the following steps as recommended by github:

```sh
git branch -m master main
git fetch origin
git branch -u origin/main main
git remote set-head origin -a
```

## CI Build Status
| Build Status |
|:------------|
| [![Build Status](https://github.com/KhronosGroup/Vulkan-ValidationLayers/actions/workflows/build_windows.yml/badge.svg?branch=master)](https://github.com/KhronosGroup/Vulkan-ValidationLayers/actions) |
| [![Build Status](https://github.com/KhronosGroup/Vulkan-ValidationLayers/actions/workflows/build_linux.yml/badge.svg?branch=master)](https://github.com/KhronosGroup/Vulkan-ValidationLayers/actions) |
| [![Build Status](https://github.com/KhronosGroup/Vulkan-ValidationLayers/actions/workflows/build_macos.yml/badge.svg?branch=master)](https://github.com/KhronosGroup/Vulkan-ValidationLayers/actions) |
| [![Build Status](https://github.com/KhronosGroup/Vulkan-ValidationLayers/actions/workflows/build_linux_gn.yml/badge.svg?branch=master)](https://github.com/KhronosGroup/Vulkan-ValidationLayers/actions) |
| [![Build Status](https://github.com/KhronosGroup/Vulkan-ValidationLayers/actions/workflows/build_android.yml/badge.svg?branch=master)](https://github.com/KhronosGroup/Vulkan-ValidationLayers/actions) |
| [![Build Status](https://github.com/KhronosGroup/Vulkan-ValidationLayers/actions/workflows/build_windows.yml/badge.svg?branch=main)](https://github.com/KhronosGroup/Vulkan-ValidationLayers/actions) |
| [![Build Status](https://github.com/KhronosGroup/Vulkan-ValidationLayers/actions/workflows/build_linux.yml/badge.svg?branch=main)](https://github.com/KhronosGroup/Vulkan-ValidationLayers/actions) |
| [![Build Status](https://github.com/KhronosGroup/Vulkan-ValidationLayers/actions/workflows/build_macos.yml/badge.svg?branch=main)](https://github.com/KhronosGroup/Vulkan-ValidationLayers/actions) |
| [![Build Status](https://github.com/KhronosGroup/Vulkan-ValidationLayers/actions/workflows/build_linux_gn.yml/badge.svg?branch=main)](https://github.com/KhronosGroup/Vulkan-ValidationLayers/actions) |
| [![Build Status](https://github.com/KhronosGroup/Vulkan-ValidationLayers/actions/workflows/build_android.yml/badge.svg?branch=main)](https://github.com/KhronosGroup/Vulkan-ValidationLayers/actions) |


## Introduction
Expand Down
5 changes: 3 additions & 2 deletions docs/debug_printf.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<!-- markdownlint-disable MD041 -->
<!-- Copyright 2020-2022 LunarG, Inc. -->
<!-- Copyright 2020-2023 LunarG, Inc. -->
<!-- Copyright 2020-2023 Valve Corporation -->
[![Khronos Vulkan][1]][2]

[1]: https://vulkan.lunarg.com/img/Vulkan_100px_Dec16.png "https://www.khronos.org/vulkan/"
Expand Down Expand Up @@ -188,7 +189,7 @@ unrelated to Debug Printf, making it difficult to find the desired output.

### Other References
Documentation for the GL_EXT_debug_printf extension can be found
[here](https://github.com/KhronosGroup/GLSL/blob/master/extensions/ext/GLSL_EXT_debug_printf.txt)
[here](https://github.com/KhronosGroup/GLSL/blob/main/extensions/ext/GLSL_EXT_debug_printf.txt)

There is a validation layer test that demonstrates the simple and programmatic use of Debug
Printf. It is called "GpuDebugPrintf" and is in vklayertests_gpu.cpp in the
Expand Down
2 changes: 1 addition & 1 deletion docs/generated_code.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ cmake --build . --target VulkanVL_generated_source

The Vulkan code is generated from the [vk.xml](https://github.com/KhronosGroup/Vulkan-Headers/blob/main/registry/vk.xml) and uses the python helper functions in the `Vulkan-Headers/registry` folder.

The SPIR-V code is generated from the [SPIR-V Grammer](https://github.com/KhronosGroup/SPIRV-Headers/blob/master/include/spirv/unified1/spirv.core.grammar.json)
The SPIR-V code is generated from the [SPIR-V Grammer](https://github.com/KhronosGroup/SPIRV-Headers/blob/main/include/spirv/unified1/spirv.core.grammar.json)

## Tips

Expand Down
7 changes: 4 additions & 3 deletions docs/gpu_validation.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<!-- markdownlint-disable MD041 -->
<!-- Copyright 2015-2022 LunarG, Inc. -->
<!-- Copyright 2015-2023 LunarG, Inc. -->
<!-- Copyright 2015-2023 Valve Corporation -->
[![Khronos Vulkan][1]][2]

[1]: https://vulkan.lunarg.com/img/Vulkan_100px_Dec16.png "https://www.khronos.org/vulkan/"
Expand Down Expand Up @@ -331,7 +332,7 @@ This doesn't present any particular problem, but it does raise some issues:
### Code Structure and Relationship to the Core Validation Layer

The GPU-Assisted Validation code is largely contained in one
[file](https://github.com/KhronosGroup/Vulkan-ValidationLayers/blob/master/layers/gpu_validation.cpp), with "hooks" in
[file](https://github.com/KhronosGroup/Vulkan-ValidationLayers/blob/main/layers/gpu_validation.cpp), with "hooks" in
the other validation code that call functions in this file.
These hooks in the validation code look something like this:

Expand Down Expand Up @@ -696,7 +697,7 @@ The validation layer can continue to read valid records until it sees a Record L

The programmatic interface for the above informal description is codified in the
[SPIRV-Tools](https://github.com/KhronosGroup/SPIRV-Tools) repository in file
[`instrument.hpp`](https://github.com/KhronosGroup/SPIRV-Tools/blob/master/include/spirv-tools/instrument.hpp).
[`instrument.hpp`](https://github.com/KhronosGroup/SPIRV-Tools/blob/main/include/spirv-tools/instrument.hpp).
It consists largely of integer constant definitions for the codes and values mentioned above and
offsets into the record for locating each item.

Expand Down
2 changes: 1 addition & 1 deletion layers/shader_instruction.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ struct AtomicInstructionInfo {
// Provides easy access to len, opcode, and content words without the caller needing to care too much about the physical SPIRV module layout.
//
// For more information of the physical module layout to help understand this struct:
// https://github.com/KhronosGroup/SPIRV-Guide/blob/master/chapters/parsing_instructions.md
// https://github.com/KhronosGroup/SPIRV-Guide/blob/main/chapters/parsing_instructions.md
class Instruction {
public:
Instruction(std::vector<uint32_t>::const_iterator it);
Expand Down
6 changes: 3 additions & 3 deletions layers/vk_layer_config.cpp
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/**************************************************************************
*
* Copyright 2014-2022 Valve Software
* Copyright 2014-2023 Valve Software
* Copyright 2015-2022 Google Inc.
* Copyright 2019-2022 LunarG, Inc.
* Copyright 2019-2023 LunarG, Inc.
* All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
Expand Down Expand Up @@ -430,7 +430,7 @@ void CheckAndroidVersion() {
if ((target_version != 0) && (target_version < 26)) {
LOGCONSOLE(
"ERROR - Targeted Android version is %d and needs to be 26 or above. Please read "
"https://github.com/KhronosGroup/Vulkan-ValidationLayers/blob/master/BUILD.md for how to build the Validation Layers "
"https://github.com/KhronosGroup/Vulkan-ValidationLayers/blob/main/BUILD.md for how to build the Validation Layers "
"for Android 25 and below",
target_version);
}
Expand Down
20 changes: 10 additions & 10 deletions scripts/check_code_format.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
# Notes:
# Exits with non 0 exit code if formatting is needed.
# Requires python3 to run correctly
# In standalone mode (outside of CI), changes must be rebased on master
# In standalone mode (outside of CI), changes must be rebased on main
# to get meaningful and complete results

import os
Expand Down Expand Up @@ -193,7 +193,7 @@ def VerifyCommitMessageFormat(commit, target_files):
CPrint('HELP_MSG', " state_tracker: Remove 'using std::*' statements")
CPrint('HELP_MSG', " stateless: Account for DynStateWithCount for multiViewport\n")
CPrint('HELP_MSG', "Refer to this document for additional detail:")
CPrint('HELP_MSG', "https://github.com/KhronosGroup/Vulkan-ValidationLayers/blob/master/CONTRIBUTING.md#coding-conventions-and-formatting")
CPrint('HELP_MSG', "https://github.com/KhronosGroup/Vulkan-ValidationLayers/blob/main/CONTRIBUTING.md#coding-conventions-and-formatting")
return retval

#
Expand Down Expand Up @@ -232,19 +232,19 @@ def VerifyTypeAssign(commit, target_files):
#
# Entrypoint
def main():
DEFAULT_REFSPEC = 'origin/master'
DEFAULT_REFSPEC = 'origin/main'

parser = argparse.ArgumentParser(description='''Usage: python3 ./scripts/check_code_format.py
- Reqires python3 and clang-format 7.0+
- Run script in repo root
- May produce inaccurate clang-format results if local branch is not rebased on the TARGET_REFSPEC
''', formatter_class=RawDescriptionHelpFormatter)
parser.add_argument('--target-refspec', metavar='TARGET_REFSPEC', type=str, dest='target_refspec', help = 'Refspec to '
+ 'diff against (default is origin/master)', default=DEFAULT_REFSPEC)
+ 'diff against (default is origin/main)', default=DEFAULT_REFSPEC)
parser.add_argument('--base-refspec', metavar='BASE_REFSPEC', type=str, dest='base_refspec', help = 'Base refspec to '
+ ' compare (default is HEAD)', default='HEAD')
parser.add_argument('--fetch-main', dest='fetch_main', action='store_true', help='Fetch the master branch first.'
+ ' Useful with --target-refspec=FETCH_HEAD to compare against what is currently on master')
parser.add_argument('--fetch-main', dest='fetch_main', action='store_true', help='Fetch the main branch first.'
+ ' Useful with --target-refspec=FETCH_HEAD to compare against what is currently on main')
args = parser.parse_args()

if sys.version_info[0] != 3:
Expand All @@ -258,14 +258,14 @@ def main():
base_refspec = args.base_refspec

if args.fetch_main:
print('Fetching master branch...')
subprocess.check_call(['git', 'fetch', 'https://github.com/KhronosGroup/Vulkan-ValidationLayers.git', 'master'])
print('Fetching main branch...')
subprocess.check_call(['git', 'fetch', 'https://github.com/KhronosGroup/Vulkan-ValidationLayers.git', 'main'])

# Check if this is a merge commit
commit_parents = check_output(['git', 'rev-list', '--parents', '-n', '1', 'HEAD'])
if len(commit_parents.split(b' ')) > 2:
# If this is a merge commit, this is a PR being built, and has been merged into master for testing.
# The first parent (HEAD^) is going to be master, the second parent (HEAD^2) is going to be the PR commit.
# If this is a merge commit, this is a PR being built, and has been merged into main for testing.
# The first parent (HEAD^) is going to be main, the second parent (HEAD^2) is going to be the PR commit.
# TODO (ncesario) We should *ONLY* get here when on github CI, building a PR. Should probably print a
# warning if this happens locally.
target_refspec = 'HEAD^'
Expand Down
4 changes: 2 additions & 2 deletions scripts/update_deps.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env python

# Copyright 2017 The Glslang Authors. All rights reserved.
# Copyright (c) 2018 Valve Corporation
# Copyright (c) 2018-2023 Valve Corporation
# Copyright (c) 2018-2023 LunarG, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
Expand Down Expand Up @@ -622,7 +622,7 @@ def main():
'--ref',
dest='ref',
default='',
help="Override 'commit' with git reference. E.g., 'origin/master'")
help="Override 'commit' with git reference. E.g., 'origin/main'")
parser.add_argument(
'--no-build',
dest='do_build',
Expand Down
Loading

0 comments on commit 1dc8160

Please sign in to comment.