Skip to content

Add sideband control PTY for FS and reset lines (#374) #627

Add sideband control PTY for FS and reset lines (#374)

Add sideband control PTY for FS and reset lines (#374) #627

Workflow file for this run

# This is a basic workflow to help you get started with Actions
name: Automated Tests
# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the master branch
on:
push:
branches: [ master ]
tags:
- "v*"
pull_request:
branches: [ master ]
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
part_tests:
# The type of runner that the job will run on
runs-on: ubuntu-22.04
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- name: Checkout ${{ github.event.pull_request.head.ref }}
uses: actions/checkout@v3
if: ${{ github.event.pull_request }}
with:
repository: vintagepc/MK404.git
ref: ${{ github.event.pull_request.head.sha }}
submodules: true
- name: Checkout ${{ github.event.ref }}
uses: actions/checkout@v3
if: ${{ !github.event.pull_request }}
with:
repository: vintagepc/MK404.git
ref: ${{ github.event.ref }}
submodules: true
- name: Cache packages
uses: actions/cache@v3.0.11
id: cache-pkgs
with:
path: "packages"
key: "pkgs-1_0_1-test"
restore-keys: "pkgs-1_0_1-test"
- name: Setup cache dir
if: ${{ ! steps.cache-valgrind.outputs.cache-hit }}
run: mkdir -p packages/partial
- name: Install packages
run: |
sudo apt-get update
sudo apt-get -o Dir::Cache::Archives=`pwd`/packages install libelf-dev gcc-avr avr-libc libglew-dev freeglut3-dev libsdl2-dev lcov xvfb mesa-utils
- name: Cache permissions
run: sudo chmod -R 744 packages
- name: Prepare CMake build
run: mkdir ${{ runner.workspace }}/MK404/build && cd ${{ runner.workspace }}/MK404/build && cmake -DENABLE_GCOV=1 -DSANITY_TESTS=1 -DRUNNER_ENV=1 ..
- name: Build Einsy
run: cd ${{ runner.workspace }}/MK404/build && make -j2
- name: Run tests
id: test_pts
continue-on-error: true
run: |
cd ${{ runner.workspace }}/MK404/build
make Test_Parts -j1
- run: cd ${{ runner.workspace }}/MK404/build && tar -zcvf snaps_core.tar.gz tests/snaps/
- name: Upload report
uses: actions/upload-artifact@v3.1.1
with:
name: Report
path: |
${{ runner.workspace }}/MK404/build/snaps_core.tar.gz
# ${{ runner.workspace }}/MK404/build/Coverage.tar.gz
- name: Upload coverage artifact
uses: actions/upload-artifact@v3.1.1
with:
name: Coverage
path: |
${{ runner.workspace }}/MK404/build/parts.info
${{ runner.workspace }}/MK404/build/CMakeFiles/MK404.dir/
- name: Report failure
if: steps.test_pts.outcome == 'failure'
run: test -n ""
# - name: Comment on PR
# if: ${{ github.event.pull_request }}
# uses: marocchino/sticky-pull-request-comment@v1
# with:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# path: ${{ runner.workspace }}/MK404/build/summary.txt
ext1_tests:
# The type of runner that the job will run on
runs-on: ubuntu-22.04
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- name: Checkout ${{ github.event.pull_request.head.ref }}
uses: actions/checkout@v3
if: ${{ github.event.pull_request }}
with:
repository: vintagepc/MK404.git
ref: ${{ github.event.pull_request.head.sha }}
submodules: true
- name: Checkout ${{ github.event.ref }}
uses: actions/checkout@v3
if: ${{ !github.event.pull_request }}
with:
repository: vintagepc/MK404.git
ref: ${{ github.event.ref }}
submodules: true
- name: Cache packages
uses: actions/cache@v3.0.11
id: cache-pkgs
with:
path: "packages"
key: "pkgs-1_0_1-test"
restore-keys: "pkgs-1_0_1-test"
- name: Setup cache dir
if: ${{ ! steps.cache-valgrind.outputs.cache-hit }}
run: mkdir -p packages/partial
- name: Install packages
run: |
sudo apt-get update
sudo apt-get -o Dir::Cache::Archives=`pwd`/packages install libelf-dev gcc-avr avr-libc libglew-dev freeglut3-dev libsdl2-dev lcov xvfb mesa-utils
- name: Cache permissions
run: sudo chmod -R 744 packages
- name: Prepare CMake build
run: mkdir ${{ runner.workspace }}/MK404/build && cd ${{ runner.workspace }}/MK404/build && cmake -DENABLE_GCOV=1 -DSANITY_TESTS=1 -DRUNNER_ENV=1 ..
- name: Build Einsy
run: cd ${{ runner.workspace }}/MK404/build && make -j2
- name: Run tests
id: tests_ext
continue-on-error: true
run: |
cd ${{ runner.workspace }}/MK404/build
make Test_ext1 -j1
- run: cd ${{ runner.workspace }}/MK404/build && tar -zcvf snaps_ext1.tar.gz tests/snaps/
- name: Upload report
uses: actions/upload-artifact@v3.1.1
with:
name: Report
path: |
${{ runner.workspace }}/MK404/build/snaps_ext1.tar.gz
- name: Upload coverage artifact
uses: actions/upload-artifact@v3.1.1
with:
name: Coverage2
path: |
${{ runner.workspace }}/MK404/build/ext1.info
${{ runner.workspace }}/MK404/build/CMakeFiles/MK404.dir/
- name: Report failure
if: steps.tests_ext.outcome == 'failure'
run: echo ${{ steps.tests_ext.outcome }} && test -n ""
Upload_Coverage:
# The type of runner that the job will run on
runs-on: ubuntu-22.04
needs: [ext1_tests, part_tests]
steps:
- name: Checkout ${{ github.event.pull_request.head.ref }}
uses: actions/checkout@v3
if: ${{ github.event.pull_request }}
with:
repository: vintagepc/MK404.git
ref: ${{ github.event.pull_request.head.sha }}
submodules: true
- name: Checkout ${{ github.event.ref }}
uses: actions/checkout@v3
if: ${{ !github.event.pull_request }}
with:
repository: vintagepc/MK404.git
ref: ${{ github.event.ref }}
submodules: true
- name: Retrieve coverage reports
uses: actions/download-artifact@v3.0.2
with:
name: Coverage
path: parts
- name: Retrieve coverage reports
uses: actions/download-artifact@v3.0.2
with:
name: Coverage2
path: ext1
- name: Upload to codecov.io
uses: codecov/codecov-action@v2.1.0
with:
# Comma-separated list of files to upload
files: ./parts/parts.info,./ext1/ext1.info
# Specify whether or not CI build should fail if Codecov runs into an error during upload
fail_ci_if_error: true
# Comma-separated list, see the README for options and their usage
# functionalities: # optional
# Specify whether the Codecov output should be verbose
verbose: true