generated from ut-issl/repository-template
-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #235 from ut-issl/develop
Merge develop into main for v5.1.0 release
- Loading branch information
Showing
113 changed files
with
68,055 additions
and
704 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,6 +6,7 @@ on: | |
- main | ||
- develop | ||
pull_request: | ||
types: [opened, synchronize, reopened, labeled] | ||
paths: | ||
- '.github/workflows/build.yml' | ||
- 'ExtLibraries/**' | ||
|
@@ -14,6 +15,10 @@ on: | |
- 'CMakeSettings.json' | ||
- 'src/**' | ||
|
||
env: | ||
# datasource=github-releases depName=ut-issl/c2a-core | ||
C2A_CORE_VERSION: v3.7.0 | ||
|
||
jobs: | ||
build_s2e_win: | ||
name: Build on Windows VS2022 | ||
|
@@ -33,7 +38,7 @@ jobs: | |
with: | ||
path: c2a-core | ||
repository: ut-issl/c2a-core | ||
ref: v3.4.0 | ||
ref: ${{ env.C2A_CORE_VERSION }} | ||
fetch-depth: 1 | ||
|
||
- name: setup C2A | ||
|
@@ -91,16 +96,28 @@ jobs: | |
shell: cmd | ||
run: | | ||
cl.exe | ||
cmake -G "Visual Studio 17 2022" -A Win32 -DCMAKE_CONFIGURATION_TYPES:STRING="Debug" -DEXT_LIB_DIR=./ExtLibraries -DFLIGHT_SW_DIR=./c2a-core -DC2A_NAME=Examples/minimum_user_for_s2e -D${{ matrix.use_c2a }} | ||
cmake -G "Visual Studio 17 2022" -A Win32 -DCMAKE_CONFIGURATION_TYPES:STRING="Debug" -DEXT_LIB_DIR=./ExtLibraries -DFLIGHT_SW_DIR=./c2a-core -DC2A_NAME=Examples/minimum_user -D${{ matrix.use_c2a }} | ||
cmake --build . | ||
- name: fix simulation config | ||
shell: bash | ||
working-directory: ./data/SampleSat/ini | ||
run: | | ||
find . -type f -name '*.ini' -exec sed -i 's/..\/..\/..\/ExtLibraries/..\/..\/ExtLibraries/g' {} \; | ||
- name: run simulation(SampleSat) | ||
working-directory: ./data/SampleSat | ||
run: | | ||
..\..\Debug\S2E.exe | ||
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 | ||
|
@@ -137,14 +154,14 @@ jobs: | |
id: cache-extlib | ||
uses: actions/cache@v3 | ||
with: | ||
key: extlib-${{ runner.os }}-${{ hashFiles('./ExtLibraries/**') }} | ||
key: extlib-${{ runner.os }}-${{ hashFiles('./ExtLibraries/**') }}-${{ matrix.build_bit }} | ||
path: ExtLibraries | ||
|
||
- name: build extlib | ||
if: steps.cache-extlib.outputs.cache-hit != 'true' | ||
working-directory: ./ExtLibraries | ||
run: | | ||
cmake . -DEXT_LIB_DIR="$(pwd)" | ||
cmake . -DEXT_LIB_DIR="$(pwd)" -D${{ matrix.build_bit }} | ||
cmake --build . | ||
- name: install extlib | ||
if: steps.cache-extlib.outputs.cache-hit != 'true' | ||
|
@@ -155,19 +172,85 @@ jobs: | |
working-directory: ./ExtLibraries | ||
run: | | ||
ls cspice | ||
ls cspice/cspice_unix | ||
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/lib* | ||
ls nrlmsise00/lib*/libnrlmsise00.a | ||
ls nrlmsise00/src | ||
- name: build | ||
env: | ||
CC: ${{ steps.compiler.outputs.CC }} | ||
CXX: ${{ steps.compiler.outputs.CXX }} | ||
run: | | ||
cmake . -DEXT_LIB_DIR=./ExtLibraries | ||
cmake . -DEXT_LIB_DIR=./ExtLibraries -D${{ matrix.build_bit }} | ||
cmake --build . | ||
- name: fix simulation config | ||
working-directory: ./data/SampleSat/ini | ||
run: | | ||
find . -type f -name '*.ini' -exec sed -i 's/..\/..\/..\/ExtLibraries/..\/..\/ExtLibraries/g' {} \; | ||
- name: run simulation(SampleSat) | ||
working-directory: ./data/SampleSat | ||
run: | | ||
../../S2E | ||
- name: generate graph | ||
working-directory: ./data/SampleSat | ||
run: | | ||
sudo apt-get install -y gnuplot | ||
pip3 install yq | ||
LOG=$(ls logs/logs_*/*.csv) | ||
echo "plot $LOG" | ||
./gen_graph.sh "${LOG}" | ||
ls | ||
ls ./imgs | ||
- name: read python version from Pipfile | ||
id: python-version | ||
working-directory: ./scripts/Plot | ||
run: | | ||
ver=$(grep python_version ./Pipfile | sed -e 's/^python_version\s=\s"\(.*\)"$/\1/') | ||
echo "version=$ver" >> "$GITHUB_OUTPUT" | ||
- uses: actions/[email protected] | ||
with: | ||
python-version: ${{ steps.python-version.outputs.version }} | ||
|
||
- name: plot GS visibility | ||
working-directory: ./scripts/Plot | ||
run: | | ||
pip install pipenv | ||
pipenv install | ||
pipenv run python plot_gs_visibility.py --no-gui | ||
ls ./*_gs_visibility.png | ||
- name: upload imgs | ||
id: upload_imgs | ||
working-directory: ./scripts/Plot | ||
if: contains(matrix.compiler, 'clang') && contains(matrix.build_bit, 'OFF') && contains(github.event.pull_request.labels.*.name, 'automation::comment-graph') | ||
run: | | ||
IMG=$(ls ./*_gs_visibility.png) | ||
IMG_URL=$(curl -sL -X POST upload.gyazo.com/upload.cgi -F "imagedata=@${IMG}") | ||
echo "gyazo url: ${IMG_URL}" | ||
IMG_EMBED_URL="${IMG_URL//gyazo/i.gyazo}.png" | ||
echo "gyazo embed url: ${IMG_EMBED_URL}" | ||
echo "IMG_EMBED_URL=${IMG_EMBED_URL}" >> "$GITHUB_OUTPUT" | ||
- name: comment imgs | ||
if: contains(matrix.compiler, 'clang') && contains(matrix.build_bit, 'OFF') && contains(github.event.pull_request.labels.*.name, 'automation::comment-graph') | ||
uses: actions/[email protected] | ||
with: | ||
script: | | ||
const output = `## \`position.png\` | ||
![position](${{ steps.upload_imgs.outputs.IMG_EMBED_URL }})`; | ||
github.rest.issues.createComment({ | ||
issue_number: context.issue.number, | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
body: output | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,102 @@ | ||
name: GoogleTest | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
- develop | ||
pull_request: | ||
types: [opened, synchronize, reopened, labeled] | ||
paths: | ||
- '.github/workflows/google-test.yml' | ||
- 'ExtLibraries/**' | ||
- 'CMakeLists.txt' | ||
- 'common.cmake' | ||
- 'src/**' | ||
|
||
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('./ExtLibraries/**') }}} | ||
path: ExtLibraries | ||
|
||
- name: build extlib | ||
if: steps.cache-extlib.outputs.cache-hit != 'true' | ||
working-directory: ./ExtLibraries | ||
run: | | ||
cmake . -DEXT_LIB_DIR="$(pwd)" -DBUILD_64BIT=ON | ||
cmake --build . | ||
- name: install extlib | ||
if: steps.cache-extlib.outputs.cache-hit != 'true' | ||
working-directory: ./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 | ||
env: | ||
CC: ${{ steps.compiler.outputs.CC }} | ||
CXX: ${{ steps.compiler.outputs.CXX }} | ||
run: | | ||
cmake . -DEXT_LIB_DIR=./ExtLibraries -DBUILD_64BIT=ON -DGOOGLE_TEST=ON | ||
cmake --build . | ||
- name: run test | ||
run: ./S2E_TEST |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
name: Validate scripts | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
- develop | ||
pull_request: | ||
paths: | ||
- '.github/workflows/validate-scripts.yml' | ||
- 'scripts/**' | ||
|
||
jobs: | ||
validate_script: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
script_dir: ['./scripts/Plot'] | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: read python version from Pipfile | ||
id: python-version | ||
working-directory: ${{ matrix.script_dir }} | ||
run: | | ||
ver=$(grep python_version ./Pipfile | sed -e 's/^python_version\s=\s"\(.*\)"$/\1/') | ||
echo "version=${ver}" >> "$GITHUB_OUTPUT" | ||
- uses: actions/[email protected] | ||
with: | ||
python-version: ${{ steps.python-version.outputs.version }} | ||
|
||
- name: install pipenv | ||
run: pip install pipenv | ||
|
||
- name: install Plot script dependencies | ||
working-directory: ${{ matrix.script_dir }} | ||
run: | | ||
pipenv install | ||
pipenv graph |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -32,3 +32,5 @@ Icon | |
.Spotlight-V100 | ||
.Trashes | ||
|
||
# Python | ||
__pycache__/ |
Oops, something went wrong.