Skip to content

Commit b15eb19

Browse files
authored
Merge pull request #49 from ut-issl/develop
Merge develop to main for v0.1.0
2 parents c0ddf90 + 17d2544 commit b15eb19

File tree

63 files changed

+4654
-21
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

63 files changed

+4654
-21
lines changed

.github/workflows/build.yml

Lines changed: 168 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,168 @@
1+
name: Build
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- develop
8+
pull_request:
9+
types: [opened, synchronize, reopened, labeled]
10+
paths:
11+
- '.github/workflows/build.yml'
12+
- 's2e-ff/CMakeLists.txt'
13+
- 's2e-ff/common.cmake'
14+
- 's2e-ff/CMakeSettings.json'
15+
- 's2e-ff/src/**'
16+
17+
jobs:
18+
build_s2e_win:
19+
name: Build on Windows VS2022
20+
# VS2022 を使うため
21+
runs-on: windows-2022
22+
strategy:
23+
fail-fast: false
24+
25+
steps:
26+
- uses: actions/checkout@v3
27+
28+
- name: checkout the submodules
29+
uses: actions/checkout@v3
30+
with:
31+
submodules: recursive
32+
33+
- name: Configure build for x86
34+
uses: ilammy/msvc-dev-cmd@v1
35+
with:
36+
arch: amd64_x86
37+
38+
- name: show tools version
39+
shell: powershell
40+
run: |
41+
cmake --version
42+
43+
- name: cache extlib
44+
id: cache-extlib
45+
uses: actions/cache@v3
46+
with:
47+
key: extlib-${{ runner.os }}-${{ hashFiles('./s2e-core/ExtLibraries/**') }}
48+
path: ExtLibraries
49+
50+
- name: build extlib
51+
if: steps.cache-extlib.outputs.cache-hit != 'true'
52+
shell: powershell
53+
working-directory: ./s2e-core/ExtLibraries
54+
run: |
55+
cmake -G "Visual Studio 17 2022" -A Win32 -DCMAKE_CONFIGURATION_TYPES:STRING="Debug"
56+
cmake --build .
57+
- name: install extlib
58+
if: steps.cache-extlib.outputs.cache-hit != 'true'
59+
shell: powershell
60+
working-directory: ./s2e-core/ExtLibraries
61+
run: |
62+
cmake --install .
63+
- name: check extlib
64+
shell: powershell
65+
working-directory: ./ExtLibraries
66+
run: |
67+
ls cspice
68+
ls cspice/cspice_msvs/lib
69+
ls cspice/include
70+
ls cspice/generic_kernels
71+
ls nrlmsise00
72+
ls nrlmsise00/table
73+
ls nrlmsise00/lib
74+
ls nrlmsise00/lib/libnrlmsise00.lib
75+
ls nrlmsise00/src
76+
77+
- name: build
78+
shell: cmd
79+
working-directory: ./s2e-ff
80+
run: |
81+
cl.exe
82+
cmake -G "Visual Studio 17 2022" -A Win32 -DCMAKE_CONFIGURATION_TYPES:STRING="Debug"
83+
cmake --build .
84+
85+
build_s2e_linux:
86+
name: Build on Linux
87+
runs-on: ubuntu-latest
88+
strategy:
89+
fail-fast: false
90+
matrix:
91+
compiler: ['gcc-11 g++-11', 'clang clang++']
92+
build_bit: ['BUILD_64BIT=OFF', 'BUILD_64BIT=ON']
93+
94+
steps:
95+
- uses: actions/checkout@v3
96+
97+
- name: checkout the submodules
98+
uses: actions/checkout@v3
99+
with:
100+
submodules: recursive
101+
102+
- name: set compiler
103+
id: compiler
104+
run: |
105+
COMPILER="${{ matrix.compiler }}"
106+
read -r -a COMPILER <<< "$COMPILER"
107+
echo "CC=${COMPILER[0]}" >> "$GITHUB_OUTPUT"
108+
echo "CXX=${COMPILER[1]}" >> "$GITHUB_OUTPUT"
109+
110+
- name: install deps
111+
run: |
112+
# FIXME: temporary install gcc-11 in ubuntu:focal
113+
if [[ "${{ steps.compiler.outputs.CC }}" =~ "gcc-11" ]]; then
114+
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
115+
fi
116+
sudo apt-get update
117+
if [[ "${{ steps.compiler.outputs.CC }}" =~ "gcc" ]]; then
118+
sudo apt-get install -y ${{ steps.compiler.outputs.CC }}-multilib \
119+
${{ steps.compiler.outputs.CXX }}-multilib
120+
else
121+
sudo apt-get install -y gcc-multilib g++-multilib
122+
fi
123+
124+
- name: show tools version
125+
run: |
126+
cmake --version
127+
${{ steps.compiler.outputs.CC }} --version
128+
${{ steps.compiler.outputs.CXX }} --version
129+
130+
- name: cache extlib
131+
id: cache-extlib
132+
uses: actions/cache@v3
133+
with:
134+
key: extlib-${{ runner.os }}-${{ hashFiles('./s2e-core/ExtLibraries/**') }}-${{ matrix.build_bit }}
135+
path: ExtLibraries
136+
137+
- name: build extlib
138+
if: steps.cache-extlib.outputs.cache-hit != 'true'
139+
working-directory: ./s2e-core/ExtLibraries
140+
run: |
141+
cmake -D${{ matrix.build_bit }}
142+
cmake --build .
143+
- name: install extlib
144+
if: steps.cache-extlib.outputs.cache-hit != 'true'
145+
working-directory: ./s2e-core/ExtLibraries
146+
run: |
147+
cmake --install .
148+
- name: check extlib
149+
working-directory: ./ExtLibraries
150+
run: |
151+
ls cspice
152+
ls cspice/cspice_unix*
153+
ls cspice/include
154+
ls cspice/generic_kernels
155+
ls nrlmsise00
156+
ls nrlmsise00/table
157+
ls nrlmsise00/lib*
158+
ls nrlmsise00/lib*/libnrlmsise00.a
159+
ls nrlmsise00/src
160+
161+
- name: build
162+
working-directory: ./s2e-ff
163+
env:
164+
CC: ${{ steps.compiler.outputs.CC }}
165+
CXX: ${{ steps.compiler.outputs.CXX }}
166+
run: |
167+
cmake . -D${{ matrix.build_bit }}
168+
cmake --build .

