Skip to content

Commit

Permalink
Merge pull request #49 from ut-issl/develop
Browse files Browse the repository at this point in the history
Merge develop to main for v0.1.0
  • Loading branch information
200km authored Apr 13, 2023
2 parents c0ddf90 + 17d2544 commit b15eb19
Show file tree
Hide file tree
Showing 63 changed files with 4,654 additions and 21 deletions.
168 changes: 168 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,168 @@
name: Build

on:
push:
branches:
- main
- develop
pull_request:
types: [opened, synchronize, reopened, labeled]
paths:
- '.github/workflows/build.yml'
- 's2e-ff/CMakeLists.txt'
- 's2e-ff/common.cmake'
- 's2e-ff/CMakeSettings.json'
- 's2e-ff/src/**'

jobs:
build_s2e_win:
name: Build on Windows VS2022
# VS2022 を使うため
runs-on: windows-2022
strategy:
fail-fast: false

steps:
- uses: actions/checkout@v3

- name: checkout the submodules
uses: actions/checkout@v3
with:
submodules: recursive

- 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: ExtLibraries

- name: build extlib
if: steps.cache-extlib.outputs.cache-hit != 'true'
shell: powershell
working-directory: ./s2e-core/ExtLibraries
run: |
cmake -G "Visual Studio 17 2022" -A Win32 -DCMAKE_CONFIGURATION_TYPES:STRING="Debug"
cmake --build .
- 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: ./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
shell: cmd
working-directory: ./s2e-ff
run: |
cl.exe
cmake -G "Visual Studio 17 2022" -A Win32 -DCMAKE_CONFIGURATION_TYPES:STRING="Debug"
cmake --build .
build_s2e_linux:
name: Build on Linux
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
compiler: ['gcc-11 g++-11', 'clang clang++']
build_bit: ['BUILD_64BIT=OFF', 'BUILD_64BIT=ON']

steps:
- uses: actions/checkout@v3

- name: checkout the submodules
uses: actions/checkout@v3
with:
submodules: recursive

- name: set compiler
id: compiler
run: |
COMPILER="${{ matrix.compiler }}"
read -r -a COMPILER <<< "$COMPILER"
echo "CC=${COMPILER[0]}" >> "$GITHUB_OUTPUT"
echo "CXX=${COMPILER[1]}" >> "$GITHUB_OUTPUT"
- name: install deps
run: |
# FIXME: temporary install gcc-11 in ubuntu:focal
if [[ "${{ steps.compiler.outputs.CC }}" =~ "gcc-11" ]]; then
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
fi
sudo apt-get update
if [[ "${{ steps.compiler.outputs.CC }}" =~ "gcc" ]]; then
sudo apt-get install -y ${{ steps.compiler.outputs.CC }}-multilib \
${{ steps.compiler.outputs.CXX }}-multilib
else
sudo apt-get install -y gcc-multilib g++-multilib
fi
- name: show tools version
run: |
cmake --version
${{ steps.compiler.outputs.CC }} --version
${{ steps.compiler.outputs.CXX }} --version
- name: cache extlib
id: cache-extlib
uses: actions/cache@v3
with:
key: extlib-${{ runner.os }}-${{ hashFiles('./s2e-core/ExtLibraries/**') }}-${{ matrix.build_bit }}
path: ExtLibraries

- name: build extlib
if: steps.cache-extlib.outputs.cache-hit != 'true'
working-directory: ./s2e-core/ExtLibraries
run: |
cmake -D${{ matrix.build_bit }}
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: ./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-ff
env:
CC: ${{ steps.compiler.outputs.CC }}
CXX: ${{ steps.compiler.outputs.CXX }}
run: |
cmake . -D${{ matrix.build_bit }}
cmake --build .
49 changes: 49 additions & 0 deletions .github/workflows/check-format.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: check format

on:
push:
branches:
- main
- develop
pull_request:
paths:
- '.github/workflows/check-format.yml'
- '.clang-format'
- 's2e-ff/src/**'

