Linux #931
This file contains hidden or 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-24.04 | |
| # ros2 tests running in the github action started failing Jan 2026 due to | |
| # "ModuleNotFoundError: No module named 'ament_package'". It wasn't clear what change to the ubuntu-24.04 runner | |
| # caused the issue. Switching to a vanilla ubuntu-24.04 docker image resolved the issue | |
| container: | |
| image: ubuntu:24.04 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| testSuffix: ${{ fromJSON('["BaseBehaviorTestStatic,BaseBehaviorTestDynamic,CodeGenTest_Base","MicrokitBehaviorTests,MicrokitTests,Ros2Tests,HamrTranspileTests,GumboTest,CodegenTest_CASE"]') }} | |
| name: '${{ matrix.testSuffix }}' | |
| steps: | |
| - name: Install Required Tools | |
| run: | | |
| apt-get update -y && apt-get install -y git wget curl zip unzip build-essential | |
| - name: Checkout | |
| uses: actions/checkout@v5 | |
| 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@v5 | |
| with: | |
| path: bin/linux/java | |
| key: ${{ runner.os }}-${{ hashFiles('versions.properties') }}-java | |
| - name: Cache Scala | |
| id: cache-scala | |
| uses: actions/cache@v5 | |
| with: | |
| path: bin/scala | |
| key: ${{ runner.os }}-${{ hashFiles('versions.properties') }}-scala | |
| - name: Cache Coursier | |
| id: cache-coursier | |
| uses: actions/cache@v5 | |
| with: | |
| path: cache/coursier | |
| key: ${{ runner.os }}-${{ hashFiles('versions.properties') }}-coursier | |
| - name: Cache OSATE | |
| id: cache-osate | |
| uses: actions/cache@v5 | |
| with: | |
| path: bin/linux/osate | |
| key: ${{ runner.os }}-${{ hashFiles('jvm/src/main/resources/phantom_versions.properties') }}-osate | |
| - name: Install ROS2 Jazzy | |
| run: | | |
| apt-get update -y | |
| DEBIAN_FRONTEND=noninteractive TZ=Etc/UTC apt-get install software-properties-common -y | |
| add-apt-repository -y universe | |
| apt-get update -y | |
| export ROS_APT_SOURCE_VERSION=$(curl -s https://api.github.com/repos/ros-infrastructure/ros-apt-source/releases/latest | grep -F "tag_name" | awk -F\" '{print $4}') | |
| curl -L -o /tmp/ros2-apt-source.deb "https://github.com/ros-infrastructure/ros-apt-source/releases/download/${ROS_APT_SOURCE_VERSION}/ros2-apt-source_${ROS_APT_SOURCE_VERSION}.$(. /etc/os-release && echo ${UBUNTU_CODENAME:-${VERSION_CODENAME}})_all.deb" | |
| dpkg -i /tmp/ros2-apt-source.deb | |
| apt-get update -y | |
| apt-get install ros-dev-tools ros-jazzy-ros-base -y | |
| - 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 }} |