Skip to content

Commit 0c547ee

Browse files
Initial Travis configuration
Builds Linux via Make and GN, and builds macOS.
1 parent f6a8878 commit 0c547ee

File tree

5 files changed

+209
-0
lines changed

5 files changed

+209
-0
lines changed

.travis.yaml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
matrix:
2+
include:
3+
- os: linux
4+
languge: cpp
5+
before_install:
6+
- sudo apt-get update
7+
install:
8+
- build/travis/linux/install_dependencies
9+
- build/travis/install_flutter $TRAVIS_BUILD_DIR/..
10+
before_script:
11+
- export PATH=$PATH:$TRAVIS_BUILD_DIR/../flutter/bin:$TRAVIS_BUILD_DIR/bin
12+
script:
13+
- make -C example/linux
14+
15+
- os: linux
16+
languge: cpp
17+
before_install:
18+
- sudo apt-get update
19+
install:
20+
- build/travis/linux/install_dependencies
21+
- build/travis/install_flutter $TRAVIS_BUILD_DIR/..
22+
- sudo apt-get install -y ninja-build
23+
- build/travis/linux/install_gn bin
24+
before_script:
25+
- export PATH=$PATH:$TRAVIS_BUILD_DIR/bin
26+
script:
27+
- make -C example/linux USE_GN=1
28+
29+
- os: osx
30+
language: objective-c
31+
xcode_project: example/macos/ExmapleEmbedder.xcodeproj
32+
xcode_scheme: ExampleEmbedder
33+
install:
34+
- build/travis/install_flutter $TRAVIS_BUILD_DIR/..
35+

build/travis/install_flutter

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
#!/usr/bin/env bash
2+
#
3+
# Copyright 2018 Google LLC
4+
#
5+
# Licensed under the Apache License, Version 2.0 (the "License");
6+
# you may not use this file except in compliance with the License.
7+
# You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing, software
12+
# distributed under the License is distributed on an "AS IS" BASIS,
13+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
# See the License for the specific language governing permissions and
15+
# limitations under the License.
16+
17+
set -e
18+
19+
readonly CHANNEL="stable"
20+
readonly VERSION="1.0.0"
21+
22+
if [[ "${TRAVIS_OS_NAME}" == "linux" ]]; then
23+
readonly FLUTTER_OS="linux"
24+
readonly ARCHIVE_EXTENSION="tar.xz"
25+
else
26+
readonly FLUTTER_OS="macos"
27+
readonly ARCHIVE_EXTENSION="zip"
28+
fi
29+
readonly DOWNLOAD_BASE="https://storage.googleapis.com/flutter_infra/releases"
30+
readonly DOWNLOAD_URI="${DOWNLOAD_BASE}/${CHANNEL}/${FLUTTER_OS}/flutter_${FLUTTER_OS}_v${VERSION}-${CHANNEL}.${ARCHIVE_EXTENSION}"
31+
readonly TEMP_LOCATION="/tmp/flutter.${ARCHIVE_EXTENSION}"
32+
33+
echo "Downloading ${DOWNLOAD_URI}"
34+
if [[ "${TRAVIS_OS_NAME}" == "linux" ]]; then
35+
wget "${DOWNLOAD_URI}" -O "${TEMP_LOCATION}"
36+
tar xf "${TEMP_LOCATION}" -C "$1"
37+
else
38+
curl -o "${TEMP_LOCATION}" "${DOWNLOAD_URI}"
39+
unzip "${TEMP_LOCATION}" -d "$1"
40+
fi
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
#!/usr/bin/env bash
2+
#
3+
# Copyright 2018 Google LLC
4+
#
5+
# Licensed under the Apache License, Version 2.0 (the "License");
6+
# you may not use this file except in compliance with the License.
7+
# You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing, software
12+
# distributed under the License is distributed on an "AS IS" BASIS,
13+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
# See the License for the specific language governing permissions and
15+
# limitations under the License.
16+
17+
set -e
18+
19+
sudo apt-get install -y libglfw3-dev libepoxy-dev libjsoncpp-dev libgtk-3-dev \
20+
libx11-dev pkg-config

