Skip to content
Open
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
53 changes: 37 additions & 16 deletions .github/workflows/ci_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,25 +10,28 @@ on:
workflow_dispatch:
schedule:
- cron: '30 15 * * *'
- cron: "0 0 * * 0"

jobs:
beman-submodule-check:
uses: ./.github/workflows/reusable-beman-submodule-check.yml
uses: bemanproject/infra-workflows/.github/workflows/reusable-beman-submodule-check.yml@1.2.1

preset-test:
uses: ./.github/workflows/reusable-beman-preset-test.yml
uses: bemanproject/infra-workflows/.github/workflows/reusable-beman-preset-test.yml@1.2.1
with:
matrix_config: >
[
{"preset": "gcc-debug", "image": "ghcr.io/bemanproject/infra-containers-gcc:latest"},
{"preset": "gcc-release", "image": "ghcr.io/bemanproject/infra-containers-gcc:latest"},
{"preset": "llvm-debug", "image": "ghcr.io/bemanproject/infra-containers-clang:latest"},
{"preset": "llvm-release", "image": "ghcr.io/bemanproject/infra-containers-clang:latest"},
{"preset": "appleclang-debug", "runner": "macos-latest"},
{"preset": "appleclang-release", "runner": "macos-latest"},
{"preset": "msvc-debug", "runner": "windows-latest"},
{"preset": "msvc-release", "runner": "windows-latest"}
]