jobs:
clang-format:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
with:
fetch-depth: 2

- name: install clang-format
run: |
sudo apt-get update
sudo apt-get install -y clang-format
clang-format --version
- name: check clang-format version
run: |
clang-format --version
md5sum "$(which git-clang-format)"
head "$(which git-clang-format)"
- name: check format(push)
if: github.event_name == 'push'
run: |
git-clang-format --commit HEAD^ --diff | tee format.patch
- name: check format(pull_request)
if: github.event_name == 'pull_request'
run: |
git-clang-format --commit ${{ github.event.pull_request.base.sha }} --diff | tee format.patch
- name: check
run: |
git apply --allow-empty format.patch
git status
git diff --exit-code
107 changes: 107 additions & 0 deletions .github/workflows/google_test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
name: GoogleTest

on:
push:
branches:
- main
- develop
pull_request:
types: [opened, synchronize, reopened, labeled]
paths:
- '.github/workflows/google_test.yml'
- 's2e-ff/CMakeLists.txt'
- 's2e-ff/common.cmake'
- 's2e-ff/CMakeSettings.json'
- 's2e-ff/src/**'

env:
GOOGLE_TEST_VERSION: release-1.12.1

jobs:
build_s2e_test_linux:
name: Build on Linux with test
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
compiler: ['gcc-11 g++-11', 'clang clang++']

steps:
- uses: actions/checkout@v3

- name: checkout the submodules
uses: actions/checkout@v3
with:
submodules: recursive

- name: set compiler
id: compiler
run: |
COMPILER="${{ matrix.compiler }}"
read -r -a COMPILER <<< "$COMPILER"
echo "CC=${COMPILER[0]}" >> "$GITHUB_OUTPUT"
echo "CXX=${COMPILER[1]}" >> "$GITHUB_OUTPUT"
- name: install deps
run: |
# FIXME: temporary install gcc-11 in ubuntu:focal
if [[ "${{ steps.compiler.outputs.CC }}" =~ "gcc-11" ]]; then
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
fi
sudo apt-get update
if [[ "${{ steps.compiler.outputs.CC }}" =~ "gcc" ]]; then
sudo apt-get install -y ${{ steps.compiler.outputs.CC }}-multilib \
${{ steps.compiler.outputs.CXX }}-multilib
else
sudo apt-get install -y gcc-multilib g++-multilib
fi
- name: show tools version
run: |
cmake --version
${{ steps.compiler.outputs.CC }} --version
${{ steps.compiler.outputs.CXX }} --version
- name: cache extlib
id: cache-extlib
uses: actions/cache@v3
with:
key: extlib-${{ runner.os }}-${{ hashFiles('./s2e-core/ExtLibraries/**') }}-BUILD_64BIT=ON
path: ExtLibraries

- name: build extlib
if: steps.cache-extlib.outputs.cache-hit != 'true'
working-directory: ./s2e-core/ExtLibraries
run: |
cmake -DBUILD_64BIT=ON
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: ./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-ff
env:
CC: ${{ steps.compiler.outputs.CC }}
CXX: ${{ steps.compiler.outputs.CXX }}
run: |
cmake . -DBUILD_64BIT=ON -DGOOGLE_TEST=ON
cmake --build .
- name: run test
working-directory: ./s2e-ff
run: ./S2E_FF_TEST
22 changes: 22 additions & 0 deletions .github/workflows/validate-renovate.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: validate / renovate.json

on:
pull_request:
paths:
- 'renovate.json'
- '.github/workflows/validate-renovate.yml'

jobs:
validate-renovate:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3

- name: install
run: |
npm install -g renovate
- name: validate
run: |
renovate-config-validator
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ s2e-ff/data/**/logs/

# ExtLibraries
ExtLibraries/
src-core/ExtLibraries/
s2e-ff/scripts/tmp_cspice/

# Executables
Expand All @@ -33,3 +34,6 @@ Icon
.Spotlight-V100
.Trashes

# Python
__pycache__/

Loading

0 comments on commit b15eb19

Please sign in to comment.