Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add CI #76

Merged
merged 2 commits into from
Dec 14, 2024
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
81 changes: 81 additions & 0 deletions .github/workflows/ccpp.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
---
name: Build CI
on: [push] # yamllint disable-line rule:truthy
jobs:
build:
name: ${{ matrix.config.name }}
runs-on: ${{ matrix.config.os }}
strategy:
fail-fast: false
matrix:
config:
- {
name: "Windows MSVC",
enabled: 1,
os: windows-latest,
deps: "",
config: "cmake
-B build
-DCMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake
-DWERROR=1
-DCMAKE_BUILD_TYPE=Debug
",
build: "cmake --build build --config Debug",
# all tests work except "performance" (liblo bug?)
# this weird regex lets all those tests run, except performance
test: "ctest --output-on-failure --test-dir build -R '(i|s|t|g)'"
}
- {
name: "Ubuntu gcc",
enabled: 1,
os: ubuntu-latest,
deps: "sudo apt-get install liblo-dev",
config: "cd build && cmake -DWERROR=1 ..",
build: "cd build && make",
test: "cd build && ctest --output-on-failure"
}
- {
name: "Ubuntu clang+lld",
enabled: 1,
os: ubuntu-latest,
deps: "sudo apt-get install liblo-dev",
config: "cd build &&
cmake
-DWERROR=1
-DCMAKE_C_COMPILER=clang
-DCMAKE_CXX_COMPILER=clang++
-DCMAKE_SHARED_LINKER_FLAGS='-fuse-ld=lld'
-DCMAKE_EXE_LINKER_FLAGS='-fuse-ld=lld'
..",
build: "cd build && make",
test: "cd build && ctest --output-on-failure"
}
- {
name: "macOS clang",
enabled: 1,
os: macos-latest,
deps: "brew install liblo",
config: "cd build && cmake -DWERROR=1 ..",
build: "cd build && make",
test: "cd build && ctest --output-on-failure"
}
steps:
- name: check out
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: install deps
if: ${{ matrix.config.enabled == 1 }}
run: ${{ matrix.config.deps }}
- name: create build directory
if: ${{ matrix.config.enabled == 1 }}
run: mkdir build
- name: configure
if: ${{ matrix.config.enabled == 1 }}
run: ${{ matrix.config.config }}
- name: make
if: ${{ matrix.config.enabled == 1 }}
run: ${{ matrix.config.build }}
- name: make test
if: ${{ matrix.config.enabled == 1 }}
run: ${{ matrix.config.test }}
13 changes: 13 additions & 0 deletions .github/workflows/yaml.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
name: Build CI
on: [push] # yamllint disable-line rule:truthy
jobs:
yamllint:
name: yamllint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: yamllint-this
run: yamllint -s .github/workflows/yaml.yml
- name: yamllint-ccpp
run: yamllint -s .github/workflows/ccpp.yml
Loading
Loading