diff --git a/.travis.yaml b/.travis.yaml new file mode 100644 index 000000000..7b115be69 --- /dev/null +++ b/.travis.yaml @@ -0,0 +1,35 @@ +matrix: + include: + - os: linux + languge: cpp + before_install: + - sudo apt-get update + install: + - build/travis/linux/install_dependencies + - build/travis/install_flutter $TRAVIS_BUILD_DIR/.. + before_script: + - export PATH=$PATH:$TRAVIS_BUILD_DIR/../flutter/bin:$TRAVIS_BUILD_DIR/bin + script: + - make -C example/linux + + - os: linux + languge: cpp + before_install: + - sudo apt-get update + install: + - build/travis/linux/install_dependencies + - build/travis/install_flutter $TRAVIS_BUILD_DIR/.. + - sudo apt-get install -y ninja-build + - build/travis/linux/install_gn bin + before_script: + - export PATH=$PATH:$TRAVIS_BUILD_DIR/bin + script: + - make -C example/linux USE_GN=1 + + - os: osx + language: objective-c + xcode_project: example/macos/ExmapleEmbedder.xcodeproj + xcode_scheme: ExampleEmbedder + install: + - build/travis/install_flutter $TRAVIS_BUILD_DIR/.. + diff --git a/build/travis/install_flutter b/build/travis/install_flutter new file mode 100755 index 000000000..c0a2cc3a5 --- /dev/null +++ b/build/travis/install_flutter @@ -0,0 +1,40 @@ +#!/usr/bin/env bash +# +# Copyright 2018 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 +# +# 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 + +readonly CHANNEL="stable" +readonly VERSION="1.0.0" + +if [[ "${TRAVIS_OS_NAME}" == "linux" ]]; then + readonly FLUTTER_OS="linux" + readonly ARCHIVE_EXTENSION="tar.xz" +else + readonly FLUTTER_OS="macos" + readonly ARCHIVE_EXTENSION="zip" +fi +readonly DOWNLOAD_BASE="https://storage.googleapis.com/flutter_infra/releases" +readonly DOWNLOAD_URI="${DOWNLOAD_BASE}/${CHANNEL}/${FLUTTER_OS}/flutter_${FLUTTER_OS}_v${VERSION}-${CHANNEL}.${ARCHIVE_EXTENSION}" +readonly TEMP_LOCATION="/tmp/flutter.${ARCHIVE_EXTENSION}" + +echo "Downloading ${DOWNLOAD_URI}" +if [[ "${TRAVIS_OS_NAME}" == "linux" ]]; then + wget "${DOWNLOAD_URI}" -O "${TEMP_LOCATION}" + tar xf "${TEMP_LOCATION}" -C "$1" +else + curl -o "${TEMP_LOCATION}" "${DOWNLOAD_URI}" + unzip "${TEMP_LOCATION}" -d "$1" +fi diff --git a/build/travis/linux/install_dependencies b/build/travis/linux/install_dependencies new file mode 100755 index 000000000..44c09e0d2 --- /dev/null +++ b/build/travis/linux/install_dependencies @@ -0,0 +1,20 @@ +#!/usr/bin/env bash +# +# Copyright 2018 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 +# +# 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 + +sudo apt-get install -y libglfw3-dev libepoxy-dev libjsoncpp-dev libgtk-3-dev \ + libx11-dev pkg-config diff --git a/build/travis/linux/install_gn b/build/travis/linux/install_gn new file mode 100755 index 000000000..850c9080a --- /dev/null +++ b/build/travis/linux/install_gn @@ -0,0 +1,23 @@ +#!/usr/bin/env bash +# +# Copyright 2018 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 +# +# 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 + +readonly DOWNLOAD_URI=https://chrome-infra-packages.appspot.com/dl/gn/gn/linux-amd64/+/latest +readonly TEMP_LOCATION=/tmp/gn.zip + +wget -O "${TEMP_LOCATION}" "${DOWNLOAD_URI}" +unzip -d "$1" "${TEMP_LOCATION}" diff --git a/example/macos/ExampleEmbedder.xcodeproj/xcshareddata/xcschemes/ExampleEmbedder.xcscheme b/example/macos/ExampleEmbedder.xcodeproj/xcshareddata/xcschemes/ExampleEmbedder.xcscheme new file mode 100644 index 000000000..294ef25a5 --- /dev/null +++ b/example/macos/ExampleEmbedder.xcodeproj/xcshareddata/xcschemes/ExampleEmbedder.xcscheme @@ -0,0 +1,91 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +