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
23 changes: 23 additions & 0 deletions .github/workflows/common.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: common-pipeline
run-name: ${{ github.actor }} ran common checks

on: push

jobs:
common-pipeline:

name: pre-commit checks
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6

- name: Pre-commit
uses: actions/setup-python@v6
with:
python-version: "3.13"
- uses: pre-commit/action@v3.0.1
env:
SKIP: clang-format,clang-tidy
with:
extra_args: --all-files
93 changes: 93 additions & 0 deletions .github/workflows/dev.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
name: dev-pipeline
run-name: ${{ github.actor }} is cooking MayoNES

on:
workflow_dispatch:
inputs:
cmake_preset:
description: "CMake preset"
required: true
default: msvc-debug
type: choice
options:
- msvc-debug
- msvc-release

push:
paths:
- ".github/workflows/dev.yml"
- "src/**"
- "tests/**"
- ".pre-commit-config.yaml"
- "CMakeLists.txt"
- "CMakePresets.json"
- "vcpkg.json"

jobs:
dev-pipeline:
permissions:
packages: write

env:
CMAKE_PRESET: msvc-debug
VCPKG_EXE: "${{ github.workspace }}/vcpkg/vcpkg"
NUGET_FEED_URL: "https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json"
VCPKG_BINARY_SOURCES: "clear;nuget,https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json,readwrite"

name: dev-pipeline
runs-on: windows-2025-vs2026

steps:
- name: Checkout
uses: actions/checkout@v6

- name: Setup Python
uses: actions/setup-python@v6
with:
python-version: "3.13"
cache: pip
cache-dependency-path: "requirements-dev.txt"
- run: pip install -r requirements-dev.txt

- name: clang-format
uses: pre-commit/action@v3.0.1
with:
extra_args: clang-format --all-files

- name: Setup vcpkg
uses: lukka/run-vcpkg@v11

- name: Setup NuGet
shell: pwsh
run: |
.$(${{ env.VCPKG_EXE }} fetch nuget) `
sources add `
-Source "${{ env.NUGET_FEED_URL }}" `
-StorePasswordInClearText `
-Name GitHubPackages `
-UserName "${{ github.repository_owner }}" `
-Password "${{ secrets.GITHUB_TOKEN }}"
.$(${{ env.VCPKG_EXE }} fetch nuget) `
setapikey "${{ secrets.GITHUB_TOKEN }}" `
-Source "${{ env.NUGET_FEED_URL }}"

- name: Setup CMake
uses: lukka/get-cmake@latest
with:
cmakeVersion: "^4.2.3"
ninjaVersion: "^1.13.2"

- name: Build & Test
uses: lukka/run-cmake@v10
env:
CMAKE_PRESET: "${{ inputs.cmake_preset || env.CMAKE_PRESET }}"
with:
configurePreset: "${{ env.CMAKE_PRESET }}"
configurePresetAdditionalArgs: "['-DBUILD_TESTING=ON']"
buildPreset: "${{ env.CMAKE_PRESET }}"
testPreset: "${{ env.CMAKE_PRESET }}"

- name: clang-tidy
uses: pre-commit/action@v3.0.1
with:
extra_args: clang-tidy --all-files
2 changes: 2 additions & 0 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
clang-format==22.1.3
clang-tidy==22.1.0.1
Loading