Skip to content

Merge pull request #31 from ut-issl/renovate/actions-checkout-4.x #99

Merge pull request #31 from ut-issl/renovate/actions-checkout-4.x

Merge pull request #31 from ut-issl/renovate/actions-checkout-4.x #99

Workflow file for this run

name: Build
on:
push:
branches:
- main
- develop
pull_request:
env:
S2E_CORE_VERSION: v6.0.0
C2A_CORE_VERSION: develop
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:
- name: checkout S2E core
uses: actions/checkout@v4
with:
path: s2e-core
repository: ut-issl/s2e-core
ref: '${{ env.S2E_CORE_VERSION }}'
fetch-depth: 1
- name: checkout S2E user
uses: actions/checkout@v4
with:
path: s2e-user
- name: checkout C2A core
if: contains(matrix.use_c2a, 'ON')
uses: actions/checkout@v4
with:
path: c2a-core
repository: ut-issl/c2a-core
ref: '${{ env.C2A_CORE_VERSION }}'
fetch-depth: 1
- name: setup C2A
if: contains(matrix.use_c2a, 'ON')
shell: cmd
working-directory: c2a-core
run: setup.bat
- 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 . --clean-first
- 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
working-directory: ./s2e-user
shell: cmd
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=../c2a-core -DC2A_NAME=Examples/minimum_user -D${{ matrix.use_c2a }}
cmake --build . --clean-first
build_s2e_linux:
name: Build on Linux
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
use_c2a: ['USE_C2A=OFF', 'USE_C2A=ON']
steps:
- name: checkout S2E core
uses: actions/checkout@v4
with:
path: s2e-core
repository: ut-issl/s2e-core
ref: '${{ env.S2E_CORE_VERSION }}'
fetch-depth: 1
- name: checkout S2E user
uses: actions/checkout@v4
with:
path: s2e-user
- name: checkout C2A core
if: contains(matrix.use_c2a, 'ON')
uses: actions/checkout@v4
with:
path: c2a-core
repository: ut-issl/c2a-core
ref: '${{ env.C2A_CORE_VERSION }}'
fetch-depth: 1
- name: setup C2A
if: contains(matrix.use_c2a, 'ON')
working-directory: c2a-core
run: ./setup.sh
- name: install deps
run: |
sudo apt-get update
sudo apt-get install -y gcc-multilib g++-multilib
- 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'
working-directory: ./s2e-core/ExtLibraries
run: |
cmake . -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: ./s2e-user
run: |
cmake . -DEXT_LIB_DIR=../s2e-core/ExtLibraries -DFLIGHT_SW_DIR=../c2a-core -DC2A_NAME=Examples/minimum_user -D${{ matrix.use_c2a }} -DUSE_SCI_COM_WINGS=OFF
cmake --build .