File tree 3 files changed +38
-14
lines changed 3 files changed +38
-14
lines changed Original file line number Diff line number Diff line change 1
1
name : Android Builds
2
2
3
- on :
3
+ on :
4
4
pull_request :
5
5
types : [opened, reopened, synchronize]
6
6
@@ -14,13 +14,15 @@ jobs:
14
14
strategy :
15
15
fail-fast : false
16
16
matrix :
17
- os : [ubuntu-latest, macos-latest]
17
+ os : [ubuntu-latest, macos-latest, windows-latest ]
18
18
architecture : ["x64",]
19
19
include :
20
20
- os : ubuntu-latest
21
21
architecture : " x64"
22
22
- os : macos-latest
23
23
architecture : " x64"
24
+ - os : windows-latest
25
+ architecture : " x64"
24
26
25
27
steps :
26
28
- uses : actions/checkout@v2
@@ -38,10 +40,15 @@ jobs:
38
40
python-version : 3.7
39
41
architecture : ${{ matrix.architecture }}
40
42
43
+ - name : Add msbuild to PATH
44
+ if : startsWith(matrix.os, 'windows')
45
+
46
+
41
47
- name : Install prerequisites
48
+ shell : bash
42
49
run : |
43
50
build_scripts/android/install_prereqs.sh
44
-
51
+
45
52
- name : Cache ccache files
46
53
id : cache_ccache
47
54
uses : actions/cache@v2
50
57
key : dev-test-ccache-${{ env.MATRIX_UNIQUE_NAME }}
51
58
52
59
- name : Build SDK
60
+ shell : bash
53
61
run : |
54
62
build_scripts/android/build.sh android_build .
55
63
Original file line number Diff line number Diff line change @@ -20,8 +20,6 @@ if [[ -n $(ls) ]]; then
20
20
exit 2
21
21
fi
22
22
cd -
23
- # Turn buildpath into an absolute path for use later with rsync.
24
- buildpath=$( cd " ${buildpath} " ; pwd -P )
25
23
26
24
# If NDK_ROOT is not set or is the wrong version, use to the version in /tmp.
27
25
if [[ -z " ${NDK_ROOT} " || ! $( grep -q " Pkg\.Revision = 16\." " ${NDK_ROOT} /source.properties" ) ]]; then
@@ -54,6 +52,15 @@ for lib in *; do
54
52
fi
55
53
done
56
54
set -x
57
- # Use rsync to copy the relevent paths to the destination directory.
58
- rsync -aR " ${paths[@]} " " ${buildpath} /"
59
55
56
+ if [[ $( uname) == " Linux" ]] || [[ $( uname) == " Darwin" ]]; then
57
+ # Turn buildpath into an absolute path for use later with rsync.
58
+ buildpath=$( cd " ${buildpath} " ; pwd -P )
59
+ # Use rsync to copy the relevent paths to the destination directory.
60
+ rsync -aR " ${paths[@]} " " ${buildpath} /"
61
+ else
62
+ # rsync has to be specifically installed on windows bash (including github runners)
63
+ # Also, rsync with absolute destination path doesn't work on Windows.
64
+ # Using a simple copy instead of rsync on Windows.
65
+ cp -R --parents " ${paths[@]} " " ${buildpath} "
66
+ fi
Original file line number Diff line number Diff line change @@ -13,8 +13,12 @@ elif [[ $(uname) == "Linux" ]]; then
13
13
echo " ::set-env name=CCACHE_INSTALLED::1"
14
14
fi
15
15
else
16
- echo " Unsupported platform, this script must run on a MacOS or Linux machine."
17
- exit 1
16
+ platform=windows
17
+ # On Windows, we have an additional dependency for Strings
18
+ curl -LSs \ curl -LSs \
19
+ " https://download.sysinternals.com/files/Strings.zip" \
20
+ --output Strings.zip
21
+ unzip -q Strings.zip && rm -f Strings.zip
18
22
fi
19
23
20
24
if [[ -z $( which cmake) ]]; then
@@ -28,11 +32,16 @@ if [[ -z $(which python) ]]; then
28
32
else
29
33
updated_pip=0
30
34
if ! $( echo " import absl" $' \n ' " import google.protobuf" | python - 2> /dev/null) ; then
31
- echo " Installing python packages."
32
- set -x
33
- sudo python -m pip install --upgrade pip
34
- pip install absl-py protobuf
35
- set +x
35
+ echo " Installing python packages."
36
+ set -x
37
+ # On Windows bash shell, sudo doesn't exist
38
+ if [[ $( uname) == " Linux" ]] || [[ $( uname) == " Darwin" ]]; then
39
+ sudo python -m pip install --upgrade pip
40
+ else
41
+ python -m pip install --upgrade pip
42
+ fi
43
+ pip install absl-py protobuf
44
+ set +x
36
45
fi
37
46
fi
38
47
You can’t perform that action at this time.
0 commit comments