From 845415b19d3d12751748e470b1a9e38f2459818c Mon Sep 17 00:00:00 2001 From: Joshua Anderson Date: Mon, 16 Aug 2021 14:27:47 -0700 Subject: [PATCH] Switch CI to run in VM instead docker container --- .github/actions/setup-dependencies.sh | 12 +++++++ .github/workflows/build-test.yml | 51 +++++++++------------------ 2 files changed, 29 insertions(+), 34 deletions(-) create mode 100755 .github/actions/setup-dependencies.sh diff --git a/.github/actions/setup-dependencies.sh b/.github/actions/setup-dependencies.sh new file mode 100755 index 00000000000..dd2187d0406 --- /dev/null +++ b/.github/actions/setup-dependencies.sh @@ -0,0 +1,12 @@ +#!/usr/bin/env bash +source /etc/lsb-release + +# TODO: Add setup for Ubuntu 20.04 +if [ "$DISTRIB_RELEASE" == "18.04" ]; then + sudo apt-get install -y git build-essential cmake python3 python3-setuptools python3-pip python3-venv valgrind doxygen +else + echo "Unsupported Operating System: $DISTRIB_DESCRIPTION" + exit 1 +fi + +pip3 --no-cache-dir install fprime-tools==2.0.2 fprime-gds==2.0 diff --git a/.github/workflows/build-test.yml b/.github/workflows/build-test.yml index b2cbce22226..dd1e6091817 100644 --- a/.github/workflows/build-test.yml +++ b/.github/workflows/build-test.yml @@ -12,18 +12,13 @@ on: # A workflow run is made up of one or more jobs that can run sequentially or in parallel jobs: - # This workflow contains 4 jobs. One for every CI test." Framework: - # The type of runner that the job will run on - runs-on: ubuntu-latest - container: - image: nasafprime/fprime-base:latest - - # Steps represent a sequence of tasks that will be executed as part of the job + runs-on: ubuntu-18.04 steps: # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - uses: actions/checkout@v2 - # Runs the CI action internal to the repository + - name: Setup Dependencies + run: ./.github/actions/setup-dependencies.sh - name: F prime CI step run: ./ci/tests/Framework.bash # Archive the outputs @@ -36,16 +31,12 @@ jobs: retention-days: 5 Ref: - # The type of runner that the job will run on - runs-on: ubuntu-latest - container: - image: nasafprime/fprime-base:latest - - # Steps represent a sequence of tasks that will be executed as part of the job + runs-on: ubuntu-18.04 steps: # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - uses: actions/checkout@v2 - # Runs the CI action internal to the repository + - name: Setup Dependencies + run: ./.github/actions/setup-dependencies.sh - name: F prime CI step run: ./ci/tests/Ref.bash # Archive the outputs @@ -58,16 +49,14 @@ jobs: retention-days: 5 RPI: - # The type of runner that the job will run on - runs-on: ubuntu-latest - container: - image: nasafprime/fprime-base:latest - - # Steps represent a sequence of tasks that will be executed as part of the job + runs-on: ubuntu-18.04 steps: # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - uses: actions/checkout@v2 - # Runs the CI action internal to the repository + - name: Setup Dependencies + run: ./.github/actions/setup-dependencies.sh + - name: Install RPI Toolchain + run: sudo git clone https://github.com/raspberrypi/tools.git /opt/rpi/tools - name: F prime CI step run: ./ci/tests/RPI.bash # Archive the outputs @@ -80,16 +69,12 @@ jobs: retention-days: 5 Integration: - # The type of runner that the job will run on - runs-on: ubuntu-latest - container: - image: nasafprime/fprime-base:latest - - # Steps represent a sequence of tasks that will be executed as part of the job + runs-on: ubuntu-18.04 steps: # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - uses: actions/checkout@v2 - # Runs the CI action internal to the repository + - name: Setup Dependencies + run: ./.github/actions/setup-dependencies.sh - name: F prime CI step run: ./ci/tests/30-ints.bash # Archive the outputs @@ -102,14 +87,12 @@ jobs: retention-days: 5 CMake: - # The type of runner that the job will run on - runs-on: ubuntu-latest - container: - image: nasafprime/fprime-base:latest + runs-on: ubuntu-18.04 steps: # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - uses: actions/checkout@v2 - # Runs CMake test cases + - name: Setup Dependencies + run: ./.github/actions/setup-dependencies.sh - name: CMake Tests working-directory: ./cmake/test run: pytest