-
Notifications
You must be signed in to change notification settings - Fork 51
87 lines (72 loc) · 2.46 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
80
81
82
83
84
85
86
87
name: Substrate Build
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
build:
name: Build
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
steps:
- name: Install packages (Linux)
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install at-spi2-core build-essential libgtk-3-dev libxtst-dev libavcodec-dev libavformat-dev libasound2-dev libgl-dev
- uses: actions/checkout@v2
- name: Add msbuild to PATH (Windows)
if: runner.os == 'Windows'
uses: microsoft/[email protected]
- name: Visual Studio shell (Windows)
if: runner.os == 'Windows'
uses: egor-tensin/vs-shell@v1
- name: Setup Gluon's GraalVM
uses: gluonhq/setup-graalvm@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Shutdown and Reset all Simulators (MacOS)
if: runner.os == 'macOS'
run: sudo xcrun simctl shutdown all && sudo xcrun simctl erase all
- name: Checkout
uses: actions/checkout@v2
- name: Setup Java 11
uses: actions/setup-java@v1
with:
java-version: 11
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Run Tests (Linux)
if: runner.os == 'Linux'
run: |
export DISPLAY=:90
Xvfb -ac :90 -screen 0 1280x1024x24 > /dev/null 2>&1 &
./gradlew -i test
- name: Run Tests (MacOS)
if: runner.os == 'macOS'
run: |
./gradlew -i test
- name: Run Tests (Windows)
if: runner.os == 'Windows'
run: |
./gradlew -i test
- name: Build project
run: ./gradlew -i build -x test
- name: Deploy Snapshot
if: runner.os == 'Linux' && github.ref == 'refs/heads/master'
run: ./gradlew publish -PsonatypeUsername=$SONATYPE_USERNAME -PsonatypePassword=$SONATYPE_PASSWORD
env:
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
- name: Draft release
if: runner.os == 'Linux' && github.ref == 'refs/heads/master'
# Drafts your next Release notes as Pull Requests are merged into "master"
uses: release-drafter/release-drafter@v5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}