Skip to content

Add sideband control PTY for FS and reset lines #994

Add sideband control PTY for FS and reset lines

Add sideband control PTY for FS and reset lines #994

Workflow file for this run

# This is a basic workflow to help you get started with Actions
name: CI Build
# 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"
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, 'NO_BUILD')"
# 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_0-linux"
- 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 libglew-dev freeglut3-dev libsdl2-dev
- 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 -DCMAKE_BUILD_TYPE=RELEASE ..
- name: Build Einsy
run: cd ${{ runner.workspace }}/MK404/build && make -j2
- name: Checkout Wiki
uses: actions/checkout@v3
if: ${{ !github.event.pull_request }}
with:
repository: vintagepc/MK404.wiki.git
ref: 'master'
path: ref
- name: Regen docs
if: ${{ !github.event.pull_request }}
run: |
cd ${{ runner.workspace }}/MK404/build
make UpdateDocs
cd ${{ runner.workspace }}/MK404/ref
git add autogen/*
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git diff-index --quiet HEAD || git commit -m "Regen reference docs" && git push
- name: Assemble artifacts
if: ${{ !github.event.pull_request }}
run: |
cd ${{ runner.workspace }}/MK404/build
make Release_Package
- name: Upload artifact
if: ${{ !github.event.pull_request }}
uses: actions/upload-artifact@v3.1.1
with:
name: Binaries
path: ${{ runner.workspace }}/MK404/build/MK404-development-build.tar.bz2
build_osx:
# The type of runner that the job will run on
runs-on: macos-latest
if: "!contains(github.event.head_commit.message, 'NO_BUILD')"
# 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: Install packages
run: |
brew install --cask xquartz
brew tap osx-cross/homebrew-avr
brew install libelf freeglut glew SDL avr-gcc libpng
- name: Prepare CMake build
run: mkdir ${{ runner.workspace }}/MK404/build && cd ${{ runner.workspace }}/MK404/build && cmake -DCMAKE_BUILD_TYPE=RELEASE ..
- name: Build Einsy
run: |
cd ${{ runner.workspace }}/MK404/build && make -j2
cp MK404 MK404_OSX
- name: Upload OSX artifact
if: ${{ !github.event.pull_request }}
uses: actions/upload-artifact@v3.1.1
with:
name: Binaries
path: ${{ runner.workspace }}/MK404/build/MK404_OSX
build_cygwin:
# The type of runner that the job will run on
runs-on: windows-latest
if: "!contains(github.event.head_commit.message, 'NO_BUILD')"
steps:
- uses: actions/cache@v3.0.11
with:
path: C:\tools\chococache
key: ${{ runner.os }}-cygwin-${{ github.sha }}
restore-keys: |
${{ runner.os }}-cygwin-
- name: Cygwin package cache
uses: actions/cache@v3.0.11
with:
path: C:\tools\cygcache
key: ${{ runner.os }}-cygwinpkgs-1_1
restore-keys: |
${{ runner.os }}-cygwinpkgs-
- name: Install cygwin
run: |
choco config set cacheLocation C:\tools\chococache
choco install --no-progress cygwin
- name: Install cygwin dependencies
run: |
C:\tools\cygwin\cygwinsetup.exe -qgnNdO -l C:/tools/cygcache -R C:/tools/cygwin -s http://mirrors.kernel.org/sourceware/cygwin/ -P cmake,make,libelf-devel,gcc-core,gcc-g++,libstdc++-6-devel,git,libglut-devel,libGLEW-devel,libSDL_sound-devel,libSDL2-devel,avr-gcc,python3,libpng-devel
shell: cmd
- 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: Configure build
run: |
echo %USERPROFILE%
cd MK404
mkdir build
cd build
set PATH=C:\tools\cygwin\bin;C:\tools\cygwin\usr\bin
bash.exe -c "cmake -DCMAKE_BUILD_TYPE=RELEASE .."
shell: cmd
- name: Build
run: |
cd ${{runner.workspace}}\MK404\build
pwd
set PATH=C:\tools\cygwin\bin;C:\tools\cygwin\usr\bin
bash.exe -c "make -j2"
shell: cmd
- name: Upload Cygwin artifact
if: ${{ !github.event.pull_request }}
uses: actions/upload-artifact@v3.1.1
with:
name: Binaries
path: ${{ runner.workspace }}/MK404/build/MK404.exe
Publish:
runs-on: ubuntu-latest
if: ${{ !github.event.pull_request }}
needs: [build, build_osx, build_cygwin]
steps:
- name: Retrieve platform binaries
uses: actions/download-artifact@v3.0.2
with:
name: Binaries
- name: Extract assets
run: |
tar -jxvf MK404-development-build.tar.bz2
mv MK404_OSX MK404-dev/
mv MK404.exe MK404-dev/MK404-cygwin.exe
- name: Check tag version
id: get_version
if: startsWith(github.ref, 'refs/tags/v')
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//}
- name: Build ${{ steps.get_version.outputs.VERSION }} tarball
if: startsWith(github.ref, 'refs/tags/v')
run: |
mv MK404-dev MK404-${{ steps.get_version.outputs.VERSION }}
tar -jcvf MK404-${{ steps.get_version.outputs.VERSION }}-multiplatform.tar.bz2 MK404-${{ steps.get_version.outputs.VERSION }}
- name: RELEASE THE KRAKEN
if: startsWith(github.ref, 'refs/tags/v')
uses: "marvinpinto/action-automatic-releases@latest"
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
prerelease: false
files: |
MK404-${{ steps.get_version.outputs.VERSION }}-multiplatform.tar.bz2
- name: Rebuild dev tarball
if: steps.get_version.outcome == 'Skipped'
run: tar -jcvf MK404-dev-multiplatform.tar.bz2 MK404-dev
- name: Publish prerelease
if: steps.get_version.outcome == 'Skipped'
uses: "marvinpinto/action-automatic-releases@latest"
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: "dev"
prerelease: true
title: "Latest (Development) Build"
files: |
MK404-dev-multiplatform.tar.bz2