Skip to content

Commit

Permalink
CI: Add additional build job for building PsychCV for Ubuntu 22.04+
Browse files Browse the repository at this point in the history
We want PsychCV to target Ubuntu 22.04-LTS and later for easy use,
at the detriment of slightly more cumbersome setup on Ubuntu 20.04,
which is fine, as 20.04 is considered "maintenance mode" only.
  • Loading branch information
kleinerm committed Mar 16, 2024
1 parent 7a47429 commit de61132
Showing 1 changed file with 56 additions and 1 deletion.
57 changes: 56 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ on:

# 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"
# Run a job to build the majority of the mex files targetting Ubuntu 20.04-LTS and later, simply called "build"
build:
name: Run commands to build+upload Matlab+Octave mex files for 64-Bit Ubuntu Linux 20.04-LTS on Intel.

Expand Down Expand Up @@ -74,3 +74,58 @@ jobs:
- name: Use xvfb for basic testing of Psychtoolbox under Octave. Rendering tests under llvmpipe, some basic queries.
run: xvfb-run octave --eval "warning('off', 'Octave:shadowed-function'); cd('Psychtoolbox'); pwd, addpath(genpath(pwd)); addpath(genpath([pwd '/PsychBasic/Octave5LinuxFiles64'])); PsychDebugWindowConfiguration; Screen('Preference', 'ConserveVRAM', 4194304); [a,b,c] = GetKeyboardIndices, [d,e,f] = GetMouseIndices"


# Run a job called "buildforubuntu22.04", only for some few mex files which are targetted at only easily running on Ubuntu 22.04 and later:
buildforubuntu22-04:
name: Run commands to build+upload some Matlab+Octave mex files for 64-Bit Ubuntu Linux 22.04-LTS on Intel.

# The type of runner that the job will run on: Fixed to Ubuntu 22.04-LTS
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: Check out Psychtoolbox repository to runner.
uses: actions/checkout@v3

# - name: Add SR-Research Eyelink repositories.
# run: sudo apt-key adv --fetch-keys https://apt.sr-research.com/SRResearch_key ; sudo add-apt-repository 'deb [arch=amd64] https://apt.sr-research.com SRResearch main'

- name: Setup additional build and runtime dependencies of Psychtoolbox. Currently only libapriltag
run: sudo apt update ; sudo apt install -y octave-psychtoolbox-3 liboctave-dev libapriltag-dev

# - name: Setup OculusVR SDK 0.5 for 64-Bit Linux.
# run: tar xvf PsychSourceGL/Cohorts/OculusSDK/ovr_sdk_linux_0.5.0.1.tar.xz; cd ovr_sdk_linux_0.5.0.1 ; sudo cp --recursive LibOVR/Include/* /usr/local/include/ ; sudo cp ../PsychSourceGL/Cohorts/OculusSDK/libOVR.a /usr/local/lib/

# - name: Setup OpenXR SDK and OpenXR loader for PsychOpenXRCore build, backported for 64-Bit Ubuntu Linux 20.04.
# run: sudo add-apt-repository ppa:monado-xr/monado; sudo apt-get update; sudo apt install -y libopenxr-dev;

# - name: Setup latest Vulkan SDK from LunarG for PsychVulkanCore build, as Ubuntu 20.04 SDK is too old for all our needs.
# run: wget -qO - https://packages.lunarg.com/lunarg-signing-key-pub.asc | sudo apt-key add - ; sudo wget -qO /etc/apt/sources.list.d/lunarg-vulkan-1.3.243-focal.list https://packages.lunarg.com/vulkan/1.3.243/lunarg-vulkan-1.3.243-focal.list ; sudo apt update ; sudo apt install -y vulkan-sdk ;

# - name: Install minimal SR-Research Eyelink SDK for building Eyelink mex files.
# run: sudo apt install eyelinkcore

- name: Set up latest MATLAB
uses: matlab-actions/setup-matlab@v1

- name: Build all eligible Psychtoolbox Matlab mex files. Currently only PsychCV
uses: matlab-actions/run-command@v1
with:
command: cd('Psychtoolbox'); pwd, addpath(genpath(pwd)); cd('../PsychSourceGL/Source'); pwd, linuxmakeit64(10, 1);

- name: Build all eligible Psychtoolbox Octave mex files. Currently only PsychCV
run: octave --eval "warning('off', 'Octave:shadowed-function'); cd('Psychtoolbox'); pwd, addpath(genpath(pwd)); cd('../PsychSourceGL/Source'); linuxmakeitoctave3(10, 1);"

- name: Archive built 64-Bit Matlab and Octave mex files for 64-Bit Intel on Ubuntu 22.04
uses: actions/upload-artifact@v3
with:
name: Linux64BitIntelMexFilesForUbuntu22.04
path: |
Psychtoolbox/PsychBasic/Octave5LinuxFiles64/*.mex
Psychtoolbox/PsychBasic/*.mexa64
# Psychtoolbox/PsychBasic/PsychPlugins/libptbdrawtext_ftgl64.so.1

# - name: Use xvfb for basic testing of Psychtoolbox under Octave. Rendering tests under llvmpipe, some basic queries.
# run: xvfb-run octave --eval "warning('off', 'Octave:shadowed-function'); cd('Psychtoolbox'); pwd, addpath(genpath(pwd)); addpath(genpath([pwd '/PsychBasic/Octave5LinuxFiles64'])); PsychDebugWindowConfiguration; Screen('Preference', 'ConserveVRAM', 4194304); [a,b,c] = GetKeyboardIndices, [d,e,f] = GetMouseIndices"

0 comments on commit de61132

Please sign in to comment.