-
Notifications
You must be signed in to change notification settings - Fork 1.9k
79 lines (72 loc) · 2.54 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
79
name: Build Status
# Step 1: Build on pull-requests or pushes to main
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
# Step 2: Build the samples
build-java:
name: Build
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
regex:
- "java/advanced/APIDemo"
- "java/advanced/InlineAdaptiveBannerExample"
- "java/advanced/RewardedSSVExample"
- "kotlin/advanced/APIDemo"
- "kotlin/advanced/InlineAdaptiveBannerExample"
- "kotlin/advanced/JetpackComposeDemo"
- "java/admob/AppOpenExample"
- "java/admob/BannerExample"
- "java/admob/FullScreenNativeExample"
- "java/admob/InterstitialExample"
- "java/admob/NativeAdvancedExample"
- "java/admob/RewardedInterstitialExample"
- "java/admob/RewardedVideoExample"
- "kotlin/admob/AppOpenExample"
- "kotlin/admob/BannerExample"
- "kotlin/admob/InterstitialExample"
- "kotlin/admob/NativeAdvancedExample"
- "kotlin/admob/RewardedInterstitialExample"
- "kotlin/admob/RewardedVideoExample"
- "java/admanager/AppOpenExample"
- "java/admanager/BannerExample"
- "java/admanager/InterstitialExample"
- "java/admanager/NativeAdsExample"
- "java/admanager/RewardedInterstitialExample"
- "java/admanager/RewardedVideoExample"
- "kotlin/admanager/AppOpenExample"
- "kotlin/admanager/BannerExample"
- "kotlin/admanager/InterstitialExample"
- "kotlin/admanager/NativeAdsExample"
- "kotlin/admanager/RewardedInterstitialExample"
- "kotlin/admanager/RewardedVideoExample"
steps:
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: 17
- name: Clone Repo
uses: actions/checkout@v1
- name: Validate projects
run: .github/workflows/build/folder-crawler.sh
shell: bash
- name: Set commit range (push to the main branch, e.g. merge)
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
run: echo "COMMIT_RANGE="${{ github.event.before }}.."" >> $GITHUB_ENV
- name: Set commit range (pull request)
if: github.event_name == 'pull_request'
run: echo "COMMIT_RANGE="HEAD~.."" >> $GITHUB_ENV
- name: Build
run: .github/workflows/build/build.sh
shell: bash
env:
COMMIT_RANGE: ${{ env.COMMIT_RANGE }}
REGEX: ${{ matrix.regex }}