Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ci] move CI to github, remove hardcoded flags #22

Merged
merged 4 commits into from
Sep 17, 2024
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
104 changes: 104 additions & 0 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
# Copyright 2019 UChicago Argonne, LLC.
# (c.f. AUTHORS, LICENSE)
#
# This file is part of the AML project.
# For more info, see https://github.com/anlsys/aml
#
# SPDX-License-Identifier: BSD-3-Clause
---
Language: Cpp
AccessModifierOffset: -2
AlignAfterOpenBracket: Align
AlignConsecutiveAssignments: false
AlignConsecutiveDeclarations: false
AlignEscapedNewlines: Right
AlignOperands: true
AlignTrailingComments: false
AllowAllParametersOfDeclarationOnNextLine: true
AllowShortBlocksOnASingleLine: false
AllowShortCaseLabelsOnASingleLine: false
AllowShortFunctionsOnASingleLine: None
AllowShortIfStatementsOnASingleLine: false
AllowShortLoopsOnASingleLine: false
AlwaysBreakAfterDefinitionReturnType: None
AlwaysBreakAfterReturnType: None
AlwaysBreakBeforeMultilineStrings: false
BinPackArguments: true
BinPackParameters: false
BreakBeforeBinaryOperators: None
BreakBeforeBraces: Linux
BreakBeforeInheritanceComma: false
BreakInheritanceList: BeforeColon
BreakBeforeTernaryOperators: false
BreakConstructorInitializersBeforeComma: false
BreakConstructorInitializers: BeforeComma
BreakAfterJavaFieldAnnotations: false
BreakStringLiterals: false
ColumnLimit: 80
CommentPragmas: '^ IWYU pragma:'
CompactNamespaces: false
ConstructorInitializerAllOnOneLineOrOnePerLine: false
ConstructorInitializerIndentWidth: 8
ContinuationIndentWidth: 8
Cpp11BracedListStyle: true
DerivePointerAlignment: false
DisableFormat: false
ExperimentalAutoDetectBinPacking: false
FixNamespaceComments: false
IncludeBlocks: Regroup
IncludeCategories:
- Regex: 'config\.h'
Priority: 1
- Regex: 'test.*'
Priority: 1
- Regex: 'aml\.h'
Priority: 3
- Regex: 'aml/.*'
Priority: 4
- Regex: '^<.*\.h>'
Priority: 2
- Regex: '.*'
Priority: 5
IncludeIsMainRegex: 'aml\.h'
IndentCaseLabels: false
IndentWidth: 8
IndentWrappedFunctionNames: false
JavaScriptQuotes: Leave
JavaScriptWrapImports: true
KeepEmptyLinesAtTheStartOfBlocks: true
MacroBlockBegin: ''
MacroBlockEnd: ''
MaxEmptyLinesToKeep: 1
NamespaceIndentation: Inner
PenaltyBreakAssignment: 10
PenaltyBreakBeforeFirstCallParameter: 30
PenaltyBreakComment: 10
PenaltyBreakFirstLessLess: 0
PenaltyBreakString: 10
PenaltyBreakTemplateDeclaration: 10
PenaltyExcessCharacter: 100
PenaltyReturnTypeOnItsOwnLine: 60
PointerAlignment: Right
ReflowComments: true
SortIncludes: true
SortUsingDeclarations: true
SpaceAfterCStyleCast: false
SpaceAfterTemplateKeyword: true
SpaceBeforeAssignmentOperators: true
SpaceBeforeCpp11BracedList: false
SpaceBeforeCtorInitializerColon: true
SpaceBeforeInheritanceColon: true
SpaceBeforeParens: ControlStatements
SpaceBeforeRangeBasedForLoopColon: true
SpaceInEmptyParentheses: false
SpacesBeforeTrailingComments: 1
SpacesInAngles: false
SpacesInContainerLiterals: false
SpacesInCStyleCastParentheses: false
SpacesInParentheses: false
SpacesInSquareBrackets: false
Standard: Cpp03
TabWidth: 8
UseTab: ForIndentation
...

