-
Notifications
You must be signed in to change notification settings - Fork 3
145 lines (134 loc) · 5.13 KB
/
LinuxCI.yml
File metadata and controls
145 lines (134 loc) · 5.13 KB
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
name: SpaRcle Common Linux CI
on:
workflow_call:
inputs:
buildDebug:
required: true
type: string
buildRelease:
required: true
type: string
artifactPush:
required: true
type: string
jobs:
Build:
name: Build.
runs-on: ubuntu-latest
steps:
- name: Fetching repository.
uses: actions/checkout@v3
with:
fetch-depth: 1
- name: Installing dependencies.
run: |
wget -qO- https://packages.lunarg.com/lunarg-signing-key-pub.asc | sudo tee /etc/apt/trusted.gpg.d/lunarg.asc
sudo wget -qO /etc/apt/sources.list.d/lunarg-vulkan-jammy.list http://packages.lunarg.com/vulkan/lunarg-vulkan-jammy.list
sudo apt update
sudo apt-get install -y ${{ env.dependencies }}
sudo pip install numpy
sudo pip install clang
env:
dependencies: ${{ vars.UBUNTU_DEPENDENCIES }}
- name: Updating submodules.
run: git submodule --quiet update --init --recursive --depth 1 --jobs 4
- name: Installing Ninja.
uses: ashutoshvarma/setup-ninja@v1.1
with:
version: '1.10.2'
dest: '${{github.workspace}}/../ninja'
- name: Creating Building Environment.
run: |
cmake -E make_directory ${{github.workspace}}/build-debug
cmake -E make_directory ${{github.workspace}}/build-release
- if: inputs.buildRelease == 'true'
name: Building Release.
shell: bash
working-directory: ${{github.workspace}}/build-release
run: |
echo "releaseSuccessful=false" >> "$GITHUB_ENV"
cmake -G "Ninja" ../ -DCMAKE_BUILD_TYPE=Release -DSR_UTILS_CI_BUILD=ON
cmake --build . -j 4
echo "releaseSuccessful=true" >> "$GITHUB_ENV"
- if: inputs.buildDebug == 'true'
name: Building Debug.
shell: bash
working-directory: ${{github.workspace}}/build-debug
run: |
echo "debugSuccessful=false" >> "$GITHUB_ENV"
cmake -G "Ninja" ../ -DCMAKE_BUILD_TYPE=Debug -DSR_UTILS_CI_BUILD=ON
cmake --build . -j 4
echo "debugSuccessful=true" >> "$GITHUB_ENV"
#- if: inputs.buildDebug == 'true'
# name: Creating a Debug build trace.
# shell: bash
# working-directory: ${{github.workspace}}/CI
# run: python ninjatracing.py ../build-debug/.ninja_log > trace-debug.json
#- if: inputs.buildRelease == 'true'
# name: Creating a Release build trace.
# shell: bash
# working-directory: ${{github.workspace}}/CI
# run: python ninjatracing.py ../build-release/.ninja_log > trace-release.json
# - if: inputs.buildDebug == 'true'
# name: Uploading a Debug build trace artifact.
# uses: actions/upload-artifact@v3
# with:
# name: 'SREngine Debug Linux Build Trace Artifact'
# path: '${{github.workspace}}/CI/trace-debug.json'
#
# - if: inputs.buildRelease == 'true'
# name: Uploading a Release build trace artifact.
# uses: actions/upload-artifact@v3
# with:
# name: 'SREngine Release Linux Build Trace Artifact'
# path: '${{github.workspace}}/CI/trace-release.json'
#
# - if: env.debugSuccessful == 'true'
# name: Creating Debug artifact.
# working-directory: ${{github.workspace}}/build-debug/Engine
# shell: bash
# run: |
# mkdir SREngineDebugBuild
# mkdir SREngineDebugBuild/Bin
# cp SREngine SREngineDebugBuild/Bin
# cd ../../
# cp -r Resources build-debug/Engine/SREngineDebugBuild
#
# - if: env.releaseSuccessful == 'true'
# name: Creating Release artifact.
# working-directory: ${{github.workspace}}/build-release/Engine
# shell: bash
# run: |
# mkdir SREngineReleaseBuild
# mkdir SREngineReleaseBuild/Bin
# cp SREngine SREngineDebugBuild/Bin
# cd ../../
# cp -r Resources build-release/Engine/SREngineReleaseBuild
#
# - if: env.debugSuccessful == 'true'
# name: Uploading a successful Debug build artifact.
# uses: actions/upload-artifact@v3
# with:
# name: SREngine Linux Debug
# path: '${{github.workspace}}/build-debug/Engine/SREngineDebugBuild'
#
# - if: env.releaseSuccessful == 'true'
# name: Uploading a successful Release build artifact.
# uses: actions/upload-artifact@v3
# with:
# name: SREngine Linux Release
# path: '${{github.workspace}}/build-release/Engine/SREngineReleaseBuild'
#
# - if: env.debugSuccessful == 'false' || inputs.artifactPush == 'true'
# name: Uploading a failed Debug build artifact.
# uses: actions/upload-artifact@v3
# with:
# name: 'SREngine Linux Failed Debug'
# path: '${{github.workspace}}/build-debug'
#
# - if: env.releaseSuccessful == 'false' || inputs.artifactPush == 'true'
# name: Uploading a failed Release build artifact.
# uses: actions/upload-artifact@v3
# with:
# name: 'SREngine Linux Failed Release'
# path: '${{github.workspace}}/build-release'