forked from getsentry/sentry-java
-
Notifications
You must be signed in to change notification settings - Fork 0
131 lines (113 loc) · 3.84 KB
/
Copy pathbuild.yml
File metadata and controls
131 lines (113 loc) · 3.84 KB
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
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
name: Workflow Ubuntu macOS
on:
push:
branches:
- main
pull_request:
branches:
- '*'
env:
CMAKE_VERSION: "3.10.2.4988404"
jobs:
build:
name: Build Job ${{ matrix.os }}
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]
steps:
- name: Git checkout
uses: actions/checkout@v2
# Zulu Community distribution of OpenJDK
- name: set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8
# sudo is required for linux
# required because macOS doesn't have cmake 3.10 installed by default
- name: Install cmake 3.10.2
run: sudo ${ANDROID_HOME}/tools/bin/sdkmanager --install "cmake;${CMAKE_VERSION}"
# use sequential key when bumping dependencies till single lock file is out of preview
# https://docs.gradle.org/current/userguide/dependency_locking.html#single_lock_file_per_project
- name: Cache Gradle Caches
uses: actions/cache@v1
with:
path: ~/.gradle/caches/
key: cache-gradle-cache-3
- name: Cache Gradle Wrapper
uses: actions/cache@v1
with:
path: ~/.gradle/wrapper/
key: cache-gradle-wrapper-3
# uses eskatos/gradle-command-action, so we don't care for ./gradlew or gradlew.bat
# - name: Clean and Build
# uses: eskatos/gradle-command-action@v1
# with:
# arguments: clean build
- 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: Stop Gradle
# uses: eskatos/gradle-command-action@v1
# with:
# arguments: --stop
- name: Make stop
run: make stop
- name: Archive packages
# We need artifacts from only one the builds
if: ${{ matrix.os }} == ubuntu-latest
uses: actions/upload-artifact@v2
with:
name: packages
path: ./*/build/distributions/*.zip
release:
## Only run on a release branch
if: github.event_name == 'push' && contains(github.ref, 'refs/heads/release')
needs: [build]
name: Release
runs-on: ubuntu-latest
steps:
- name: Download packages
uses: actions/download-artifact@v2
with:
name: artifacts
path: ./*/build/distributions/*.zip
- uses: actions/setup-node@v1
- name: Install Zeus
run: |
yarn global add @zeus-ci/cli
echo "::add-path::$(yarn global bin)"
- name: Upload to Zeus
env:
ZEUS_API_TOKEN: ${{ secrets.ZEUS_TOKEN }}
ZEUS_HOOK_BASE: ${{ secrets.ZEUS_HOOK_BASE }}
run: |
zeus job update -b $GITHUB_RUN_ID -j $GITHUB_RUN_NUMBER -r $GITHUB_SHA
zeus upload -b $GITHUB_RUN_ID -j $GITHUB_RUN_NUMBER -t "application/zip+maven" *.zip
zeus job update --status=passed -b $GITHUB_RUN_ID -j $GITHUB_RUN_NUMBER -r $GITHUB_SHA
build-and-deploy-javadocs:
## Only run on a release branch
if: github.event_name == 'push' && contains(github.ref, 'refs/heads/release')
name: Build and deploy Javadocs
runs-on: ubuntu-latest
steps:
- name: Checkout 🛎️
uses: actions/checkout@v2.3.1
- name: set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8
- name: Generate Aggregate Javadocs
run: |
./gradlew aggregateJavadocs
- name: Deploy
uses: JamesIves/github-pages-deploy-action@3.7.1
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BRANCH: gh-pages
FOLDER: build/docs/javadoc
CLEAN: true