109 changes: 109 additions & 0 deletions .github/workflows/builds.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
name: builds
on:
push:
branches:
- master
pull_request:

env:
CFLAGS: "-std=c99 -pedantic -Wall -Wextra -Werror -Wno-unused-but-set-parameter -Wno-builtin-declaration-mismatch"
VERBOSE: 1
jobs:
generic:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
submodules: true
fetch-depth: 0
- run: sudo apt-get update
- run: sudo apt-get install -y gcc make autoconf automake libtool pkgconf
- name: configure
run: |
./autogen.sh
mkdir build
./configure --prefix=`pwd`/build
- run: make
- run: make check
- run: make install
- uses: actions/upload-artifact@v4
if: failure()
with:
name: generic
path: |
config.log
tests/*.log
out-of-tree:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
submodules: true
fetch-depth: 0
- run: sudo apt-get update
- run: sudo apt-get install -y gcc make autoconf automake libtool pkgconf libhwloc-dev
- name: configure
run: |
./autogen.sh
mkdir out
cd out
mkdir build
../configure --prefix=`pwd`/build --without-rocm
- run: make
working-directory: out
- run: make check
working-directory: out
- uses: actions/upload-artifact@v4
if: failure()
with:
name: out-of-tree
path: |
out/config.log
out/tests/*.log
valgrind:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
submodules: true
fetch-depth: 0
- run: sudo apt-get update
- run: sudo apt-get install -y gcc make autoconf automake libtool pkgconf valgrind
- name: configure
run: |
./autogen.sh
mkdir build
./configure --prefix=`pwd`/build --enable-valgrind
- run: make
- run: make check-valgrind
env:
VALGRIND_SUPPRESSIONS_FILES: ${{ github.workspace }}/.valgrind.supp
- uses: actions/upload-artifact@v4
if: failure()
with:
name: valgrind
path: |
config.log
tests/*.log
distcheck:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
submodules: true
fetch-depth: 0
- run: sudo apt-get update
- run: sudo apt-get install -y gcc make autoconf automake libtool pkgconf
- name: configure
run: |
./autogen.sh
mkdir build
./configure --prefix=`pwd`/build
- run: make distcheck
- uses: actions/upload-artifact@v4
if: failure()
with:
name: distcheck
path: |
config.log
tests/*.log
27 changes: 27 additions & 0 deletions .github/workflows/style.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: style-checks
on: [pull_request]
jobs:
clang-format:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: retrieve merge target info
run: git fetch origin $GITHUB_BASE_REF
- run: sudo apt-get update
- run: sudo apt-get install -y clang-format-12
- name: run git-clang-format
run: |
target=$(git rev-parse origin/$GITHUB_BASE_REF)
git-clang-format-12 --quiet --diff $target > clang-format-diff
lint=$(grep -v --color=never "no modified files to format" clang-format-diff || true)
if [ ! -z "$lint" ]; then echo "format errors, inspect the clang-format-diff artifact for info"; exit 1; else exit 0; fi
shell: bash
- name: output clang format diff
if: always()
run: cat ./clang-format-diff
license-check:
runs-on: ubuntu-latest
container: apache/skywalking-eyes
steps:
- uses: actions/checkout@v2
- run: /bin/license-eye -c .licenserc.yml -v debug header check
11 changes: 0 additions & 11 deletions .gitlab-ci.yml

This file was deleted.

20 changes: 20 additions & 0 deletions .licenserc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
header:
license:
spdx-id: BSD-3-Clause
copyright-owner: UChicago Argonne, LLC
content: |
Copyright 2019 UChicago Argonne, LLC.
(c.f. AUTHORS, LICENSE)

This file is part of the EXCIT project.
For more info, see https://github.com/anlsys/excit

SPDX-License-Identifier: BSD-3-Clause

paths:
- '**/*.c'
- '**/*.h'
- '**/*.h.in'
paths-ignore:
- 'src/dev/excit.h'
comment: never
3 changes: 0 additions & 3 deletions .repoquality

