-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
15,876 changed files
with
3,530,332 additions
and
625,112 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# This file contains settings for local github action runner act: | ||
# https://github.com/nektos/act | ||
# | ||
# It is recommended to run specific jobs that you need, all jobs except those | ||
# running on should darwin work. | ||
# e.g. act -j build_linux | ||
# | ||
# It is recommended to set up a separate bridge network | ||
# and possibly define it in ~/.actrc like so: | ||
# --network=bridge | ||
# https://docs.docker.com/network/drivers/bridge/ | ||
|
||
# Remove containers after finishing a job, comment out for debugging | ||
--rm | ||
|
||
# Reuse the checkout from host, otherwise act will do docker cp that makes | ||
# running jobs a lot longer even on SSD. Clean up your .environment before | ||
# running it. | ||
--bind | ||
|
||
# Easier to have 1:1 match between triggering jobs and reading logs when they | ||
# use the same name | ||
--log-prefix-job-id | ||
|
||
# Default runner image does not include enough. | ||
# https://github.com/nektos/act#default-runners-are-intentionally-incomplete | ||
-P ubuntu-latest=catthehacker/ubuntu:full-latest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,48 @@ | ||
--- | ||
Checks: '-*,bugprone-use-after-move' | ||
Checks: > | ||
bugprone-*, | ||
modernize-redundant-void-arg, | ||
modernize-use-bool-literals, | ||
modernize-use-nullptr, | ||
performance-for-range-copy, | ||
readability-const-return-type, | ||
readability-else-after-return, | ||
readability-redundant-control-flow, | ||
readability-redundant-string-cstr, | ||
readability-redundant-string-init, | ||
-bugprone-assignment-in-if-condition, | ||
-bugprone-branch-clone, | ||
-bugprone-copy-constructor-init, | ||
-bugprone-easily-swappable-parameters, | ||
-bugprone-forward-declaration-namespace, | ||
-bugprone-forwarding-reference-overload, | ||
-bugprone-implicit-widening-of-multiplication-result, | ||
-bugprone-inc-dec-in-conditions, | ||
-bugprone-macro-parentheses, | ||
-bugprone-misplaced-widening-cast, | ||
-bugprone-multi-level-implicit-pointer-conversion, | ||
-bugprone-narrowing-conversions, | ||
-bugprone-not-null-terminated-result, | ||
-bugprone-reserved-identifier, | ||
-bugprone-signed-char-misuse, | ||
-bugprone-suspicious-include, | ||
-bugprone-switch-missing-default-case, | ||
-bugprone-undelegated-constructor, | ||
-bugprone-unused-return-value, | ||
-clang-analyzer-core.CallAndMessage, | ||
-clang-analyzer-core.NonNullParamChecker, | ||
-clang-analyzer-core.NullDereference, | ||
-clang-analyzer-cplusplus.Move, | ||
-clang-analyzer-deadcode.DeadStores, | ||
-clang-analyzer-nullability.NullablePassedToNonnull, | ||
-clang-analyzer-optin.cplusplus.UninitializedObject, | ||
-clang-analyzer-optin.cplusplus.VirtualCall, | ||
-clang-analyzer-optin.osx.cocoa.localizability.EmptyLocalizationContextChecker, | ||
-clang-analyzer-optin.performance, | ||
-clang-analyzer-optin.performance.Padding, | ||
-clang-analyzer-security.insecureAPI.rand, | ||
-clang-analyzer-security.insecureAPI.strcpy, | ||
-clang-analyzer-unix.Malloc, | ||
-clang-diagnostic-implicit-int-conversion | ||
WarningsAsErrors: '*' | ||
HeaderFilterRegex: '' | ||
HeaderFilterRegex: '(src|examples|zzz_generated|credentials).*(?<!third_party.*repo)' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
#!/bin/bash | ||
|
||
# | ||
# Copyright (c) 2023 Project CHIP Authors | ||
# | ||
# 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. | ||
# | ||
|
||
HERE="$(dirname "$0")" | ||
CHIP_ROOT="$(realpath "$HERE"/..)" | ||
BUILD_VERSION="latest" | ||
IMAGE_TAG="matter-dev-environment:local" | ||
USER_UID=$UID | ||
|
||
function show_usage() { | ||
cat <<EOF | ||
Usage: $0 | ||
Build vscode dev environment docker image. | ||
Options: | ||
-h,--help Show this help | ||
-t,--tag Image tag - default is matter-dev-environment:local | ||
-u,--uid User UIDa - default is the current user ID | ||
-v,--version Build version - default is the latest | ||
EOF | ||
} | ||
|
||
SHORT=t:,u:,h:,v | ||
LONG=tag:,uid:,help:,version: | ||
OPTS=$(getopt -n build --options "$SHORT" --longoptions "$LONG" -- "$@") | ||
|
||
eval set -- "$OPTS" | ||
|
||
while :; do | ||
case "$1" in | ||
-h | --help) | ||
show_usage | ||
exit 0 | ||
;; | ||
-t | --tag) | ||
IMAGE_TAG=$2 | ||
shift 2 | ||
;; | ||
-u | --uid) | ||
USER_UID=$2 | ||
shift 2 | ||
;; | ||
-v | --version) | ||
BUILD_VERSION=$2 | ||
shift 2 | ||
;; | ||
--) | ||
shift | ||
break | ||
;; | ||
*) | ||
echo "Unexpected option: $1" | ||
show_usage | ||
exit 2 | ||
;; | ||
esac | ||
done | ||
|
||
if [ "$USER_UID" = "0" ]; then | ||
USER_UID=1000 | ||
fi | ||
|
||
docker build \ | ||
-t "$IMAGE_TAG" \ | ||
--pull \ | ||
--build-arg USER_UID="$USER_UID" \ | ||
--build-arg BUILD_VERSION="$BUILD_VERSION" \ | ||
--network=host \ | ||
"$HERE" |
Oops, something went wrong.