Merge pull request #9 from VladimirShaleev/upgrade-versions #59
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: Lint | |
on: | |
push: | |
branches: [ "main" ] | |
paths: [ "**.hpp", "**.cpp", "**.ixx", "**.txt", "!doc/**" ] | |
pull_request: | |
branches: [ "main" ] | |
paths: [ "**.hpp", "**.cpp", "**.ixx", "**.txt", "!doc/**" ] | |
jobs: | |
lint: | |
strategy: | |
fail-fast: false | |
matrix: | |
standard: [ 11, 20 ] | |
name: "Linter [C++${{ matrix.standard }}]" | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Install Clang | |
uses: egor-tensin/setup-clang@ef434b41eb33a70396fb336b1bae39c76d740c3d # v1.4 | |
with: | |
version: 16 | |
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
- run: c++ -v | |
- name: Install Clang Tidy | |
run: | | |
wget https://apt.llvm.org/llvm.sh | |
chmod +x llvm.sh | |
sudo ./llvm.sh 16 | |
sudo apt-get install -y clang-tidy-16 | |
- name: Set reusable strings | |
id: strings | |
shell: bash | |
run: | | |
echo "build-output-dir=${{ github.workspace }}/build" >> "$GITHUB_OUTPUT" | |
- name: Configure CMake | |
run: > | |
cmake -B ${{ steps.strings.outputs.build-output-dir }} -S ${{ github.workspace }} | |
-DCMAKE_CXX_STANDARD=${{ matrix.standard }} | |
-DCMAKE_CXX_FLAGS="-stdlib=libstdc++" | |
-DCMAKE_CXX_COMPILER=c++ | |
-DCMAKE_BUILD_TYPE=Release | |
-DIPADDRESS_ENABLE_CLANG_TIDY=ON | |
-DIPADDRESS_BUILD_TESTS=ON | |
-DIPADDRESS_BUILD_DOC=OFF | |
-DIPADDRESS_BUILD_PACKAGES=OFF | |
- name: Build | |
run: cmake --build ${{ steps.strings.outputs.build-output-dir }} --config Release -j2 |