-
Notifications
You must be signed in to change notification settings - Fork 70
Kokoro: Migrate linux bots to ubuntu docker image #894
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Empty file.
Empty file.
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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
Empty file.
Empty file.
Empty file.
This file contains hidden or 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,89 @@ | ||
| #!/bin/bash | ||
|
|
||
| # Copyright 2020 The Amber 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. | ||
|
|
||
| set -e # fail on error | ||
|
|
||
| . /bin/using.sh # Declare the bash `using` function for configuring toolchains. | ||
|
|
||
| set -x # show commands | ||
|
|
||
| BUILD_TYPE="Debug" | ||
|
|
||
| using cmake-3.17.2 | ||
| using ninja-1.10.0 | ||
|
|
||
| if [ ! -z "$COMPILER" ]; then | ||
| using "$COMPILER" | ||
| fi | ||
|
|
||
| # Possible configurations are: | ||
| # DEBUG, RELEASE | ||
|
|
||
| if [ $CONFIG = "RELEASE" ] | ||
| then | ||
| BUILD_TYPE="RelWithDebInfo" | ||
| fi | ||
|
|
||
| DEPS_ARGS="" | ||
| if [[ "$EXTRA_CONFIG" =~ "USE_CLSPV=TRUE" ]]; then | ||
| DEPS_ARGS+=" --with-clspv" | ||
| fi | ||
| if [[ "$EXTRA_CONFIG" =~ "USE_DXC=TRUE" ]]; then | ||
| DEPS_ARGS+=" --with-dxc" | ||
| fi | ||
| if [[ "$EXTRA_CONFIG" =~ "ENABLE_SWIFTSHADER=TRUE" ]]; then | ||
| DEPS_ARGS+=" --with-swiftshader" | ||
| fi | ||
|
|
||
| cd $ROOT_DIR | ||
| ./tools/git-sync-deps $DEPS_ARGS | ||
|
|
||
| mkdir -p build | ||
| cd $ROOT_DIR/build | ||
|
|
||
| # Invoke the build. | ||
| BUILD_SHA=${KOKORO_GITHUB_COMMIT:-$KOKORO_GITHUB_PULL_REQUEST_COMMIT} | ||
| echo $(date): Starting build... | ||
| cmake -GNinja -DCMAKE_BUILD_TYPE=$BUILD_TYPE \ | ||
| -DAMBER_USE_LOCAL_VULKAN=1 \ | ||
| $EXTRA_CONFIG .. | ||
|
|
||
| echo $(date): Build everything... | ||
| ninja | ||
| echo $(date): Build completed. | ||
|
|
||
| echo $(date): Starting amber_unittests... | ||
| ./amber_unittests | ||
| echo $(date): amber_unittests completed. | ||
|
|
||
| # Swiftshader is only built with gcc, so only run the integration tests with gcc | ||
| if [[ "$EXTRA_CONFIG" =~ "ENABLE_SWIFTSHADER=TRUE" ]]; then | ||
| OPTS= | ||
| if [[ $EXTRA_CONFIG =~ "USE_CLSPV=ON" ]]; then | ||
| OPTS="--use-opencl" | ||
| fi | ||
| if [[ "$EXTRA_CONFIG" =~ "USE_DXC=TRUE" ]]; then | ||
| OPTS+=" --use-dxc" | ||
| fi | ||
|
|
||
| echo $(date): Starting integration tests.. | ||
| export LD_LIBRARY_PATH=$ROOT_DIR/build/third_party/vulkan-loader/loader | ||
| export VK_LAYER_PATH=$ROOT_DIR/build/third_party/vulkan-validationlayers/layers | ||
| export VK_ICD_FILENAMES=$ROOT_DIR/build/Linux/vk_swiftshader_icd.json | ||
| cd $ROOT_DIR | ||
| python3 ./tests/run_tests.py --build-dir $ROOT_DIR/build --use-swiftshader $OPTS | ||
| echo $(date): integration tests completed. | ||
| fi |
This file contains hidden or 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 hidden or 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,86 @@ | ||
| #!/bin/bash | ||
|
|
||
| # Copyright 2020 The Amber 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. | ||
|
|
||
| set -e # fail on error | ||
|
|
||
| . /bin/using.sh # Declare the bash `using` function for configuring toolchains. | ||
|
|
||
| set -x # show commands | ||
|
|
||
| BUILD_TYPE="Debug" | ||
|
|
||
| using cmake-3.17.2 | ||
| using ninja-1.10.0 | ||
|
|
||
| if [ ! -z "$COMPILER" ]; then | ||
| using "$COMPILER" | ||
| fi | ||
|
|
||
| # Possible configurations are: | ||
| # DEBUG, RELEASE | ||
|
|
||
| if [ $CONFIG = "RELEASE" ] | ||
| then | ||
| BUILD_TYPE="RelWithDebInfo" | ||
| fi | ||
|
|
||
| # Make a directory for Dawn dependencies | ||
| mkdir -p $ROOT_DIR/build/out/dawn-deps && cd $ROOT_DIR/build/out/dawn-deps | ||
|
|
||
| # Get depot tools | ||
| git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git | ||
| export PATH="$PWD/depot_tools:$PATH" | ||
|
|
||
| # Clone the repo as "dawn" | ||
| git clone https://dawn.googlesource.com/dawn dawn && cd dawn | ||
| DAWN=$PWD | ||
|
|
||
| # Bootstrap the gclient configuration | ||
| cp scripts/standalone.gclient .gclient | ||
|
|
||
| # Fetch external dependencies and toolchains with gclient | ||
| gclient sync | ||
|
|
||
| # Generate build files | ||
| mkdir -p out/Release | ||
| touch out/Release/args.gn | ||
| gn gen out/Release | ||
|
|
||
| # build dawn | ||
| ninja -C out/Release | ||
|
|
||
| cd $ROOT_DIR | ||
| ./tools/git-sync-deps | ||
|
|
||
| cd $ROOT_DIR/build | ||
|
|
||
| # Invoke the build. | ||
| BUILD_SHA=${KOKORO_GITHUB_COMMIT:-$KOKORO_GITHUB_PULL_REQUEST_COMMIT} | ||
| echo $(date): Starting build... | ||
|
|
||
| cmake -GNinja ..\ | ||
| -DCMAKE_BUILD_TYPE=$BUILD_TYPE\ | ||
| -DDawn_INCLUDE_DIR=$DAWN/src/include\ | ||
| -DDawn_GEN_INCLUDE_DIR=$DAWN/out/Release/gen/src/include\ | ||
| -DDawn_LIBRARY_DIR=$DAWN/out/Release | ||
|
|
||
| echo $(date): Build everything... | ||
| ninja | ||
| echo $(date): Build completed. | ||
|
|
||
| echo $(date): Starting amber_unittests... | ||
| ./amber_unittests | ||
| echo $(date): amber_unittests completed. | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: This could be
gclient sync --jobs=16if we have multiple cores. Doesn't really matter though.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is what it was before. I'd like to keep optimisations separate if that's okay.