This file was deleted.

12 changes: 12 additions & 0 deletions .valgrind.supp
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
ignore_unversioned_libs
Memcheck:Leak
...
obj:*/lib*/lib*.so
}
{
ignore_versioned_libs
Memcheck:Leak
...
obj:*/lib*/lib*.so.*
}
2 changes: 0 additions & 2 deletions src/Makefile.am
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
AM_CFLAGS = -std=c99 -Wall -Wextra -Werror -pedantic

lib_LTLIBRARIES = libexcit.la

libexcit_la_SOURCES = excit.c \
Expand Down
4 changes: 2 additions & 2 deletions src/composition.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
* (c.f. AUTHORS, LICENSE)
*
* This file is part of the EXCIT project.
* For more info, see https://xgitlab.cels.anl.gov/argo/excit
* For more info, see https://github.com/anlsys/excit
*
* SPDX-License-Identifier: BSD-3-Clause
*******************************************************************************/
******************************************************************************/
#include "dev/excit.h"
#include "composition.h"

Expand Down
4 changes: 2 additions & 2 deletions src/composition.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
* (c.f. AUTHORS, LICENSE)
*
* This file is part of the EXCIT project.
* For more info, see https://xgitlab.cels.anl.gov/argo/excit
* For more info, see https://github.com/anlsys/excit
*
* SPDX-License-Identifier: BSD-3-Clause
*******************************************************************************/
******************************************************************************/
#ifndef EXCIT_SLICE_H
#define EXCIT_SLICE_H

Expand Down
4 changes: 2 additions & 2 deletions src/cons.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
* (c.f. AUTHORS, LICENSE)
*
* This file is part of the EXCIT project.
* For more info, see https://xgitlab.cels.anl.gov/argo/excit
* For more info, see https://github.com/anlsys/excit
*
* SPDX-License-Identifier: BSD-3-Clause
*******************************************************************************/
******************************************************************************/
#include "dev/excit.h"
#include "cons.h"

Expand Down
4 changes: 2 additions & 2 deletions src/cons.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
* (c.f. AUTHORS, LICENSE)
*
* This file is part of the EXCIT project.
* For more info, see https://xgitlab.cels.anl.gov/argo/excit
* For more info, see https://github.com/anlsys/excit
*
* SPDX-License-Identifier: BSD-3-Clause
*******************************************************************************/
******************************************************************************/
#ifndef EXCIT_CONS_H
#define EXCIT_CONS_H

Expand Down
4 changes: 2 additions & 2 deletions src/excit.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
* (c.f. AUTHORS, LICENSE)
*
* This file is part of the EXCIT project.
* For more info, see https://xgitlab.cels.anl.gov/argo/excit
* For more info, see https://github.com/anlsys/excit
*
* SPDX-License-Identifier: BSD-3-Clause
*******************************************************************************/
******************************************************************************/
#include <stdlib.h>
#include "excit.h"
#include "dev/excit.h"
Expand Down
4 changes: 2 additions & 2 deletions src/excit.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
* (c.f. AUTHORS, LICENSE)
*
* This file is part of the EXCIT project.
* For more info, see https://xgitlab.cels.anl.gov/argo/excit
* For more info, see https://github.com/anlsys/excit
*
* SPDX-License-Identifier: BSD-3-Clause
*******************************************************************************/
******************************************************************************/
#ifndef EXCIT_H
#define EXCIT_H 1

Expand Down
4 changes: 2 additions & 2 deletions src/hilbert2d.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
* (c.f. AUTHORS, LICENSE)
*
* This file is part of the EXCIT project.
* For more info, see https://xgitlab.cels.anl.gov/argo/excit
* For more info, see https://github.com/anlsys/excit
*
* SPDX-License-Identifier: BSD-3-Clause
*******************************************************************************/
******************************************************************************/
#include "dev/excit.h"
#include "hilbert2d.h"

Expand Down
Loading
Loading