This repository has been archived by the owner on Jul 25, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
78 lines (70 loc) · 2.11 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
name: Build
on: [push, pull_request]
jobs:
build:
name: 'Build and Test project'
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
steps:
- name: 'Install SWIG'
run: |
case $THE_OS in
"windows-latest")
choco install swig --version 4.0.1
;;
"ubuntu-latest")
sudo apt update
sudo apt install -y libpcre3 libpcre3-dev
wget https://sourceforge.net/projects/swig/files/swig/swig-4.0.2/swig-4.0.2.tar.gz
tar -xzf swig-4.0.2.tar.gz
cd swig-4.0.2
./configure
make
sudo make install
cd ..
swig -version
;;
"macos-latest")
brew install swig
;;
*) echo "Unknown OS!";;
esac
shell: bash
env:
THE_OS: ${{ matrix.os }}
- name: 'Install OpenGL'
run: |
sudo apt install -y libglu1-mesa-dev
if: matrix.os == 'ubuntu-latest'
- uses: actions/setup-java@v1
with:
java-version: 8
- name: 'Clone Repo'
uses: actions/checkout@v1
- name: 'Compile and Link'
uses: eskatos/gradle-command-action@v1
with:
arguments: 'assemble --stacktrace'
wrapper-cache-enabled: false
env:
GITHUB_USER: ${{ github.actor }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: 'Test'
uses: eskatos/gradle-command-action@v1
with:
arguments: 'check --stacktrace'
wrapper-cache-enabled: false
env:
GITHUB_USER: ${{ github.actor }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: 'Publish'
uses: eskatos/gradle-command-action@v1
with:
arguments: 'smartPublish --stacktrace'
wrapper-cache-enabled: false
if: startsWith(github.ref, 'refs/tags/')
env:
GITHUB_USER: ${{ github.actor }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}