From 947831ff1e09fa1892e0e584dd57360ebf4e2f4d Mon Sep 17 00:00:00 2001 From: N00byKing Date: Fri, 16 Feb 2018 21:37:35 +0100 Subject: [PATCH 1/2] Use Docker for Build Target clang-format for travis. This uses the (apparently) more stable Ubuntu Repo instead of the LLVM one. --- .travis.yml | 13 ++++--------- .travis/clang-format/build.sh | 3 +++ .travis/clang-format/deps.sh | 3 +++ .travis/clang-format/docker.sh | 8 ++++++++ 4 files changed, 18 insertions(+), 9 deletions(-) create mode 100755 .travis/clang-format/build.sh create mode 100755 .travis/clang-format/deps.sh create mode 100755 .travis/clang-format/docker.sh diff --git a/.travis.yml b/.travis.yml index e2742b5fe2..044708b1d5 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,16 +3,11 @@ matrix: include: - os: linux env: NAME="clang-format" + sudo: required dist: trusty - addons: - apt: - sources: - - sourceline: 'deb http://apt.llvm.org/trusty/ llvm-toolchain-trusty-6.0 main' - key_url: 'https://apt.llvm.org/llvm-snapshot.gpg.key' - - sourceline: 'deb http://ppa.launchpad.net/ubuntu-toolchain-r/test/ubuntu trusty main' - packages: - - clang-format-6.0 - script: "./.travis/clang-format/script.sh" + services: docker + install: "./.travis/clang-format/deps.sh" + script: "./.travis/clang-format/build.sh" - os: linux env: NAME="linux build" sudo: required diff --git a/.travis/clang-format/build.sh b/.travis/clang-format/build.sh new file mode 100755 index 0000000000..ad8960950d --- /dev/null +++ b/.travis/clang-format/build.sh @@ -0,0 +1,3 @@ +#!/bin/bash -ex + +docker run -v $(pwd):/yuzu ubuntu:18.04 /bin/bash /yuzu/.travis/clang-format/docker.sh diff --git a/.travis/clang-format/deps.sh b/.travis/clang-format/deps.sh new file mode 100755 index 0000000000..540bb934a8 --- /dev/null +++ b/.travis/clang-format/deps.sh @@ -0,0 +1,3 @@ +#!/bin/sh -ex + +docker pull ubuntu:18.04 diff --git a/.travis/clang-format/docker.sh b/.travis/clang-format/docker.sh new file mode 100755 index 0000000000..05047e9b86 --- /dev/null +++ b/.travis/clang-format/docker.sh @@ -0,0 +1,8 @@ +#!/bin/bash -ex + +apt-get update +apt-get install -y clang-format-6.0 + +# Run clang-format +cd /yuzu +./.travis/clang-format/script.sh From b36ce74d181eaf854bb42855c6de5beee37e1a1b Mon Sep 17 00:00:00 2001 From: N00byKing Date: Sun, 18 Feb 2018 01:01:24 +0100 Subject: [PATCH 2/2] Update build.sh --- .travis/clang-format/build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis/clang-format/build.sh b/.travis/clang-format/build.sh index ad8960950d..3707be3c9f 100755 --- a/.travis/clang-format/build.sh +++ b/.travis/clang-format/build.sh @@ -1,3 +1,3 @@ #!/bin/bash -ex -docker run -v $(pwd):/yuzu ubuntu:18.04 /bin/bash /yuzu/.travis/clang-format/docker.sh +docker run -v $(pwd):/yuzu ubuntu:18.04 /bin/bash -ex /yuzu/.travis/clang-format/docker.sh