Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
66 changes: 66 additions & 0 deletions .github/workflows/main-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
name: Main Branch Tests

on:
push:
branches:
- main
workflow_dispatch:

env:
BUILD_TYPE: test

jobs:
test:
strategy:
fail-fast: false
matrix:
include:
# Linux jobs
- os: ubuntu-latest
compiler: gcc
preset: gcc-test
cc: gcc
cxx: g++
- os: ubuntu-latest
compiler: clang
preset: clang-test
cc: clang
cxx: clang++
# Windows jobs
- os: windows-latest
compiler: msvc
preset: msvc-test
- os: windows-latest
compiler: clang
preset: clang-test

runs-on: ${{ matrix.os }}

steps:
- name: Checkout code
uses: actions/checkout@v4
with:
submodules: recursive

- name: Install dependencies (Linux)
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install -y ${{ matrix.compiler }} cmake ninja-build

- name: Configure CMake (Linux)
if: runner.os == 'Linux'
run: cmake --preset ${{ matrix.preset }}
env:
CC: ${{ matrix.cc }}
CXX: ${{ matrix.cxx }}

- name: Configure CMake (Windows)
if: runner.os == 'Windows'
run: cmake --preset ${{ matrix.preset }}

- name: Build
run: cmake --build --preset ${{ matrix.preset }}

- name: Run tests
run: ctest --preset ${{ matrix.preset }} --output-on-failure
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Modern Vulkan-based renderer for W3D format files from Command & Conquer: Generals.

[![Documentation](https://img.shields.io/badge/docs-online-blue)](https://vitexftw.github.io/VulkanW3DViewer/)
[![Tests](https://github.com/ViTeXFTW/VulkanW3DViewer/actions/workflows/pr-test.yml/badge.svg?branch=main)](https://github.com/ViTeXFTW/VulkanW3DViewer/actions/workflows/pr-test.yml)
[![Tests](https://github.com/ViTeXFTW/VulkanW3DViewer/actions/workflows/main-tests.yml/badge.svg)](https://github.com/ViTeXFTW/VulkanW3DViewer/actions/workflows/main-tests.yml)

> **EA has not endorsed and does not support this product.**

Expand Down