build/travis/linux/install_gn

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
#!/usr/bin/env bash
2+
#
3+
# Copyright 2018 Google LLC
4+
#
5+
# Licensed under the Apache License, Version 2.0 (the "License");
6+
# you may not use this file except in compliance with the License.
7+
# You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing, software
12+
# distributed under the License is distributed on an "AS IS" BASIS,
13+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
# See the License for the specific language governing permissions and
15+
# limitations under the License.
16+
17+
set -e
18+
19+
readonly DOWNLOAD_URI=https://chrome-infra-packages.appspot.com/dl/gn/gn/linux-amd64/+/latest
20+
readonly TEMP_LOCATION=/tmp/gn.zip
21+
22+
wget -O "${TEMP_LOCATION}" "${DOWNLOAD_URI}"
23+
unzip -d "$1" "${TEMP_LOCATION}"
Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<Scheme
3+
LastUpgradeVersion = "1000"
4+
version = "1.3">
5+
<BuildAction
6+
parallelizeBuildables = "YES"
7+
buildImplicitDependencies = "YES">
8+
<BuildActionEntries>
9+
<BuildActionEntry
10+
buildForTesting = "YES"
11+
buildForRunning = "YES"
12+
buildForProfiling = "YES"
13+
buildForArchiving = "YES"
14+
buildForAnalyzing = "YES">
15+
<BuildableReference
16+
BuildableIdentifier = "primary"
17+
BlueprintIdentifier = "33CC10EC2044A3C60003C045"
18+
BuildableName = "Example Embedder.app"
19+
BlueprintName = "Example Embedder"
20+
ReferencedContainer = "container:ExampleEmbedder.xcodeproj">
21+
</BuildableReference>
22+
</BuildActionEntry>
23+
</BuildActionEntries>
24+
</BuildAction>
25+
<TestAction
26+
buildConfiguration = "Debug"
27+
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
28+
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
29+
shouldUseLaunchSchemeArgsEnv = "YES">
30+
<Testables>
31+
</Testables>
32+
<MacroExpansion>
33+
<BuildableReference
34+
BuildableIdentifier = "primary"
35+
BlueprintIdentifier = "33CC10EC2044A3C60003C045"
36+
BuildableName = "Example Embedder.app"
37+
BlueprintName = "Example Embedder"
38+
ReferencedContainer = "container:ExampleEmbedder.xcodeproj">
39+
</BuildableReference>
40+
</MacroExpansion>
41+
<AdditionalOptions>
42+
</AdditionalOptions>
43+
</TestAction>
44+
<LaunchAction
45+
buildConfiguration = "Debug"
46+
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
47+
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
48+
launchStyle = "0"
49+
useCustomWorkingDirectory = "NO"
50+
ignoresPersistentStateOnLaunch = "NO"
51+
debugDocumentVersioning = "YES"
52+
debugServiceExtension = "internal"
53+
allowLocationSimulation = "YES">
54+
<BuildableProductRunnable
55+
runnableDebuggingMode = "0">
56+
<BuildableReference
57+
BuildableIdentifier = "primary"
58+
BlueprintIdentifier = "33CC10EC2044A3C60003C045"
59+
BuildableName = "Example Embedder.app"
60+
BlueprintName = "Example Embedder"
61+
ReferencedContainer = "container:ExampleEmbedder.xcodeproj">
62+
</BuildableReference>
63+
</BuildableProductRunnable>
64+
<AdditionalOptions>
65+
</AdditionalOptions>
66+
</LaunchAction>
67+
<ProfileAction
68+
buildConfiguration = "Release"
69+
shouldUseLaunchSchemeArgsEnv = "YES"
70+
savedToolIdentifier = ""
71+
useCustomWorkingDirectory = "NO"
72+
debugDocumentVersioning = "YES">
73+
<BuildableProductRunnable
74+
runnableDebuggingMode = "0">
75+
<BuildableReference
76+
BuildableIdentifier = "primary"
77+
BlueprintIdentifier = "33CC10EC2044A3C60003C045"
78+
BuildableName = "Example Embedder.app"
79+
BlueprintName = "Example Embedder"
80+
ReferencedContainer = "container:ExampleEmbedder.xcodeproj">
81+
</BuildableReference>
82+
</BuildableProductRunnable>
83+
</ProfileAction>
84+
<AnalyzeAction
85+
buildConfiguration = "Debug">
86+
</AnalyzeAction>
87+
<ArchiveAction
88+
buildConfiguration = "Release"
89+
revealArchiveInOrganizer = "YES">
90+
</ArchiveAction>
91+
</Scheme>

0 commit comments

Comments
 (0)