Linux #622
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
name: Linux | |
on: | |
push: | |
schedule: | |
- cron: "0 2 * * 6" # every sunday at 2am | |
workflow_dispatch: | |
inputs: | |
verbose: | |
type: boolean | |
description: Enable verbose testing output | |
default: false | |
jobs: | |
ci: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
testSuffix: ${{ fromJSON('["BaseBehaviorTestStatic,BaseBehaviorTestDynamic,CodeGenTest_Base","MicrokitTests,Ros2Tests,HamrTranspileTests,GumboTest,CodegenTest_CASE"]') }} | |
name: '${{ matrix.testSuffix }}' | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- name: Retrieve versions.properties | |
run: | | |
wget -q https://raw.githubusercontent.com/sireum/kekinian/master/versions.properties | |
- name: Cache Java | |
id: cache-java | |
uses: actions/cache@v4 | |
with: | |
path: bin/linux/java | |
key: ${{ runner.os }}-${{ hashFiles('versions.properties') }}-java | |
- name: Cache Scala | |
id: cache-scala | |
uses: actions/cache@v4 | |
with: | |
path: bin/scala | |
key: ${{ runner.os }}-${{ hashFiles('versions.properties') }}-scala | |
- name: Cache Coursier | |
id: cache-coursier | |
uses: actions/cache@v4 | |
with: | |
path: cache/coursier | |
key: ${{ runner.os }}-${{ hashFiles('versions.properties') }}-coursier | |
- name: Cache OSATE | |
id: cache-osate | |
uses: actions/cache@v4 | |
with: | |
path: bin/linux/osate | |
key: ${{ runner.os }}-${{ hashFiles('jvm/src/main/resources/phantom_versions.properties') }}-osate | |
- name: Install ROS2 Jazzy | |
run: | | |
#apt update -y && apt install -y sudo | |
sudo apt update -y && sudo DEBIAN_FRONTEND=noninteractive apt install -y software-properties-common curl | |
sudo curl -sSL https://raw.githubusercontent.com/ros/rosdistro/master/ros.key -o /usr/share/keyrings/ros-archive-keyring.gpg | |
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/ros-archive-keyring.gpg] http://packages.ros.org/ros2/ubuntu $(. /etc/os-release && echo $UBUNTU_CODENAME) main" | sudo tee /etc/apt/sources.list.d/ros2.list > /dev/null | |
sudo apt update -y && sudo DEBIAN_FRONTEND=noninteractive apt install -y build-essential python3-colcon-common-extensions ros-jazzy-ros-base | |
- name: Test | |
env: | |
# add verbose flag if workflow is restarted with "enable debug logging" checked or if requested | |
# via workflow dispatch | |
VERBOSE_DEBUG: ${{ ( runner.debug == '1' || inputs.verbose == '1' ) && ',verbose' || '' }} | |
run: | | |
[ -d /opt/ros/jazzy ] && export ROS2_HOME=/opt/ros/jazzy | |
export COURSIER_CACHE=$GITHUB_WORKSPACE/cache/coursier | |
cd $GITHUB_WORKSPACE | |
# see https://github.com/sireum/osate-plugin/blob/57785407d84793cf1f8d5926647e4dc75ab197a9/org.sireum.aadl.osate.cli/src/org/sireum/aadl/osate/cli/Phantom.java#L508-L517 | |
export CHECK_PHANTOM_HAMR_API_COMPATIBILITY=true | |
export testmodes=phantom,sergen,slangcheck,tipe,ive,compile,generated_unit_tests,smt2${VERBOSE_DEBUG} | |
echo "testmodes=${testmodes}" | |
export SMT2_TIMEOUT=180000 | |
echo "SMT2_TIMEOUT=${SMT2_TIMEOUT}" | |
export ALSO_TRANSPILE_VIA_CALLBACKS=true | |
echo "ALSO_TRANSPILE_VIA_CALLBACKS=${ALSO_TRANSPILE_VIA_CALLBACKS}" | |
bin/build.cmd test --suffixes ${{ matrix. testSuffix }} |