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

GitHub Action for Code Cleanliness Check #93

Merged
merged 1 commit into from
Oct 9, 2022
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
38 changes: 38 additions & 0 deletions .github/workflows/code-cleanliness.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Code Cleanliness Checks

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
cache: maven
- name: Install dependencies
run: |
sudo apt-get update && sudo apt-get install -y --no-install-recommends \
libxml2-utils
- name: Install Eclipse SDK
run: |
curl -sL https://download.eclipse.org/eclipse/downloads/drops4/R-4.23-202203080310/eclipse-SDK-4.23-linux-gtk-x86_64.tar.gz | tar xz
- name: Run Check Code Cleanliness
run: ECLIPSE=$PWD/eclipse/eclipse ./releng/scripts/check_code_cleanliness.sh
- name: Upload Logs
uses: actions/upload-artifact@v3
if: success() || failure()
with:
name: Code Cleanliness Detailed Logs
path: '*.log'
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@ check_code_cleanliness_workspace/
*.takari_issue_192
*.log
.tycho-consumer-pom.xml
/eclipse/
1 change: 0 additions & 1 deletion releng/scripts/check_code_cleanliness.sh
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ ${DIR}/check_glibc_dependencies.sh
##
# Make sure all versions have been bumped appropriately compared to the baseline
##
java -XX:+PrintFlagsFinal -version
logfile=baseline-compare-and-replace.log
echo "Running 'mvn verify -P baseline-compare-and-replace' to make sure all versions"
echo "have been appropriately incremented. The check output is very verbose, so it is"
Expand Down
8 changes: 8 additions & 0 deletions releng/scripts/check_dll_dependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,14 @@

set -eu

SCRIPT=$( basename "${BASH_SOURCE[0]}" )

if ! command -v x86_64-w64-mingw32-objdump &> /dev/null
then
echo "WARNING: Skipping ${SCRIPT} because mingw cross compiler tools are not available"
exit 0
fi

# This is the current set of allowed DLL dependencies for CDT code. Additional entries here are permitted,
# provided they are found on all Windows machines by default.
ALLOWED_DLLS="KERNEL32.DLL MSVCRT.DLL USER32.DLL PSAPI.DLL SHELL32.DLL ADVAPI32.DLL"
Expand Down
8 changes: 8 additions & 0 deletions releng/scripts/check_glibc_dependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,14 @@

set -eu

SCRIPT=$( basename "${BASH_SOURCE[0]}" )

if ! command -v aarch64-linux-gnu-readelf &> /dev/null
then
echo "WARNING: Skipping ${SCRIPT} because aarch/powerpc cross compiler tools are not available"
exit 0
fi


###
# Check that all .so files in CDT for a given ${ARCH} (using ${PREFIX} toolchain)
Expand Down
8 changes: 8 additions & 0 deletions releng/scripts/do_rebuild_natives.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,14 @@

set -e

SCRIPT=$( basename "${BASH_SOURCE[0]}" )

if ! command -v x86_64-apple-darwin21.1-clang &> /dev/null
then
echo "WARNING: Skipping ${SCRIPT} because Darwin clang is not available"
exit 0
fi

##
# Make sure that natives are up to date
##
Expand Down