build-and-test:
uses: ./.github/workflows/reusable-beman-build-and-test.yml
uses: bemanproject/infra-workflows/.github/workflows/reusable-beman-build-and-test.yml@1.2.1
with:
matrix_config: >
{
Expand All @@ -51,7 +54,7 @@ jobs:
}
]
},
{ "versions": ["14", "13"],
{ "versions": ["14"],
"tests": [
{ "cxxversions": ["c++26", "c++23", "c++20"],
"tests": [{ "stdlibs": ["libstdc++"], "tests": ["Release.Default"]}]
Expand All @@ -60,11 +63,11 @@ jobs:
}
],
"clang": [
{ "versions": ["20"],
{ "versions": ["21"],
"tests": [
{"cxxversions": ["c++26"],
"tests": [
{ "stdlibs": ["libstdc++"],
{ "stdlibs": ["libc++"],
"tests": [
"Debug.Default", "Release.Default", "Release.TSan",
"Release.MaxSan", "Debug.Werror", "Debug.Dynamic"
Expand All @@ -74,16 +77,38 @@ jobs:
},
{ "cxxversions": ["c++23", "c++20"],
"tests": [
{"stdlibs": ["libstdc++"], "tests": ["Release.Default"]}
{"stdlibs": ["libc++"], "tests": ["Release.Default"]}
]
}
]
},
{ "versions": ["19"],
{ "versions": ["20", "19"],
"tests": [
{ "cxxversions": ["c++26", "c++23", "c++20"],
"tests": [
{"stdlibs": ["libstdc++"], "tests": ["Release.Default"]}
{"stdlibs": ["libc++"], "tests": ["Release.Default"]}
]
}
]
}
],
"appleclang": [
{ "versions": ["latest"],
"tests": [
{ "cxxversions": ["c++23", "c++20"],
"tests": [{ "stdlibs": ["libc++"], "tests": ["Release.Default"]}]
}
]
}
],
"msvc": [
{ "versions": ["latest"],
"tests": [
{ "cxxversions": ["c++23"],
"tests": [
{ "stdlibs": ["stl"],
"tests": ["Debug.Default", "Release.Default", "Release.MaxSan"]
}
]
}
]
Expand All @@ -93,9 +118,5 @@ jobs:

create-issue-when-fault:
needs: [preset-test, build-and-test]
if: failure() && github.event.schedule == '30 15 * * *'
uses: ./.github/workflows/reusable-beman-create-issue-when-fault.yml

auto-update-pre-commit:
if: github.event.schedule == '00 16 * * 0'
uses: ./.github/workflows/reusable-beman-update-pre-commit.yml
if: failure() && github.event_name == 'schedule'
uses: bemanproject/infra-workflows/.github/workflows/reusable-beman-create-issue-when-fault.yml@1.2.1
79 changes: 79 additions & 0 deletions .github/workflows/cmake.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
---
name: CMake

on:
push:
branches: ["develop"]
pull_request:
branches: ["develop"]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
schedule:
# run at 15:30 on day-of-month 7.
- cron: '30 15 7 * *'

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
BUILD_TYPE: release
CTEST_OUTPUT_ON_FAILURE: 1

jobs:
build:
strategy:
fail-fast: false

matrix:
os: [windows]
include:
- { os: macos, uname: appleclang }
# XXX - { os: ubuntu, uname: gcc }
- { os: ubuntu, uname: llvm }
- { os: windows, uname: msvc }

# TODO(CK):
# type: [shared, static]
# include:
# - { type: shared, shared: YES }
# - { type: static, shared: NO }

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

steps:
- uses: actions/checkout@v4
- name: Setup build environment
uses: lukka/get-cmake@latest
with:
cmakeVersion: "~4.2.1"
ninjaVersion: "^1.13.0"

- name: Setup MSVC
if: startsWith(matrix.os, 'windows')
uses: TheMrMilchmann/setup-msvc-dev@v3
with:
arch: x64

- name: Setup Cpp
if: matrix.os != 'windows'
uses: aminya/setup-cpp@v1
with:
# XXX compiler: ${{matrix.uname}}
compiler: llvm

- name: Configure CMake
run: cmake --preset ${{matrix.uname}}-${{env.BUILD_TYPE}} --log-level=VERBOSE # XXX -Wdev

- name: Build
# Build your program with the given configuration
run: cmake --build --preset ${{matrix.uname}}-${{env.BUILD_TYPE}}

- name: Test
# Execute tests defined by the CMake configuration
run: ctest --preset ${{matrix.uname}}-${{env.BUILD_TYPE}}

# - name: Install
# # Install the project artefacts to CMAKE_INSTALL_PREFIX
# run: cmake --build --preset ${{matrix.uname}}-${{env.BUILD_TYPE}} --target install
13 changes: 13 additions & 0 deletions .github/workflows/pre-commit-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: Lint Check (pre-commit)

on:
# We have to use pull_request_target here as pull_request does not grant
# enough permission for reviewdog
pull_request_target:
push:
branches:
- main

jobs:
pre-commit:
uses: bemanproject/infra-workflows/.github/workflows/reusable-beman-pre-commit.yml@1.2.1
15 changes: 15 additions & 0 deletions .github/workflows/pre-commit-update.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception

name: Weekly pre-commit autoupdate

on:
workflow_dispatch:
schedule:
- cron: "0 16 * * 0"

jobs:
auto-update-pre-commit:
uses: bemanproject/infra-workflows/.github/workflows/reusable-beman-update-pre-commit.yml@1.2.1
secrets:
APP_ID: ${{ secrets.AUTO_PR_BOT_APP_ID }}
PRIVATE_KEY: ${{ secrets.AUTO_PR_BOT_PRIVATE_KEY }}
8 changes: 7 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
.cache
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception

/compile_commands.json
/CMakeUserPresets.json
/build
**/_deps/
**/CMakeFiles/
/cmake/presets

# ignore emacs temp files
*~
\#*\#

# ignore vscode settings
.vscode
.cache
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@ repos:
# This brings in a portable version of clang-format.
# See also: https://github.com/ssciwr/clang-format-wheel
- repo: https://github.com/pre-commit/mirrors-clang-format
rev: v21.1.6
rev: v21.1.8
hooks:
- id: clang-format
types_or: [c++, c, json]

# CMake linting and formatting
- repo: https://github.com/BlankSpruce/gersemi
rev: 0.23.1
rev: 0.25.2
hooks:
- id: gersemi
name: CMake linting
Expand Down
Loading