.github/workflows/check-format.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: check format
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- develop
8+
pull_request:
9+
paths:
10+
- '.github/workflows/check-format.yml'
11+
- '.clang-format'
12+
- 's2e-ff/src/**'
13+
14+
jobs:
15+
clang-format:
16+
runs-on: ubuntu-latest
17+
18+
steps:
19+
- uses: actions/checkout@v3
20+
with:
21+
fetch-depth: 2
22+
23+
- name: install clang-format
24+
run: |
25+
sudo apt-get update
26+
sudo apt-get install -y clang-format
27+
clang-format --version
28+
29+
- name: check clang-format version
30+
run: |
31+
clang-format --version
32+
md5sum "$(which git-clang-format)"
33+
head "$(which git-clang-format)"
34+
35+
- name: check format(push)
36+
if: github.event_name == 'push'
37+
run: |
38+
git-clang-format --commit HEAD^ --diff | tee format.patch
39+
40+
- name: check format(pull_request)
41+
if: github.event_name == 'pull_request'
42+
run: |
43+
git-clang-format --commit ${{ github.event.pull_request.base.sha }} --diff | tee format.patch
44+
45+
- name: check
46+
run: |
47+
git apply --allow-empty format.patch
48+
git status
49+
git diff --exit-code

.github/workflows/google_test.yml

Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
name: GoogleTest
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- develop
8+
pull_request:
9+
types: [opened, synchronize, reopened, labeled]
10+
paths:
11+
- '.github/workflows/google_test.yml'
12+
- 's2e-ff/CMakeLists.txt'
13+
- 's2e-ff/common.cmake'
14+
- 's2e-ff/CMakeSettings.json'
15+
- 's2e-ff/src/**'
16+
17+
env:
18+
GOOGLE_TEST_VERSION: release-1.12.1
19+
20+
jobs:
21+
build_s2e_test_linux:
22+
name: Build on Linux with test
23+
runs-on: ubuntu-latest
24+
strategy:
25+
fail-fast: false
26+
matrix:
27+
compiler: ['gcc-11 g++-11', 'clang clang++']
28+
29+
steps:
30+
- uses: actions/checkout@v3
31+
32+
- name: checkout the submodules
33+
uses: actions/checkout@v3
34+
with:
35+
submodules: recursive
36+
37+
- name: set compiler
38+
id: compiler
39+
run: |
40+
COMPILER="${{ matrix.compiler }}"
41+
read -r -a COMPILER <<< "$COMPILER"
42+
echo "CC=${COMPILER[0]}" >> "$GITHUB_OUTPUT"
43+
echo "CXX=${COMPILER[1]}" >> "$GITHUB_OUTPUT"
44+
45+
- name: install deps
46+
run: |
47+
# FIXME: temporary install gcc-11 in ubuntu:focal
48+
if [[ "${{ steps.compiler.outputs.CC }}" =~ "gcc-11" ]]; then
49+
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
50+
fi
51+
sudo apt-get update
52+
if [[ "${{ steps.compiler.outputs.CC }}" =~ "gcc" ]]; then
53+
sudo apt-get install -y ${{ steps.compiler.outputs.CC }}-multilib \
54+
${{ steps.compiler.outputs.CXX }}-multilib
55+
else
56+
sudo apt-get install -y gcc-multilib g++-multilib
57+
fi
58+
59+
- name: show tools version
60+
run: |
61+
cmake --version
62+
${{ steps.compiler.outputs.CC }} --version
63+
${{ steps.compiler.outputs.CXX }} --version
64+
65+
- name: cache extlib
66+
id: cache-extlib
67+
uses: actions/cache@v3
68+
with:
69+
key: extlib-${{ runner.os }}-${{ hashFiles('./s2e-core/ExtLibraries/**') }}-BUILD_64BIT=ON
70+
path: ExtLibraries
71+
72+
- name: build extlib
73+
if: steps.cache-extlib.outputs.cache-hit != 'true'
74+
working-directory: ./s2e-core/ExtLibraries
75+
run: |
76+
cmake -DBUILD_64BIT=ON
77+
cmake --build .
78+
- name: install extlib
79+
if: steps.cache-extlib.outputs.cache-hit != 'true'
80+
working-directory: ./s2e-core/ExtLibraries
81+
run: |
82+
cmake --install .
83+
- name: check extlib
84+
working-directory: ./ExtLibraries
85+
run: |
86+
ls cspice
87+
ls cspice/cspice_unix*
88+
ls cspice/include
89+
ls cspice/generic_kernels
90+
ls nrlmsise00
91+
ls nrlmsise00/table
92+
ls nrlmsise00/lib*
93+
ls nrlmsise00/lib*/libnrlmsise00.a
94+
ls nrlmsise00/src
95+
96+
- name: build
97+
working-directory: ./s2e-ff
98+
env:
99+
CC: ${{ steps.compiler.outputs.CC }}
100+
CXX: ${{ steps.compiler.outputs.CXX }}
101+
run: |
102+
cmake . -DBUILD_64BIT=ON -DGOOGLE_TEST=ON
103+
cmake --build .
104+
105+
- name: run test
106+
working-directory: ./s2e-ff
107+
run: ./S2E_FF_TEST
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: validate / renovate.json
2+
3+
on:
4+
pull_request:
5+
paths:
6+
- 'renovate.json'
7+
- '.github/workflows/validate-renovate.yml'
8+
9+
jobs:
10+
validate-renovate:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- uses: actions/checkout@v3
15+
- uses: actions/setup-node@v3
16+
17+
- name: install
18+
run: |
19+
npm install -g renovate
20+
- name: validate
21+
run: |
22+
renovate-config-validator

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ s2e-ff/data/**/logs/
1313

1414
# ExtLibraries
1515
ExtLibraries/
16+
src-core/ExtLibraries/
1617
s2e-ff/scripts/tmp_cspice/
1718

1819
# Executables
@@ -33,3 +34,6 @@ Icon
3334
.Spotlight-V100
3435
.Trashes
3536

37+
# Python
38+
__pycache__/
39+

0 commit comments

Comments
 (0)