| # Copyright 2019 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 |
| # |
| # https://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. |
| |
| name: Continuous Integration |
| |
| on: |
| push: |
| branches: |
| - master |
| - ci-test # A branch specifically for testing CI |
| |
| jobs: |
| build: |
| runs-on: ubuntu-18.04 |
| env: |
| CXX: clang++ |
| CC: clang |
| PYTHON_BIN: /usr/bin/python3 |
| steps: |
| - name: Installing bazel |
| run: | |
| echo "deb [arch=amd64] https://storage.googleapis.com/bazel-apt stable jdk1.8" | sudo tee /etc/apt/sources.list.d/bazel.list |
| sudo apt install curl |
| curl https://bazel.build/bazel-release.pub.gpg | sudo apt-key add - |
| sudo apt update && sudo apt install bazel |
| - name: Installing dependencies |
| run: | |
| sudo apt install clang libsdl2-dev python3 python3-pip |
| sudo pip install numpy |
| - name: Downloading the Vulkan SDK |
| # https://vulkan.lunarg.com/doc/sdk/1.1.126.0/linux/getting_started.html |
| run: | |
| mkdir ~/vulkan |
| wget -qO- https://sdk.lunarg.com/sdk/download/1.1.126.0/linux/vulkan-sdk.tar.gz | tar xzf - -C ~/vulkan/ |
| - name: Checking out latest version and all submodules |
| run: | |
| git config --global remote.origin.fetch '+refs/pull/*:refs/remotes/origin/pull/*' |
| git clone https://github.com/$GITHUB_REPOSITORY $GITHUB_WORKSPACE --no-checkout --no-tags |
| git checkout $GITHUB_SHA |
| git submodule update --init --depth 1000 --jobs 8 |
| - name: Building with bazel |
| run: | |
| source ~/vulkan/1.1.126.0/setup-env.sh |
| bazel build //... |
| - name: Testing with bazel |
| # TODO(gcmn) Enable all tests once they're passing |
| run: bazel test --test_output=errors -- //... -//integrations/... -//bindings/... -//iree/hal/vulkan:dynamic_symbols_test -//iree/samples/rt:bytecode_module_api_test |