Skip to content

Commit

Permalink
Merge pull request #235 from ut-issl/develop
Browse files Browse the repository at this point in the history
Merge develop into main for v5.1.0 release
  • Loading branch information
200km authored Nov 25, 2022
2 parents 13bbb06 + 12e5951 commit 97fd87a
Show file tree
Hide file tree
Showing 113 changed files with 68,055 additions and 704 deletions.
52 changes: 50 additions & 2 deletions .github/labels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,57 @@
color: "510f70"

- name: "C2A"
description: ""
description: "Something related with C2A flight software"
color: "2a9637"

- name: "WINGS"
description: ""
description: "Something related with WINGS ground station"
color: "1503bb"

- name: "automation::comment-graph"
description: "comment simulation result graph on pull request"
color: "d4c5f9"

- name: "gui"
description: "graphical user interface"
color: "781306"

- name: "test"
description: "test of the codes"
color: "25D18F"

- name: "dynamics"
description: "dynamics calculation"
color: "F007D6"

- name: "environment"
description: "environment calculation"
color: "A917ED"

- name: "disturbance"
description: "disturbance calculation"
color: "2B6EA1"

- name: "component"
description: "component emulation"
color: "6DF99D"

- name: "library"
description: "library"
color: "2275B4"

- name: "simulation"
description: "simulation settings"
color: "D9E868"

- name: "patch"
description: "backwards compatible bug fixes"
color: "08C036"

- name: "minor update"
description: "add functionality in a backwards compatible manner"
color: "EFFA85"

- name: "major update"
description: "incompatible API changes"
color: "B60205"
99 changes: 91 additions & 8 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ on:
- main
- develop
pull_request:
types: [opened, synchronize, reopened, labeled]
paths:
- '.github/workflows/build.yml'
- 'ExtLibraries/**'
Expand All @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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'
Expand All @@ -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
})
102 changes: 102 additions & 0 deletions .github/workflows/google-test.yml
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
2 changes: 1 addition & 1 deletion .github/workflows/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- uses: actions/checkout@v3

- name: Run Labeler
uses: crazy-max/ghaction-github-labeler@v3
uses: crazy-max/ghaction-github-labeler@v4
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
yaml-file: .github/labels.yml
Expand Down
42 changes: 42 additions & 0 deletions .github/workflows/validate-scripts.yml
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
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,5 @@ Icon
.Spotlight-V100
.Trashes

# Python
__pycache__/
Loading

0 comments on commit 97fd87a

Please sign in to comment.