Skip to content

Commit

Permalink
ci: update github action
Browse files Browse the repository at this point in the history
  • Loading branch information
black-desk committed Mar 23, 2024
1 parent a6380be commit 48e2fe8
Showing 1 changed file with 10 additions and 22 deletions.
32 changes: 10 additions & 22 deletions .github/workflows/checks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,45 +18,33 @@ jobs:
runs-on: "ubuntu-latest"
strategy:
matrix:
type: [Debug, Release]
dependency: [Vendor, Online]
container:
- debian:stable-slim
- debian:sid-slim
preset: [debug, ci, ci-with-spdlog]
cxx: [g++, clang++]
container:
image: ${{ matrix.container }}
steps:
- name: Checkout project
uses: actions/checkout@v4
with:
fetch-depth: 0
# - uses: hendrikmuhs/ccache-action@v1.2
# with:
# key: ${{ matrix.cxx }}-${{ matrix.type }}
- name: Cache CPM.cmake Source
uses: actions/cache@v4
with:
path: .cache/cpm/source
key: ${{ runner.os }}-${{ hashFiles('**/CMakeLists.txt', '**/*.cmake') }}
key: ${{ hashFiles('**/CMakeLists.txt', '**/*.cmake') }}
- name: Install system dependencies
run: |
sudo apt update &&
sudo apt install libsystemd-dev
apt update &&
apt install libsystemd-dev libspdlog-dev nlohmann-json3-dev
- name: Build project with cmake
run: |
mkdir -p .cache/cpm/source &&
export CXX="${{ matrix.cxx }}" &&
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH" &&
export CPM_DOWNLOAD_ALL="ON" &&
export CPM_SOURCE_CACHE="$PWD/.cache/cpm/source" &&
export CFLAGS="$CFLAGS -Wall" &&
export CFLAGS="$CFLAGS -Wextra" &&
export CFLAGS="$CFLAGS -Wpedantic" &&
export CFLAGS="$CFLAGS -Wno-extra-semi -Wno-unused-command-line-argument -Wno-gnu-zero-variadic-macro-arguments" &&
export CFLAGS="$CFLAGS -fsanitize=address,undefined" &&
export CXXFLAGS="$CFLAGS" &&
cmake --preset ${{ matrix.dependency }}${{ matrix.type }} &&
cmake --build --preset ${{ matrix.dependency }}${{ matrix.type }} -j
- name: Run tests
if: ${{ false }} # This project has no tests for now.
run: |
cmake --build build -t test -j
cmake --workflow --preset ${{ matrix.preset }}
pass:
name: Pass
needs: [checks, build-and-test]
Expand Down

0 comments on commit 48e2fe8

Please sign in to comment.