Skip to content
Draft
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
11 changes: 11 additions & 0 deletions .github/workflows/build-and-test-plugin-with-irods-packages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
name: build-and-test-plugin-with-irods-packages

on: [push, pull_request]

defaults:
run:
shell: bash

jobs:
build_and_test_plugin_with_prerelease_packages_using_default_matrix:
uses: irods/irods_reusable_github_workflows/.github/workflows/build-and-test-plugin-with-irods-packages-matrix.yml@main
11 changes: 11 additions & 0 deletions .github/workflows/build-and-test-plugin.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
name: build-and-test-plugin

on: [push, pull_request]

defaults:
run:
shell: bash

jobs:
build_and_test_plugin_using_default_matrix:
uses: irods/irods_reusable_github_workflows/.github/workflows/build-and-test-plugin-matrix.yml@main
45 changes: 0 additions & 45 deletions .github/workflows/build-irods-centos.yml

This file was deleted.

44 changes: 0 additions & 44 deletions .github/workflows/build-irods-debian.yml

This file was deleted.

46 changes: 0 additions & 46 deletions .github/workflows/build-irods-enterprise-linux.yml

This file was deleted.

51 changes: 0 additions & 51 deletions .github/workflows/build-irods-ubuntu.yml

This file was deleted.

46 changes: 5 additions & 41 deletions .github/workflows/linter-irods-clang-format.yml
Original file line number Diff line number Diff line change
@@ -1,47 +1,11 @@
name: linter-irods-clang-format
name: Check Formatting

on: pull_request

defaults:
run:
shell: bash

jobs:
clang-format:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v3
with:
# Get all history for the repository (branches, tags, etc).
# This is required in order for clang-format to work correctly.
fetch-depth: 0
- name: Install Prerequisites
run: |
sudo apt-get update -qq
sudo apt-get install -qq apt-transport-https ca-certificates
sudo apt-get install -qq wget
- name: Install Clang Compiler
run: |
wget -qO - https://unstable.irods.org/irods-unstable-signing-key.asc | sudo apt-key add -
echo "deb [arch=amd64] https://unstable.irods.org/apt/ $(lsb_release -sc) main" | sudo tee /etc/apt/sources.list.d/renci-irods-unstable.list
sudo apt-get update -qq
sudo apt-get install -qq irods-externals-clang13.0.0-0
- name: Run Clang-Format
run: |
# Make clang-format available.
export PATH=/opt/irods-externals/clang13.0.0-0/bin:$PATH

# Configure Git so that "git clang-format" can be run.
git config --global clangFormat.binary clang-format
git config --global clangFormat.style file
git config --global clangFormat.extensions 'h,c,hpp,cpp,tpp'

# Diff the target branch with all changes made within the pull request.
diff_output=$(git clang-format --diff origin/$GITHUB_BASE_REF)

if [[ "$diff_output" == *"no modified files to format"* ]] || [[ "$diff_output" == *"clang-format did not modify any files"* ]]; then
echo "Source code is properly formatted.";
exit 0
else
echo "Source code needs to be formatted!";
echo "$diff_output"
exit 1
fi
uses: irods/irods_reusable_github_workflows/.github/workflows/linter-irods-clang-format.yml@main
99 changes: 7 additions & 92 deletions .github/workflows/linter-irods-clang-tidy.yml
Original file line number Diff line number Diff line change
@@ -1,98 +1,13 @@
name: linter-irods-clang-tidy
name: Run Static Analysis Checks

on: pull_request

defaults:
run:
shell: bash

jobs:
clang-tidy:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v3
with:
# Get all history for the repository (branches, tags, etc).
# This is required in order for clang-tidy to work correctly.
fetch-depth: 0
- name: Install Prerequisites
run: |
sudo apt-get update -qq
sudo apt-get install -qq apt-transport-https ca-certificates
sudo apt-get install -qq \
wget \
curl \
g++ \
make \
python-dev \
unixodbc \
libcurl4-gnutls-dev \
libbz2-dev \
zlib1g-dev \
libpam0g-dev \
libssl-dev \
libxml2-dev \
unixodbc-dev \
python-psutil \
super \
odbc-postgresql \
libkrb5-dev \
python3-distro
- name: Install libstdc++6
run: |
sudo apt-get install -qq software-properties-common
sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
sudo apt-get update -qq
sudo apt-get install -qq libstdc++6
- name: Install iRODS Externals
run: |
wget -qO - https://unstable.irods.org/irods-unstable-signing-key.asc | sudo apt-key add -
echo "deb [arch=amd64] https://unstable.irods.org/apt/ $(lsb_release -sc) main" | sudo tee /etc/apt/sources.list.d/renci-irods-unstable.list
sudo apt-get update -qq
sudo apt-get install -qq \
irods-externals-avro1.11.0-1 \
irods-externals-boost1.78.0-0 \
irods-externals-catch22.13.8-0 \
irods-externals-clang-runtime13.0.0-0 \
irods-externals-clang13.0.0-0 \
irods-externals-cmake3.21.4-0 \
irods-externals-cppzmq4.8.1-1 \
irods-externals-fmt8.1.1-0 \
irods-externals-json3.10.4-0 \
irods-externals-libarchive3.5.2-0 \
irods-externals-nanodbc2.13.0-1 \
irods-externals-spdlog1.9.2-1 \
irods-externals-zeromq4-14.1.8-0
- name: Configure CMake
run: |
export PATH=/opt/irods-externals/cmake3.21.4-0/bin:$PATH
mkdir build
cd build
cmake ..
- name: Run Clang-Tidy
run: |
# Make clang and clang-tidy available.
export PATH=/opt/irods-externals/clang13.0.0-0/bin:$PATH
export PATH=/opt/irods-externals/clang13.0.0-0/share/clang:$PATH

# Run clang-tidy on the changes.
git diff -U0 origin/$GITHUB_BASE_REF | \
clang-tidy-diff.py -p1 -path build/compile_commands.json -quiet | \
tee clang_tidy_output.txt

# Return a failure if the output contains a clang-tidy error or warning.
# clang-tidy-diff.py doesn't report a non-zero error code when it finds violations.
clang_tidy_text=$(cat clang_tidy_output.txt)
if [[ "$clang_tidy_text" == *": error: "* ]] || [[ "$clang_tidy_text" == *": warning: "* ]]; then
echo 'Source code needs some attention!'
echo
echo 'If the results are hard to follow, you can enable color by running the following command at the bench:'
echo
echo " git diff -U0 $GITHUB_BASE_REF | clang-tidy-diff.py -p1 -use-color -path /path/to/build/compile_commands.json -quiet"
echo
echo 'This command only works while the branch associated with this pull request is checked out.'
echo

exit 1
fi

echo "Source code is tidy :-)"

uses: irods/irods_reusable_github_workflows/.github/workflows/linter-irods-clang-tidy.yml@main
with:
install_irods_development_package: true
Loading
Loading