-
Notifications
You must be signed in to change notification settings - Fork 52
98 lines (83 loc) · 2.75 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
88
89
90
91
92
93
94
95
96
97
98
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]
include:
- os: ubuntu-latest
ARCH: "x86_64"
- os: macos-latest
ARCH: "aarch64"
# - os: windows-latest
# ARCH: "x86_64"
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
with:
jdk: 'java23'
arch: ${{ matrix.ARCH }}
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
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '21'
- 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 }}