Cleanup, logs improvements, refactoring #162
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: tests | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
jobs: | |
statick-checks: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Setup CMake | |
uses: actions/setup-cmake@v1 | |
- name: Setup Clang | |
uses: actions/setup-clang@v1 | |
- name: Install dependencies | |
run: sudo apt-get install -y cppcheck clang-format | |
- name: Run Cppcheck | |
run: cppcheck --enable=all --std=c++17 --language=c++ --error-exitcode=1 --output-file=cppcheck_report.txt ./src | |
continue-on-error: true | |
- name: Check code format (Clang-Format) | |
run: clang-format -i -style=file $(find . -name '*.cpp' -or -name '*.h') | |
- name: Upload Cppcheck Results | |
uses: actions/upload-artifact@v2 | |
if: always() | |
with: | |
name: cppcheck-results | |
path: cppcheck_report.txt | |
- name: Upload Clang-Format Results | |
uses: actions/upload-artifact@v2 | |
if: always() | |
with: | |
name: format-results | |
path: $(find . -name '*.cpp' -or -name '*.h') | |
tests: | |
runs-on: ${{ matrix.config.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
config: | |
# Define combinations of operating systems and architectures | |
- {os: ubuntu-latest, arch: x64} | |
- {os: ubuntu-latest, arch: arm64} | |
# - {os: windows-latest, arch: x64} | |
# - {os: windows-latest, arch: arm64} | |
- {os: macos-latest, arch: x64} | |
- {os: macos-latest, arch: arm64} | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.x' | |
- name: Set up CMake (All platforms) | |
uses: lukka/get-cmake@latest | |
- name: make build | |
run: | | |
make build | |
container-image: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v1 | |
- name: Login to GitHub Container Registry | |
uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Build container image | |
run: make build-images |