Skip to content

Initial Travis configuration #198

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 1 commit into from
Jan 4, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions .travis.yaml
Original file line number Diff line number Diff line change
@@ -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/..

40 changes: 40 additions & 0 deletions build/travis/install_flutter
Original file line number Diff line number Diff line change
@@ -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
20 changes: 20 additions & 0 deletions build/travis/linux/install_dependencies
Original file line number Diff line number Diff line change
@@ -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
23 changes: 23 additions & 0 deletions build/travis/linux/install_gn
Original file line number Diff line number Diff line change
@@ -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}"
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1000"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "33CC10EC2044A3C60003C045"
BuildableName = "Example Embedder.app"
BlueprintName = "Example Embedder"
ReferencedContainer = "container:ExampleEmbedder.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
</Testables>
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "33CC10EC2044A3C60003C045"
BuildableName = "Example Embedder.app"
BlueprintName = "Example Embedder"
ReferencedContainer = "container:ExampleEmbedder.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "33CC10EC2044A3C60003C045"
BuildableName = "Example Embedder.app"
BlueprintName = "Example Embedder"
ReferencedContainer = "container:ExampleEmbedder.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "33CC10EC2044A3C60003C045"
BuildableName = "Example Embedder.app"
BlueprintName = "Example Embedder"
ReferencedContainer = "container:ExampleEmbedder.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>