+
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ max_line_length = 100
indent_style = space
indent_size = 2

[*.yaml]
indent_style = space
indent_size = 2

[*.py]
indent_style = space
indent_size = 4
Expand Down
17 changes: 17 additions & 0 deletions .github/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
changelog:
exclude:
labels:
- ignore-for-release
categories:
- title: New Features
labels:
- enhancement
- title: Fixed Problems
labels:
- bug-fix
- title: API Changes
labels:
- api-change
- title: Other Changes
labels:
- "*"
96 changes: 96 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
name: build

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
build:
name: "${{ matrix.os }}, ${{ matrix.build }}"
defaults:
run:
shell: bash -el {0}
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-22.04
build: Debug
- os: ubuntu-22.04
build: Release
runs-on: ${{ matrix.os }}
steps:
- name: Set up miniconda
uses: conda-incubator/setup-miniconda@v3
with:
python-version: 3.9
auto-update-conda: false
channels: andrsd,defaults

- name: Checkout source
uses: actions/checkout@v4

- name: Install dependencies
run: |
conda install \
cmake \
make \
mpich-mpicxx \
fmt==9.1.0 \
yaml-cpp=0.8.0 \
boost \
lcov

- name: Configure
run: |
cmake -S ${{ github.workspace }} -B ${{ github.workspace }}/build \
-DCMAKE_BUILD_TYPE=${{ matrix.build }} \
-DTECIOCPP_WITH_MPI=YES \
-DTECIOCPP_BUILD_TESTS=YES \
-DTECIOCPP_CODE_COVERAGE=YES

- name: Build
run: make -C ${{ github.workspace }}/build

- name: Run tests
run: |
echo "### Test results" >> $GITHUB_STEP_SUMMARY
ctest --test-dir ${{ github.workspace }}/build -O test.log
echo "\`\`\`" >> $GITHUB_STEP_SUMMARY
awk 's;/^\[HANDLER_OUTPUT\]/{s=1}' test.log >> $GITHUB_STEP_SUMMARY
echo "\`\`\`" >> $GITHUB_STEP_SUMMARY

- name: Upload test result
if: always()
uses: actions/upload-artifact@v4
with:
name: test-results-${{ matrix.os }}-${{ matrix.build }}-petsc-${{ matrix.petsc }}
path: ${{ github.workspace }}/build/Testing/Temporary/LastTest.log

- name: Generate code coverage
run: make -C ${{ github.workspace }}/build coverage

- name: Upload coverage artifact
uses: actions/upload-artifact@v4
with:
name: coverage-${{ matrix.os }}-${{ matrix.build }}-petsc-${{ matrix.petsc }}
path: ${{ github.workspace }}/build/coverage.info

upload-to-codecov:
needs: [build]
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Download artifacts
uses: actions/download-artifact@v4

- name: Upload to Codecov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
63 changes: 63 additions & 0 deletions .github/workflows/qa.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: qa

on:
pull_request:
branches:
- main

jobs:
cpp-linter:
name: c++ linter
defaults:
run:
shell: bash -el {0}
runs-on: ubuntu-22.04
steps:
- name: Set up miniconda
uses: conda-incubator/setup-miniconda@v3
with:
python-version: 3.9
auto-update-conda: false
channels: andrsd,defaults

- uses: actions/checkout@v4

- name: Install dependencies
run: |
conda install \
cmake \
make \
mpich-mpicxx \
fmt==9.1.0 \
yaml-cpp==0.8.0 \
boost

- name: Configure
run: |
cmake -S ${{ github.workspace }} -B ${{ github.workspace }}/build \
-DTECIOCPP_WITH_MPI=YES \
-DTECIOCPP_BUILD_TESTS=YES \
-DCMAKE_EXPORT_COMPILE_COMMANDS=on

- uses: cpp-linter/cpp-linter-action@v2
with:
style: file
tidy-checks: ""
version: 14
lines-changed-only: true
ignore: "contrib"
step-summary: true
database: build
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

check-spdx-tags:
name: check spdx tags
defaults:
run:
shell: bash -el {0}
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4

- uses: kt3k/license_checker@v1.0.6
4 changes: 4 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ option(TECIOCPP_WITH_MPI "Build with MPI support" YES)
option(TECIOCPP_BUILD_TESTS "Build tests" NO)
option(TECIOCPP_BUILD_TOOLS "Build tools" YES)

find_package(Boost REQUIRED CONFIG)
if (Boost_FOUND)
message(STATUS "Found Boost: ${Boost_INCLUDE_DIRS} (found version \"${Boost_VERSION}\")")
endif()
find_package(fmt 8.0 REQUIRED)
if (TECIOCPP_WITH_MPI)
find_package(MPI REQUIRED)
Expand Down
1 change: 1 addition & 0 deletions src/file.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
#include "teciocpp/exception.h"
#include "teciocpp/utils.h"
#include "TECIO.h"
#include <algorithm>
#include <cassert>

namespace teciocpp {
Expand Down
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载