Skip to content

Switch to GNUInstallDirs #283

Switch to GNUInstallDirs

Switch to GNUInstallDirs #283

Workflow file for this run

name: Build
on: [push, pull_request]
jobs:
build-linux-gcc:
name: Linux (GCC) (Unity)
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- name: Install Dependencies
run: sudo apt -y install libncursesw5-dev libgpm-dev libgtest-dev
- name: Configure CMake
shell: bash
run: cmake . -DCMAKE_BUILD_TYPE=Release -DTV_BUILD_TESTS=ON -DTV_REDUCE_APP_SIZE=ON -DTV_LIBRARY_UNITY_BUILD=ON
- name: Build
shell: bash
run: cmake --build . -j$(nproc)
build-linux-gcc5:
name: Linux (GCC 5)
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- name: Install Dependencies
run: |
sudo tee --append /etc/apt/sources.list << EOF
deb http://us.archive.ubuntu.com/ubuntu/ bionic universe
EOF
sudo apt -y update
sudo apt -y install libncursesw5-dev g++-5
- name: Configure CMake
shell: bash
env:
CC: gcc-5
CXX: g++-5
run: cmake . -DCMAKE_BUILD_TYPE=Release
- name: Build
shell: bash
run: cmake --build . -j$(nproc)
build-linux-clang:
name: Linux (Clang)
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- name: Install Dependencies
run: sudo apt -y install libncursesw5-dev
- name: Configure CMake
shell: bash
env:
CC: clang
CXX: clang++
run: cmake . -DCMAKE_BUILD_TYPE=Release -DTV_OPTIMIZE_BUILD=OFF
- name: Build
shell: bash
run: cmake --build . -j$(nproc)
build-linux-big-endian:
name: Linux (GCC) (Big Endian)
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- name: Build in container
uses: uraimo/run-on-arch-action@v2
with:
arch: s390x
distro: alpine_latest
dockerRunArgs: |
--volume "${PWD}:/app"
env: |
LC_CTYPE: C.UTF-8
shell: /bin/sh
install: apk update && apk add make cmake g++ ncurses-dev gtest-dev linux-headers
run: |
cd /app
cmake . -DCMAKE_BUILD_TYPE= -DTV_BUILD_USING_GPM=OFF -DTV_BUILD_EXAMPLES=OFF -DTV_BUILD_TESTS=ON -DTV_LIBRARY_UNITY_BUILD=ON
cmake --build . -j$(nproc)
build-windows-msvc32:
name: Windows (MSVC) (Win32)
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- name: Configure CMake
shell: bash
run: cmake . -A Win32 -DTV_USE_STATIC_RTL=ON
- name: Build (Release) (library, apps)
shell: bash
run: cmake --build . --config Release -- -p:UseMultiToolTask=true -p:CL_MPcount=$(nproc)
- name: Build (RelWithDebInfo) (library)
shell: bash
run: cmake --build . --config RelWithDebInfo --target tvision -- -p:UseMultiToolTask=true -p:CL_MPcount=$(nproc)
- name: Build (Debug) (library)
shell: bash
run: cmake --build . --config Debug --target tvision -- -p:UseMultiToolTask=true -p:CL_MPcount=$(nproc)
- name: Upload Examples
uses: actions/upload-artifact@v3
with:
name: examples-x86
path: |
Release/tvdemo.exe
Release/tvedit.exe
Release/tvhc.exe
- name: Upload Library
uses: actions/upload-artifact@v3
with:
name: library-x86
path: |
Release/tvision.lib
RelWithDebInfo/tvision-relwithdebinfo.lib
RelWithDebInfo/tvision-relwithdebinfo.pdb
Debug/tvision-debug.lib
Debug/tvision-debug.pdb
build-windows-msvc64:
name: Windows (MSVC) (x64)
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- name: Configure CMake
shell: bash
run: cmake . -A x64 -DTV_USE_STATIC_RTL=ON
- name: Build (Release) (library, apps)
shell: bash
run: cmake --build . --config Release -- -p:UseMultiToolTask=true -p:CL_MPcount=$(nproc)
- name: Build (RelWithDebInfo) (library)
shell: bash
run: cmake --build . --config RelWithDebInfo --target tvision -- -p:UseMultiToolTask=true -p:CL_MPcount=$(nproc)
- name: Build (Debug) (library)
shell: bash
run: cmake --build . --config Debug --target tvision -- -p:UseMultiToolTask=true -p:CL_MPcount=$(nproc)
- name: Upload Examples
uses: actions/upload-artifact@v3
with:
name: examples-x64
path: |
Release/tvdemo.exe
Release/tvedit.exe
Release/tvhc.exe
- name: Upload Library
uses: actions/upload-artifact@v3
with:
name: library-x64
path: |
Release/tvision.lib
RelWithDebInfo/tvision-relwithdebinfo.lib
RelWithDebInfo/tvision-relwithdebinfo.pdb
Debug/tvision-debug.lib
Debug/tvision-debug.pdb
build-windows-mingw:
name: Windows (MinGW)
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- name: Configure CMake
shell: bash
run: cmake . -G "MinGW Makefiles" -DCMAKE_BUILD_TYPE= -DCMAKE_CXX_FLAGS="-static" -DTV_LIBRARY_UNITY_BUILD=ON
- name: Build
shell: bash
run: cmake --build . -j$(nproc)
build-windows-bcc32:
name: Windows (BCC32) (DPMI32)
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- name: Install Build Tools
shell: bash
run: |
curl -LJO "https://github.com/magiblot/tvision/files/5578778/BC45-32.zip"
curl -LJO "https://github.com/magiblot/tvision/files/5578815/tasm4-32.zip"
unzip BC45-32.zip -d C:/BC45
unzip tasm4-32.zip -d C:/tasm
- name: Build
shell: bash
run: |
export PATH="/c/bc45/bin:/c/tasm/bin:$PATH"
cd project
/c/bc45/bin/make.exe -DDOS32
- name: Upload Examples
uses: actions/upload-artifact@v3
with:
name: examples-dos32
path: |
examples/tvdemo/tvdemo.EXE
examples/tvedit/tvedit.EXE
examples/tvhc/tvhc.EXE
- name: Upload Library
uses: actions/upload-artifact@v3
with:
name: library-dos32
path: |
LIB/TV32.LIB
build-macos-clang:
name: MacOS (Clang)
runs-on: macos-12
steps:
- uses: actions/checkout@v3
- name: Configure CMake
shell: bash
run: cmake . -DCMAKE_BUILD_TYPE=Release
- name: Build
shell: bash
run: cmake --build . -j$(sysctl -n hw.logicalcpu)