-
Notifications
You must be signed in to change notification settings - Fork 45
171 lines (148 loc) · 5.22 KB
/
main.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
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
# This is a basic workflow to help you get started with Actions
name: CI
# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the master branch
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
name: ${{ matrix.name }}-build-and-test
# The type of runner that the job will run on
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
name: [windows-latest, ubuntu-22.04]
include:
- name: windows-latest
os: windows-latest
config: win64-vstudio-debug
physx: vc17
physxkey: vc17
anyfx: anyfxcompiler-windows
- name: ubuntu-22.04
os: ubuntu-22.04
config: vulkan-linux-ninja-debug
physx: linux
physxkey: linux
anyfx: anyfxcompiler-linux
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
- name: setup-msbuild
if: startsWith(matrix.name, 'windows')
uses: microsoft/setup-msbuild@v1
- name: Set up Python 3.x
uses: actions/setup-python@v3
with:
python-version: '3.x' # Semantic version range syntax or exact version of a Python version
architecture: 'x64' # Optional - x64 or x86, defaults to x64
- name: Clone dependencies
run: |
pip install py7zr
python fips fetch
python fips set config ${{ matrix.config }}
- name: Fix clang version
if: startsWith(matrix.os, 'ubuntu')
run: |
echo "CC=clang-14" >> $GITHUB_ENV
echo "CXX=clang++-14" >> $GITHUB_ENV
- name: Setup missing software
if: startsWith(matrix.os, 'ubuntu')
run: |
sudo apt-get update
sudo apt-get install libgl1-mesa-dev libglu1-mesa-dev ninja-build libxcursor-dev libxrandr-dev libxrandr-dev libxinerama-dev libxi-dev uuid-dev libcurl4-gnutls-dev libbsd-dev libxxf86vm-dev
- name: Store Deploy folder
id: deploy
shell: bash
run: |
pushd ..
echo "root_dir=$(python -c 'import os; print(os.path.abspath(os.getcwd()));')" >> "$GITHUB_OUTPUT"
- name: Check PhysX version
id: physx-rev
shell: bash
run: |
pushd ../physx
echo "gitrev=$(git rev-parse HEAD)" >> "$GITHUB_OUTPUT"
popd
- name: Cache PhysX
id: cache-physx
uses: actions/cache@v3
with:
path: ${{ steps.deploy.outputs.root_dir }}/fips-deploy/physx
key: ${{ runner.os }}-physx-deploy-${{ steps.physx-rev.outputs.gitrev }}
- name: Build PhysX
if: steps.cache-physx.outputs.cache-hit != 'true'
run: |
python fips physx build ${{ matrix.physx }} debug
- name: Check Anyfx version
id: anyfx-rev
shell: bash
run: |
pushd ../fips-anyfx
echo "gitrev=$(git rev-parse HEAD)" >> "$GITHUB_OUTPUT"
popd
- name: Check for Anyfx cached build
id: cache-anyfx
uses: actions/cache@v3
with:
path: ${{ steps.deploy.outputs.root_dir }}/fips-deploy/fips-anyfx
key: ${{ runner.os }}-anyfx-${{ steps.anyfx-rev.outputs.gitrev }}
- name: Build AnyfxCompiler
if: steps.cache-anyfx.outputs.cache-hit != 'true'
run: |
pushd ../fips-anyfx
python fips build ${{ matrix.anyfx }}
popd
# Runs a set of commands using the runners shell
- name: Run prebuild steps
run: |
python fips nebula set work tests
python fips nebula set toolkit .
python fips ultralight
python fips gen
- name: Compile
run: |
python fips build
- name: Run Tests
run: |
python fips run testmath
python fips run testfoundation
Notify:
runs-on: ubuntu-latest
needs: [build]
name: Notify
if: cancelled() == false
steps:
- name: Notification
uses: gscept/action-telegram@v1.1.1
with:
botToken: ${{ secrets.BotToken }}
chatId: ${{ secrets.ChatID }}
jobStatus: ${{ needs.build.result }}
skipSuccess: false
Documentation:
runs-on: ubuntu-latest
name: Documentation
if: ${{ github.event_name == 'push' }}
steps:
- uses: actions/checkout@v2
- name: Doxygen Action
uses: mattnotmitt/doxygen-action@v1.1.0
with:
# Path to Doxyfile
doxyfile-path: "./Doxyfile" # default is ./Doxyfile
# Working directory
working-directory: "./documentation" # default is .
- name: Doxygen
uses: peaceiris/actions-gh-pages@v3
with:
deploy_key: ${{ secrets.NEB_DOC }}
external_repository: gscept/nebula-doc
publish_dir: ./documentation/html/