67 lines (59 loc) · 1.96 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
name: "Workflow Ubuntu macOS"
on:
push:
branches:
- main
- release/**
pull_request:
jobs:
build:
name: Build Job ${{ matrix.os }} - Java ${{ matrix.java }}
runs-on: ${{ matrix.os }}
strategy:
# we want that the matrix keeps running, default is to cancel them if it fails.
fail-fast: false
matrix:
# TODO: windows-latest
os: [ubuntu-latest, macos-latest]
# Zulu Community distribution of OpenJDK
java: [ '11' ]
steps:
- name: Git checkout
uses: actions/checkout@v2
- name: "Set up Java: ${{ matrix.java }}"
uses: actions/setup-java@v2
with:
java-version: ${{ matrix.java }}
distribution: 'adopt'
- name: Cache Gradle packages
uses: actions/cache@v2
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-
# Clean, check formatting, build and do a dry release
- name: Make all
run: make all
# We stop gradle at the end to make sure the cache folders
# don't contain any lock files and are free to be cached.
- name: Make stop
run: make stop
- name: Archive packages
# We need artifacts from only one the builds
if: runner.os == 'Linux' && matrix.java == '11'
uses: actions/upload-artifact@v2
with:
name: ${{ github.sha }}
if-no-files-found: error
path: |
./*/build/distributions/*.zip
./sentry-android-ndk/build/intermediates/merged_native_libs/release/out/lib/*
- name: Upload coverage to Codecov
# We need coverage data from only one the builds
if: runner.os == 'Linux' && matrix.java == '11'
uses: codecov/codecov-action@v2
with:
name: sentry-java