-
Notifications
You must be signed in to change notification settings - Fork 51
78 lines (68 loc) · 2.19 KB
/
build.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
name: Build
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v2
with:
distribution: 'zulu'
java-version: '17'
- name: build
run: ./gradlew build
- name: show reports on failure
if: ${{ failure() }}
run: cat app/build/reports/*
upload-to-transifex:
runs-on: ubuntu-latest
if: ${{ github.event_name == 'push' }}
needs: build
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v3
- name: push sources to transifex
uses: transifex/cli-action@v2
with:
token: ${{ secrets.TX_TOKEN }}
upload-to-coverity:
runs-on: ubuntu-latest
if: ${{ github.event_name == 'push' }}
needs: build
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v2
with:
distribution: 'zulu'
java-version: '17'
- name: download coverity tools
run: |
curl -Lf \
-o cov-analysis-linux64.tar.gz \
--form project=bfabiszewski/ulogger-android \
--form token=$TOKEN \
https://scan.coverity.com/download/linux64
mkdir cov-analysis-linux64
tar xzf cov-analysis-linux64.tar.gz --strip 1 -C cov-analysis-linux64
env:
TOKEN: ${{ secrets.COVERITY_SCAN_TOKEN }}
- name: build with cov-build
run: |
export PATH=`pwd`/cov-analysis-linux64/bin:$PATH
cov-build --dir cov-int ./gradlew -Dorg.gradle.jvmargs= --no-daemon assemble
- name: upload results to coverity-scan
run: |
tar czvf cov-int.tgz cov-int
curl -Lf \
--form token=$TOKEN \
--form [email protected] \
--form [email protected] \
--form version="`git describe --tags`" \
--form description="ulogger-android `git describe --tags`" \
"https://scan.coverity.com/builds?project=bfabiszewski/ulogger-android"
env:
TOKEN: ${{ secrets.COVERITY_SCAN_TOKEN }}