Update CI workflow to improve test execution and remove obsolete CMake configuration
- Modified the core test execution command in the CI workflow to run tests sequentially with a single job (-j1) for better stability. - Removed the outdated CMake workflow file, streamlining the CI configuration and eliminating redundancy.
This commit is contained in:
2
.github/workflows/ci.yml
vendored
2
.github/workflows/ci.yml
vendored
@@ -184,7 +184,7 @@ jobs:
|
||||
# Test (stable core functionality only for CI)
|
||||
- name: Run Core Tests
|
||||
working-directory: ${{ github.workspace }}/build
|
||||
run: ctest --build-config ${{ env.BUILD_TYPE }} --output-on-failure --parallel -R "AsarWrapperTest|SnesTileTest|CompressionTest|SnesPaletteTest|HexTest"
|
||||
run: ctest --build-config ${{ env.BUILD_TYPE }} --output-on-failure -j1 -R "AsarWrapperTest|SnesTileTest|CompressionTest|SnesPaletteTest|HexTest"
|
||||
|
||||
# Run experimental tests separately (allowed to fail for information only)
|
||||
- name: Run Additional Tests (Informational)
|
||||
|
||||
183
.github/workflows/cmake.yml
vendored
183
.github/workflows/cmake.yml
vendored
@@ -1,183 +0,0 @@
|
||||
name: CMake Build
|
||||
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
- 'src/**'
|
||||
- 'test/**'
|
||||
- 'cmake/**'
|
||||
- 'CMakeLists.txt'
|
||||
branches: [ "master", "develop" ]
|
||||
pull_request:
|
||||
paths:
|
||||
- 'src/**'
|
||||
- 'test/**'
|
||||
- 'cmake/**'
|
||||
- 'CMakeLists.txt'
|
||||
branches: [ "master", "develop" ]
|
||||
|
||||
env:
|
||||
BUILD_TYPE: RelWithDebInfo
|
||||
|
||||
jobs:
|
||||
build-and-test:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- name: "Ubuntu 22.04 (GCC-12)"
|
||||
os: ubuntu-22.04
|
||||
cc: gcc-12
|
||||
cxx: g++-12
|
||||
|
||||
- name: "Ubuntu 22.04 (Clang)"
|
||||
os: ubuntu-22.04
|
||||
cc: clang-15
|
||||
cxx: clang++-15
|
||||
|
||||
- name: "macOS 13 (Clang)"
|
||||
os: macos-13
|
||||
cc: clang
|
||||
cxx: clang++
|
||||
|
||||
- name: "macOS 14 (Clang)"
|
||||
os: macos-14
|
||||
cc: clang
|
||||
cxx: clang++
|
||||
|
||||
name: ${{ matrix.name }}
|
||||
runs-on: ${{ matrix.os }}
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: recursive
|
||||
fetch-depth: 0
|
||||
|
||||
# Linux-specific setup
|
||||
- name: Install Linux dependencies
|
||||
if: runner.os == 'Linux'
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y \
|
||||
build-essential \
|
||||
ninja-build \
|
||||
pkg-config \
|
||||
libglew-dev \
|
||||
libxext-dev \
|
||||
libwavpack-dev \
|
||||
libabsl-dev \
|
||||
libboost-all-dev \
|
||||
libboost-python-dev \
|
||||
libpng-dev \
|
||||
python3-dev \
|
||||
libpython3-dev \
|
||||
libasound2-dev \
|
||||
libpulse-dev \
|
||||
libaudio-dev \
|
||||
libx11-dev \
|
||||
libxrandr-dev \
|
||||
libxcursor-dev \
|
||||
libxinerama-dev \
|
||||
libxi-dev \
|
||||
libxss-dev \
|
||||
libxxf86vm-dev \
|
||||
libxkbcommon-dev \
|
||||
libwayland-dev \
|
||||
libdecor-0-dev \
|
||||
libgtk-3-dev \
|
||||
libdbus-1-dev \
|
||||
gcc-12 \
|
||||
g++-12 \
|
||||
clang-15
|
||||
|
||||
- name: Set up Linux compilers
|
||||
if: runner.os == 'Linux'
|
||||
run: |
|
||||
sudo update-alternatives --install /usr/bin/cc cc /usr/bin/${{ matrix.cc }} 100
|
||||
sudo update-alternatives --install /usr/bin/c++ c++ /usr/bin/${{ matrix.cxx }} 100
|
||||
|
||||
# macOS-specific setup
|
||||
- name: Install macOS dependencies
|
||||
if: runner.os == 'macOS'
|
||||
run: |
|
||||
# Install Homebrew dependencies if needed
|
||||
# brew install pkg-config libpng boost abseil
|
||||
|
||||
# Configure CMake
|
||||
- name: Configure CMake
|
||||
run: |
|
||||
cmake -B ${{ github.workspace }}/build \
|
||||
-DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} \
|
||||
-DCMAKE_C_COMPILER=${{ matrix.cc }} \
|
||||
-DCMAKE_CXX_COMPILER=${{ matrix.cxx }} \
|
||||
-DCMAKE_POLICY_VERSION_MINIMUM=3.16 \
|
||||
-DYAZE_MINIMAL_BUILD=OFF \
|
||||
-DYAZE_ENABLE_ROM_TESTS=OFF \
|
||||
-DYAZE_ENABLE_EXPERIMENTAL_TESTS=ON \
|
||||
-Wno-dev \
|
||||
-GNinja
|
||||
|
||||
# Build
|
||||
- name: Build
|
||||
run: cmake --build ${{ github.workspace }}/build --config ${{ env.BUILD_TYPE }} --parallel
|
||||
|
||||
# Test (core functionality)
|
||||
- name: Run Core Tests
|
||||
working-directory: ${{ github.workspace }}/build
|
||||
run: ctest --build-config ${{ env.BUILD_TYPE }} --output-on-failure --parallel -R "AsarWrapperTest|SnesTileTest|CompressionTest|SnesPaletteTest|HexTest"
|
||||
|
||||
# Run additional tests (allowed to fail for information only)
|
||||
- name: Run Additional Tests (Informational)
|
||||
working-directory: ${{ github.workspace }}/build
|
||||
continue-on-error: true
|
||||
run: ctest --build-config ${{ env.BUILD_TYPE }} --output-on-failure --parallel -E "AsarWrapperTest|SnesTileTest|CompressionTest|SnesPaletteTest|HexTest|CpuTest|Spc700Test|ApuTest|MessageTest|.*IntegrationTest"
|
||||
|
||||
# Package (only on successful builds)
|
||||
- name: Package artifacts
|
||||
if: success()
|
||||
run: |
|
||||
cmake --build ${{ github.workspace }}/build --config ${{ env.BUILD_TYPE }} --target package
|
||||
|
||||
# Upload artifacts
|
||||
- name: Upload build artifacts
|
||||
if: success()
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: yaze-${{ matrix.name }}-${{ github.sha }}
|
||||
path: |
|
||||
${{ github.workspace }}/build/bin/
|
||||
${{ github.workspace }}/build/lib/
|
||||
retention-days: 7
|
||||
|
||||
code-quality:
|
||||
name: Code Quality Checks
|
||||
runs-on: ubuntu-22.04
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: recursive
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y \
|
||||
clang-format-14 \
|
||||
clang-tidy-14 \
|
||||
cppcheck
|
||||
|
||||
- name: Check code formatting
|
||||
run: |
|
||||
find src test -name "*.cc" -o -name "*.h" | \
|
||||
xargs clang-format-14 --dry-run --Werror
|
||||
|
||||
- name: Run cppcheck
|
||||
run: |
|
||||
cppcheck --enable=all --error-exitcode=1 \
|
||||
--suppress=missingIncludeSystem \
|
||||
--suppress=unusedFunction \
|
||||
--suppress=unmatchedSuppression \
|
||||
src/
|
||||
Reference in New Issue
Block a user