forked from Tongsuo-Project/tongsuo-java-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
105 lines (89 loc) · 3.19 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
name: Continuous integration
on:
workflow_dispatch:
push:
pull_request:
schedule:
# Run every day at midnight UTC
- cron: '0 0 * * *'
jobs:
build-with-tongsuo-831:
strategy:
fail-fast: true
matrix:
platform: [ubuntu-latest]
include:
- platform: ubuntu-latest
tools_url: https://dl.google.com/android/repository/sdk-tools-linux-4333796.zip
runs-on: ${{ matrix.platform }}
steps:
- name: Set up JDK 11 for toolchains
uses: actions/[email protected]
with:
java-version: 11
- name: Set up JDK 8 for toolchains
uses: actions/[email protected]
with:
java-version: 8
- name: Set runner-specific environment variables
shell: bash
run: |
echo "ANDROID_HOME=${RUNNER_TEMP}/android-sdk" >> $GITHUB_ENV
echo "TONGSUO_HOME=${RUNNER_TEMP}/install" >> $GITHUB_ENV
echo "SDKMANAGER=${RUNNER_TEMP}/android-sdk/tools/bin/sdkmanager" >> $GITHUB_ENV
- name: checkout Tongsuo 8.3.1
uses: actions/checkout@v2
with:
repository: Tongsuo-Project/Tongsuo
ref: 8.3-stable
path: Tongsuo831
- name: Build Tongsuo831 on Linux
working-directory: ./Tongsuo831
run: |
./config --prefix=$TONGSUO_HOME enable-weak-ssl-ciphers
make -s -j4
make install
- uses: actions/checkout@v2
- name: Setup Linux environment
if: runner.os == 'Linux'
run: |
echo "CC=clang" >> $GITHUB_ENV
echo "CXX=clang++" >> $GITHUB_ENV
sudo dpkg --add-architecture i386
sudo add-apt-repository ppa:openjdk-r/ppa
sudo apt-get -qq update
sudo apt-get -qq install -y --no-install-recommends \
gcc-multilib \
g++-multilib \
ninja-build \
openjdk-8-jdk-headless \
openjdk-11-jre-headless
- name: Setup Android environment
shell: bash
if: runner.os == 'Linux'
run: |
cd "${{ runner.temp }}"
curl -L "${{ matrix.tools_url }}" -o android-tools.zip
mkdir -p "$ANDROID_HOME"
unzip -q android-tools.zip -d "$ANDROID_HOME"
yes | "$SDKMANAGER" --licenses || true
"$SDKMANAGER" tools | tr '\r' '\n' | uniq
"$SDKMANAGER" platform-tools | tr '\r' '\n' | uniq
"$SDKMANAGER" 'build-tools;28.0.3' | tr '\r' '\n' | uniq
"$SDKMANAGER" 'platforms;android-26' | tr '\r' '\n' | uniq
"$SDKMANAGER" 'extras;android;m2repository' | tr '\r' '\n' | uniq
"$SDKMANAGER" 'ndk;21.3.6528147' | tr '\r' '\n' | uniq
"$SDKMANAGER" 'cmake;3.10.2.4988404' | tr '\r' '\n' | uniq
- name: Build with Gradle
shell: bash
run: ./gradlew assemble -PcheckErrorQueue
- name: Test with Gradle
shell: bash
run: ./gradlew test -PcheckErrorQueue
- name: Other checks with Gradle
shell: bash
run: ./gradlew check -PcheckErrorQueue
- name: Build test JAR with dependencies
if: runner.os == 'Linux'
shell: bash
run: ./gradlew :conscrypt-openjdk:testJar -PcheckErrorQueue