Skip to content

Merge pull request #470 from Tom94/refactor-interleaved #1605

Merge pull request #470 from Tom94/refactor-interleaved

Merge pull request #470 from Tom94/refactor-interleaved #1605

Workflow file for this run

name: CI
on:
push:
branches:
- master
pull_request:
branches:
- master
env:
SUPPORT_HEIC: ${{ github.event_name == 'pull_request' }}
jobs:
build_linux:
name: Build on Linux
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- os: ubuntu-24.04
cc: gcc
cxx: g++
upload: true
- os: ubuntu-24.04-arm
cc: gcc
cxx: g++
upload: true
- os: ubuntu-24.04
cc: clang
cxx: clang++
upload: false
- os: ubuntu-24.04-arm
cc: clang
cxx: clang++
upload: false
env:
build_dir: "build"
config: "Release"
CC: ${{ matrix.cc }}
CXX: ${{ matrix.cxx }}
APPIMAGE_EXTRACT_AND_RUN: 1
steps:
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y \
cmake \
libc++-dev \
libc++abi-dev \
libdbus-1-dev \
libffi-dev \
libglu1-mesa-dev \
libwayland-dev \
libxkbcommon-dev \
nasm \
ninja-build \
wayland-protocols \
xorg-dev
- uses: actions/checkout@v1
with:
submodules: recursive
- name: CMake
run: cmake . -B ${{ env.build_dir }} -GNinja -DCMAKE_BUILD_TYPE=${{ env.config }} -DTEV_DEPLOY=1 -DTEV_SUPPORT_HEIC=${{ env.SUPPORT_HEIC }}
- name: Build
working-directory: ${{ env.build_dir }}
run: cmake --build . --target all --verbose -j
- name: Test program runs
working-directory: ${{ env.build_dir }}
run: ./tev --version
- name: Package
if: matrix.upload
working-directory: ${{ env.build_dir }}
run: cmake --build . --config ${{ env.config }} --target package --verbose
- name: Upload executable
if: matrix.upload && github.event_name != 'pull_request'
uses: actions/upload-artifact@v7
with:
name: Linux executable (${{ matrix.os }})
path: ${{ env.build_dir }}/tev.appimage
build_macos:
name: Build on macOS
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- arch: x86_64
os: macos-15-intel
- arch: arm64
os: macos-15
env:
build_dir: "build"
config: "Release"
steps:
- uses: actions/checkout@v1
with:
submodules: recursive
- name: Install dependencies
run: brew install nasm
- name: Remove pre-installed dependencies that conlict with our build
run: brew uninstall --ignore-dependencies jpeg-xl || echo "jpeg-xl not installed, continuing"
- name: CMake
run: cmake . -B ${{ env.build_dir }} -GNinja -DCMAKE_BUILD_TYPE=${{ env.config }} -DCMAKE_OSX_DEPLOYMENT_TARGET=10.15 -DTEV_DEPLOY=1 -DTEV_SUPPORT_HEIC=${{ env.SUPPORT_HEIC }}
- name: Build
working-directory: ${{ env.build_dir }}
run: cmake --build . --config ${{ env.config }} --target all --verbose -j
- name: Test program runs
working-directory: ${{ env.build_dir }}
run: ./tev.app/Contents/MacOS/tev --version
- name: Zip app
working-directory: ${{ env.build_dir }}
run: zip -r tev.app.zip tev.app
- name: Upload executable
if: github.event_name != 'pull_request'
uses: actions/upload-artifact@v7
with:
name: macOS executable (${{ matrix.arch }})
path: ${{ env.build_dir }}/tev.app.zip
build_windows:
name: Build on Windows
runs-on: ${{ matrix.os }}
strategy:
matrix:
os:
- windows-2022
- windows-11-arm
env:
build_dir: "build"
config: "Release"
steps:
- uses: actions/checkout@v1
with:
submodules: recursive
- name: Install dependencies
run: |
choco install nasm
echo "C:\Program Files\NASM" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
choco install wixtoolset --no-progress -y
echo "WIX=$(Get-ChildItem 'C:\Program Files (x86)\WiX Toolset*' | Select-Object -First 1 | % FullName)" >> $env:GITHUB_ENV
- name: CMake
run: cmake . -B ${{ env.build_dir }} -DCMAKE_BUILD_TYPE=${{ env.config }} -DTEV_DEPLOY=1 -DTEV_SUPPORT_HEIC=${{ env.SUPPORT_HEIC }}
- name: Build
working-directory: ${{ env.build_dir }}
run: cmake --build . --config ${{ env.config }} --target ALL_BUILD --verbose
- name: Test program runs
working-directory: ${{ env.build_dir }}/${{ env.config }}
run: .\tev.exe --version
- name: Create installer
working-directory: ${{ env.build_dir }}
run: cpack
- name: Upload executable
if: github.event_name != 'pull_request'
uses: actions/upload-artifact@v7
with:
name: Windows executable (${{ matrix.os }})
path: ${{ env.build_dir }}/${{ env.config }}/tev.exe
- name: Upload installer
if: github.event_name != 'pull_request'
uses: actions/upload-artifact@v7
with:
name: Windows installer (${{ matrix.os }})
path: ${{ env.build_dir }}/tev-installer.msi