-
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
12,126 changed files
with
2,394,665 additions
and
1,412,318 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
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.