Skip to content

fix: Convert wind_charge as an item #384

fix: Convert wind_charge as an item

fix: Convert wind_charge as an item #384

Workflow file for this run

name: CI
on:
push:
branches:
- main
- dev
jobs:
style:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Check style
uses: DoozyX/clang-format-lint-action@v0.17
with:
clangFormatVersion: 12
cppcheck:
runs-on: ubuntu-latest
needs: [style]
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install cppcheck
run: sudo apt install -y cppcheck
- name: Run cppcheck
run: |
cppcheck --version
make cppcheck
build:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
needs: [style]
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0
lfs: true
- name: Restore timestamps
shell: bash
run: bash tool/git-restore-mtime.sh
- name: Checkout lfs files
shell: bash
run: git lfs checkout
- name: Cache workspace directory
id: cache
uses: actions/cache@v4
with:
path: build
key: ${{ runner.os }}-${{ github.run_id }}
restore-keys: |
${{ runner.os }}-
- name: Configure
shell: bash
run: |
test "${{ matrix.os }}" == "ubuntu-latest" && export CC=gcc-11 && export CXX=g++-11
cmake . -B ./build -DCMAKE_BUILD_TYPE=Release
- name: Build (Parallel)
if: ${{ matrix.os != 'macos-latest' }}
shell: bash
run: |
cmake --build ./build --target je2be-test --config Release --parallel $(nproc)
- name: Build (Serial)
if: ${{ matrix.os == 'macos-latest' }}
shell: bash
run: |
cmake --build ./build --target je2be-test --config Release
- name: Test
shell: bash
run: |
test "${{ matrix.os }}" == "windows-latest" && cd build/Release
test "${{ matrix.os }}" != "windows-latest" && cd build
./je2be-test --duration=true
analysis:
runs-on: ubuntu-latest
needs: [style]
permissions:
actions: read
contents: read
security-events: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0
lfs: true
- name: Checkout lfs files
shell: bash
run: git lfs checkout
- name: Install tools
run: |
wget -q -O - https://files.pvs-studio.com/etc/pubkey.txt | sudo apt-key add -
sudo wget -O /etc/apt/sources.list.d/viva64.list https://files.pvs-studio.com/etc/viva64.list
sudo apt update
sudo apt install pvs-studio
pvs-studio-analyzer credentials ${{ secrets.PVS_STUDIO_CREDENTIALS }}
- name: Build
run: |
CC=gcc-11 CXX=g++-11 cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -B ./build .
cmake --build ./build --target je2be --parallel $(nproc)
- name: Analyze
run: |
pvs-studio-analyzer analyze -f ./build/compile_commands.json -j $(nproc) -e ./build/_deps -e ./test -e ./example
- name: Convert report
run: |
plog-converter --excludedCodes V1042 -t sarif -o pvs-report.sarif PVS-Studio.log
- name: Publish report
uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: pvs-report.sarif
category: PVS-Studio