-
Notifications
You must be signed in to change notification settings - Fork 26
133 lines (128 loc) · 3.88 KB
/
pull-request.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
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
132
133
name: Pull Request
on:
workflow_dispatch:
pull_request:
paths:
- ".github/**"
- "apps/**"
- "bindings/**"
- "include/**"
- "src/**"
- "test/**"
branches: [main]
env:
TARGET: Release
jobs:
build_and_test:
name: ${{ matrix.name }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
name:
[
"ubuntu-20.04-clang-10.0.0",
"ubuntu-18.04-gcc-9.3.0",
"ubuntu-18.04-clang-10.0.0",
"macos-10.15-xcode-12.0",
"windows-2022-gcc-9.2.0",
"windows-2022-msvc-latest",
]
include:
- name: ubuntu-20.04-clang-10.0.0
os: ubuntu-20.04
compiler: clang
version: "10"
- name: ubuntu-18.04-gcc-9.3.0
os: ubuntu-18.04
compiler: gcc
version: "9"
- name: ubuntu-18.04-clang-10.0.0
os: ubuntu-18.04
compiler: clang
version: "10"
- name: macOS-10.15-xcode-12.0
os: macOS-10.15
compiler: xcode
version: "12"
- name: windows-2022-gcc-9.2.0
os: windows-2022
compiler: gcc
version: "9"
- name: windows-2022-msvc-latest
os: windows-2022
compiler: msvc
version: "latest"
steps:
- name: Checkout Code
uses: actions/checkout@v2
- name: Change Directory
run: cd ${{ github.workspace }}
- name: Install .NET 6
uses: actions/setup-dotnet@v2
with:
dotnet-version: 6.0.x
- name: Update Environment
if: runner.os == 'Linux'
run: |
sudo apt-get update
if [ "${{ matrix.compiler }}" = "gcc" ]; then
echo "CC=gcc-${{ matrix.version }}" >> $GITHUB_ENV
echo "CXX=g++-${{ matrix.version }}" >> $GITHUB_ENV
else
sudo apt-get install -y clang-${{ matrix.version }} g++-multilib
echo "CC=clang-${{ matrix.version }}" >> $GITHUB_ENV
echo "CXX=clang++-${{ matrix.version }}" >> $GITHUB_ENV
fi
- name: Update Environment
if: runner.os == 'macOS'
run: |
ls -ls /Applications/
ls -ls $ANDROID_SDK_ROOT/ndk
sudo xcode-select -switch /Applications/Xcode_${{ matrix.version }}.app
- name: Update Environment
if: (runner.os == 'Windows' && matrix.compiler != 'msvc')
uses: msys2/setup-msys2@v2
with:
update: true
install: mingw-w64-x86_64-gcc
- name: Configure Environment
run: make environment
- name: Run Tests
if: (runner.os == 'Linux' && matrix.os != 'ubuntu-20.04')
run: make test
- name: Run Tests
if: runner.os == 'macOS'
run: make test
- name: Run Tests
if: (runner.os == 'Windows' && matrix.compiler != 'msvc')
run: make test
- name: Run Tests
if: (runner.os == 'Windows' && matrix.compiler == 'msvc')
run: make test-msvc
- name: Run .Net Tests
run: make test-netstandard
- name: Run Sanitizer
if: (runner.os == 'Linux' && matrix.os == 'ubuntu-20.04')
run: make sanitize-asan
- name: Run Benchmarks
if: (runner.os == 'Linux' || runner.os == 'macOS')
run: make bench
- name: Make Release Build
if: runner.os == 'Linux'
env:
NDK_PATH: $$ANDROID_SDK_ROOT/ndk/21.3.6528147
run: |
make build
# if [ "${{ matrix.compiler }}" = "clang" ]; then
# make build-android
# fi
- name: Make Release Build
if: runner.os == 'macOS'
env:
NDK_PATH: $$ANDROID_HOME/ndk/21.3.6528147
run: |
make build
# make build-android
# make build-ios
# make build-netstandard