73 lines
2.1 KiB
YAML
73 lines
2.1 KiB
YAML
name: Checks
|
|
|
|
on: [pull_request]
|
|
|
|
jobs:
|
|
checks:
|
|
name: Run black-desk/checks
|
|
permissions:
|
|
checks: write
|
|
contents: read
|
|
issues: write
|
|
pull-requests: write
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: black-desk/checks@master
|
|
build-and-test:
|
|
name: Build and tests
|
|
runs-on: "ubuntu-latest"
|
|
strategy:
|
|
matrix:
|
|
container:
|
|
- debian:oldstable-slim
|
|
- debian:stable-slim
|
|
- debian:sid-slim
|
|
cxx: [g++, clang++]
|
|
container:
|
|
image: ${{ matrix.container }}
|
|
steps:
|
|
- name: Checkout project
|
|
uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
- name: Cache CPM.cmake Source
|
|
uses: actions/cache@v4
|
|
with:
|
|
path: .cache/cpm/source
|
|
key: ${{ hashFiles('**/CMakeLists.txt', '**/*.cmake') }}
|
|
- name: Setup cmake
|
|
uses: jwlawson/actions-setup-cmake@v2.0
|
|
- name: Install system dependencies
|
|
run: |
|
|
apt update &&
|
|
apt install pkg-config make git g++ clang -y
|
|
- name: Build project with cmake by preset debug
|
|
run: |
|
|
mkdir -p .cache/cpm/source &&
|
|
export CXX="${{ matrix.cxx }}" &&
|
|
export CPM_SOURCE_CACHE="$PWD/.cache/cpm/source" &&
|
|
cmake --workflow --preset debug
|
|
- name: Install extra dependencies
|
|
run: |
|
|
apt update &&
|
|
apt install libexpected-dev libspdlog-dev nlohmann-json3-dev -y
|
|
- name: Build project with cmake by preset ci
|
|
run: |
|
|
mkdir -p .cache/cpm/source &&
|
|
export CXX="${{ matrix.cxx }}" &&
|
|
export CPM_SOURCE_CACHE="$PWD/.cache/cpm/source" &&
|
|
cmake --workflow --preset ci
|
|
- name: Build project with cmake by preset ci-with-spdlog
|
|
run: |
|
|
mkdir -p .cache/cpm/source &&
|
|
export CXX="${{ matrix.cxx }}" &&
|
|
export CPM_SOURCE_CACHE="$PWD/.cache/cpm/source" &&
|
|
cmake --workflow --preset ci
|
|
pass:
|
|
name: Pass
|
|
needs: [checks, build-and-test]
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Placeholder
|
|
run: true
|