Skip to content

Restore longpress functionality for the encoder #411

Restore longpress functionality for the encoder

Restore longpress functionality for the encoder #411

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: [ MINI404 ]
tags:
- "v*"
pull_request:
branches: [ MINI404 ]
# 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_linux:
# 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: ${{ github.repository }}
ref: ${{ github.event.pull_request.head.sha }}
submodules: false
- name: Checkout ${{ github.event.ref }}
uses: actions/checkout@v3
if: ${{ !github.event.pull_request }}
with:
repository: ${{ github.repository }}
ref: ${{ github.event.ref }}
submodules: false
- name: Cache packages
uses: actions/[email protected]
id: cache-pkgs
with:
path: "packages"
key: "${{ runner.os }}-packages-1_0_0"
restore-keys: ${{ runner.os }}-packages-
- 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 libglew-dev freeglut3-dev ninja-build libslirp-dev libusb-1.0.0-dev libgtk-3-dev
- name: Cache permissions
run: sudo chmod -R 744 packages
- name: Configure build
run: cd ${{ runner.workspace }}/MINI404 && ./configure --target-list="buddy-softmmu" --enable-libusb --enable-slirp --enable-gtk
- name: Build qemu-system-buddy
run: cd ${{ runner.workspace }}/MINI404/build && ninja
- name: Checkout Wiki
uses: actions/checkout@v3
if: ${{ !github.event.pull_request }}
with:
repository: vintagepc/MINI404.wiki.git
path: ref
ref: master
- name: Regen docs
if: ${{ !github.event.pull_request }}
run: |
cd ${{ runner.workspace }}/MINI404
./updateDocs.sh
cd ${{ runner.workspace }}/MINI404/ref
git add autogen/*
git config --local user.email "[email protected]"
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 }}/MINI404/build
mv buddy-softmmu Mini404-dev-linux
mv assets Mini404-dev-linux
mkdir Mini404-dev-linux/pc-bios && mv pc-bios/keymaps Mini404-dev-linux/pc-bios/
tar -jhcvf Mini404-dev-linux.tar.bz2 Mini404-dev-linux
- name: Upload artifact
if: ${{ !github.event.pull_request }}
uses: actions/[email protected]
with:
name: Binaries
path: ${{ runner.workspace }}/MINI404/build/Mini404-dev-linux.tar.bz2
build_macos:
# 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: ${{ github.repository }}
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: ${{ github.repository }}
ref: ${{ github.event.ref }}
submodules: true
- name: Install dependencies
run: |
brew install libffi gettext glib pkg-config autoconf automake pixman ninja make
- name: Configure build
run: cd ${{ runner.workspace }}/MINI404 && ./configure --target-list="buddy-softmmu"
- name: Build qemu-system-buddy
run: cd ${{ runner.workspace }}/MINI404 && gmake -j3
- name: Assemble artifacts
if: ${{ !github.event.pull_request }}
run: |
cd ${{ runner.workspace }}/MINI404/build
mv buddy-softmmu Mini404-dev-macos
mkdir Mini404-dev-macos/pc-bios
mv pc-bios/keymaps Mini404-dev-macos/pc-bios/
tar -jhcvf Mini404-dev-macos.tar.bz2 Mini404-dev-macos
- name: Upload artifact
if: ${{ !github.event.pull_request }}
uses: actions/[email protected]
with:
name: Binaries
path: ${{ runner.workspace }}/MINI404/build/Mini404-dev-macos.tar.bz2
build_msys:
# The type of runner that the job will run on
runs-on: windows-latest
steps:
- name: Install MSYS2
uses: msys2/setup-msys2@v2
with:
msystem: MINGW64
install: make git zip wget mingw-w64-x86_64-diffutils diffutils mingw-w64-x86_64-ninja mingw-w64-x86_64-toolchain mingw-w64-x86_64-gtk3 mingw-w64-x86_64-freeglut mingw-w64-x86_64-glew mingw-w64-x86_64-libusb mingw-w64-x86_64-SDL2 mingw-w64-x86_64-pixman mingw-w64-x86_64-glib2 python-setuptools mingw-w64-x86_64-make mingw-w64-x86_64-curl mingw-w64-x86_64-libjxl mingw-w64-x86_64-SDL2_image mingw-w64-x86_64-pcre
# - name: Install old Python
# run: |
# wget https://repo.msys2.org/mingw/mingw64/mingw-w64-x86_64-python-3.9.13-1-any.pkg.tar.zst
# wget https://repo.msys2.org/mingw/mingw64/mingw-w64-x86_64-python-3.9.13-1-any.pkg.tar.zst.sig
# pacman --noconfirm -U mingw-w64-x86_64-python-3.9.13-1-any.pkg.tar.zst
# shell: msys2 {0}
- name: Fix CRLF Checkout
run: git config --global core.autocrlf false
- name: Checkout ${{ github.event.pull_request.head.ref }}
uses: actions/checkout@v3
if: ${{ github.event.pull_request }}
with:
repository: ${{ github.repository }}
ref: ${{ github.event.pull_request.head.sha }}
submodules: false
- name: Checkout ${{ github.event.ref }}
uses: actions/checkout@v3
if: ${{ !github.event.pull_request }}
with:
repository: ${{ github.repository }}
ref: ${{ github.event.ref }}
submodules: false
# Note we need to sed LDFLAGS_NO_PIE because mingw's LD is no-pie by default and doesn't
# recognize the `--no-pie` argument... not that it matters because we don't need to build the ROMs here.
- name: Configure build
run: |
mkdir build
cd build
../configure --target-list=buddy-softmmu --enable-gtk --enable-libusb --disable-werror
shell: msys2 {0}
- name: Build
run: |
cd build
ninja
shell: msys2 {0}
- name: Assemble artifacts and libraries
run: |
cd build
mkdir Mini404-dev-w64
mv qemu-*.exe Mini404-dev-w64
mv assets Mini404-dev-w64
cd Mini404-dev-w64
mkdir pc-bios && mv ../pc-bios/keymaps pc-bios/
for i in `cat ../../.github/workflows/dll-list.txt`; do echo "Copying $i"; cp /mingw64/bin/$i .; done;
cd ..
zip -r Mini404-dev-w64.zip Mini404-dev-w64
shell: msys2 {0}
- name: Upload Cygwin artifact
if: ${{ !github.event.pull_request }}
uses: actions/[email protected]
with:
name: Binaries
path: ${{ runner.workspace }}/MINI404/build/Mini404-dev-w64.zip
Publish:
runs-on: ubuntu-latest
if: ${{ !github.event.pull_request }}
needs: [build_linux, build_msys, build_macos]
steps:
- name: Retrieve platform binaries
uses: actions/[email protected]
with:
name: Binaries
- name: Check tag version
id: get_version
if: startsWith(github.ref, 'refs/tags/v')
run: echo "VERSION=${GITHUB_REF/refs\/tags\//}" >> "$GITHUB_ENV"
- name: Build ${{ env.VERSION }} archives
if: startsWith(github.ref, 'refs/tags/v')
run: |
tar -jxvf Mini404-dev-linux.tar.bz2
tar -jxvf Mini404-dev-macos.tar.bz2
unzip Mini404-dev-w64.zip
mv Mini404-dev-linux Mini404-${{ env.VERSION }}-linux
mv Mini404-dev-macos Mini404-${{ env.VERSION }}-macos
mv Mini404-dev-w64 Mini404-${{ env.VERSION }}-w64
tar -jcvf Mini404-${{ env.VERSION }}-linux.tar.bz2 Mini404-${{ env.VERSION }}-linux
tar -jcvf Mini404-${{ env.VERSION }}-macos.tar.bz2 Mini404-${{ env.VERSION }}-macos
zip -r Mini404-${{ env.VERSION }}-w64.zip Mini404-${{ env.VERSION }}-w64
- 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: |
Mini404-${{ env.VERSION }}-linux.tar.bz2
Mini404-${{ env.VERSION }}-macos.tar.bz2
Mini404-${{ env.VERSION }}-w64.zip
- 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: |
Mini404-dev-linux.tar.bz2
Mini404-dev-macos.tar.bz2
Mini404-dev-w64.zip