ci #82
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: ci | |
env: | |
CTEST_NO_TESTS_ACTION: error | |
HOMEBREW_NO_INSTALL_CLEANUP: 1 | |
on: | |
push: | |
paths: | |
- '**.c' | |
- '**.cc' | |
- '**.cpp' | |
- '**.h' | |
- '**/CMakeLists.txt' | |
- '**.cmake' | |
- '**.json' | |
- '**.yaml' | |
- '**.yml' | |
- .github/linters/* | |
- .github/workflows/ci.yml | |
- Dockerfile | |
permissions: read-all | |
jobs: | |
build: | |
name: Build SDK | |
runs-on: ubuntu-latest | |
permissions: | |
pull-requests: write | |
steps: | |
- name: Checkout | |
uses: actions/[email protected] | |
- name: Install extra packages | |
run: | | |
sudo apt-get update && \ | |
sudo apt-get install -y autoconf \ | |
autoconf-archive \ | |
build-essential \ | |
gcovr lcov xdg-utils | |
- name: Setup vcpkg | |
uses: lukka/run-vcpkg@v11 | |
with: | |
runVcpkgInstall: false | |
- name: Setup cmake | |
uses: lukka/get-cmake@latest | |
- name: Build | |
uses: lukka/run-cmake@v10 | |
with: | |
configurePreset: ci | |
buildPreset: ninja | |
- name: Run Tests | |
run: build/tests/Debug/iggy_cpp_test | |
- name: Run Coverage | |
run: | | |
cd build | |
ninja coverage | |
- name: Report code coverage | |
uses: zgosalvez/github-actions-report-lcov@v3 | |
with: | |
coverage-files: build/coverage.info | |
artifact-name: code-coverage-report | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
update-comment: true | |
lint: | |
name: Lint | |
runs-on: ubuntu-latest | |
permissions: | |
statuses: write | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
with: | |
# super-linter needs the full git history to get the | |
# list of files that changed across commits | |
fetch-depth: 0 | |
- name: Super-linter | |
uses: super-linter/[email protected] | |
env: | |
DOCKERFILE_HADOLINT: false | |
FILTER_REGEX_EXCLUDE: .devcontainer/install-vcpkg.sh | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |