generated from ut-issl/repository-template
-
Notifications
You must be signed in to change notification settings - Fork 1
185 lines (160 loc) · 5.01 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
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
172
173
174
175
176
177
178
179
180
181
182
183
184
185
name: Build
on:
push:
branches:
- main
- develop
pull_request:
env:
S2E_CORE_VERSION: v6.0.0
C2A_CORE_VERSION: develop
jobs:
build_s2e_win:
name: Build on Windows VS2022
runs-on: windows-2022
strategy:
fail-fast: false
matrix:
use_c2a: ['USE_C2A=OFF', 'USE_C2A=ON']
steps:
- name: checkout S2E core
uses: actions/checkout@v4
with:
path: s2e-core
repository: ut-issl/s2e-core
ref: '${{ env.S2E_CORE_VERSION }}'
fetch-depth: 1
- name: checkout S2E user
uses: actions/checkout@v4
with:
path: s2e-user
- name: checkout C2A core
if: contains(matrix.use_c2a, 'ON')
uses: actions/checkout@v4
with:
path: c2a-core
repository: ut-issl/c2a-core
ref: '${{ env.C2A_CORE_VERSION }}'
fetch-depth: 1
- name: setup C2A
if: contains(matrix.use_c2a, 'ON')
shell: cmd
working-directory: c2a-core
run: setup.bat
- name: Configure build for x86
uses: ilammy/msvc-dev-cmd@v1
with:
arch: amd64_x86
- name: show tools version
shell: powershell
run: |
cmake --version
- name: cache extlib
id: cache-extlib
uses: actions/cache@v3
with:
key: extlib-${{ runner.os }}-${{ hashFiles('./s2e-core/ExtLibraries/**') }}
path: ./s2e-core/ExtLibraries
- name: build extlib
if: steps.cache-extlib.outputs.cache-hit != 'true'
shell: powershell
working-directory: ./s2e-core/ExtLibraries
run: |
$extlib_dir=(pwd).Path
cmake -G "Visual Studio 17 2022" -A Win32 -DCMAKE_CONFIGURATION_TYPES:STRING="Debug" -DEXT_LIB_DIR="${extlib_dir}"
cmake --build . --clean-first
- name: install extlib
if: steps.cache-extlib.outputs.cache-hit != 'true'
shell: powershell
working-directory: ./s2e-core/ExtLibraries
run: |
cmake --install .
- name: check extlib
shell: powershell
working-directory: ./s2e-core/ExtLibraries
run: |
ls cspice
ls cspice/cspice_msvs/lib
ls cspice/include
ls cspice/generic_kernels
ls nrlmsise00
ls nrlmsise00/table
ls nrlmsise00/lib
ls nrlmsise00/lib/libnrlmsise00.lib
ls nrlmsise00/src
- name: build
working-directory: ./s2e-user
shell: cmd
run: |
cl.exe
cmake -G "Visual Studio 17 2022" -A Win32 -DCMAKE_CONFIGURATION_TYPES:STRING="Debug" -DEXT_LIB_DIR=../s2e-core/ExtLibraries -DFLIGHT_SW_DIR=../c2a-core -DC2A_NAME=Examples/minimum_user -D${{ matrix.use_c2a }}
cmake --build . --clean-first
build_s2e_linux:
name: Build on Linux
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
use_c2a: ['USE_C2A=OFF', 'USE_C2A=ON']
steps:
- name: checkout S2E core
uses: actions/checkout@v4
with:
path: s2e-core
repository: ut-issl/s2e-core
ref: '${{ env.S2E_CORE_VERSION }}'
fetch-depth: 1
- name: checkout S2E user
uses: actions/checkout@v4
with:
path: s2e-user
- name: checkout C2A core
if: contains(matrix.use_c2a, 'ON')
uses: actions/checkout@v4
with:
path: c2a-core
repository: ut-issl/c2a-core
ref: '${{ env.C2A_CORE_VERSION }}'
fetch-depth: 1
- name: setup C2A
if: contains(matrix.use_c2a, 'ON')
working-directory: c2a-core
run: ./setup.sh
- name: install deps
run: |
sudo apt-get update
sudo apt-get install -y gcc-multilib g++-multilib
- name: cache extlib
id: cache-extlib
uses: actions/cache@v3
with:
key: extlib-${{ runner.os }}-${{ hashFiles('./s2e-core/ExtLibraries/**') }}
path: s2e-core/ExtLibraries
- name: build extlib
if: steps.cache-extlib.outputs.cache-hit != 'true'
working-directory: ./s2e-core/ExtLibraries
run: |
cmake . -DEXT_LIB_DIR="$(pwd)"
cmake --build .
- name: install extlib
if: steps.cache-extlib.outputs.cache-hit != 'true'
working-directory: ./s2e-core/ExtLibraries
run: |
cmake --install .
- name: check extlib
working-directory: ./s2e-core/ExtLibraries
run: |
ls cspice
ls cspice/cspice_unix
ls cspice/include
ls cspice/generic_kernels
ls nrlmsise00
ls nrlmsise00/table
ls nrlmsise00/lib
ls nrlmsise00/lib/libnrlmsise00.a
ls nrlmsise00/src
- name: build
working-directory: ./s2e-user
run: |
cmake . -DEXT_LIB_DIR=../s2e-core/ExtLibraries -DFLIGHT_SW_DIR=../c2a-core -DC2A_NAME=Examples/minimum_user -D${{ matrix.use_c2a }} -DUSE_SCI_COM_WINGS=OFF
cmake --build .