Skip to content

Add CubeWheel emulation. #175

Add CubeWheel emulation.

Add CubeWheel emulation. #175

Workflow file for this run

name: Build
on:
push:
branches:
- main
- develop
pull_request:
types: [opened, synchronize, reopened, labeled]
paths:
- '.github/workflows/build.yml'
- 'CMakeLists.txt'
- 'CMakeSettings.json'
- 'src/**'
env:
C2A_AOBC_VERSION: v6.1.4
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:
- uses: actions/checkout@v4
- name: checkout the submodules
uses: actions/checkout@v4
with:
submodules: recursive
- name: checkout C2A AOBC
if: contains(matrix.use_c2a, 'ON')
uses: actions/checkout@v4
with:
path: c2a-aobc
repository: ut-issl/c2a-aobc
ref: '${{ env.C2A_AOBC_VERSION }}'
submodules: recursive
fetch-depth: 1
- 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 .
- 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
shell: cmd
working-directory: .
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=. -DC2A_NAME=c2a-aobc -D${{ matrix.use_c2a }}
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++'] # 一旦clangは外す
build_bit: ['BUILD_64BIT=OFF'] #, 'BUILD_64BIT=ON'] # 一旦32bitのみですすめる
use_c2a: ['USE_C2A=OFF', 'USE_C2A=ON']
steps:
- uses: actions/checkout@v4
- name: checkout the submodules
uses: actions/checkout@v4
with:
submodules: recursive
- name: checkout C2A AOBC
if: contains(matrix.use_c2a, 'ON')
uses: actions/checkout@v4
with:
path: c2a-aobc
repository: ut-issl/c2a-aobc
ref: '${{ env.C2A_AOBC_VERSION }}'
submodules: recursive
fetch-depth: 1
- 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: ./s2e-core/ExtLibraries
- name: build extlib
if: steps.cache-extlib.outputs.cache-hit != 'true'
working-directory: ./s2e-core/ExtLibraries
run: |
cmake -D${{ matrix.build_bit }} -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: .
env:
CC: ${{ steps.compiler.outputs.CC }}
CXX: ${{ steps.compiler.outputs.CXX }}
run: |
cmake . -D${{ matrix.build_bit }} -DEXT_LIB_DIR=./s2e-core/ExtLibraries -DFLIGHT_SW_DIR=. -DC2A_NAME=c2a-aobc -D${{ matrix.use_c2a }}
cmake --build .