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

validate release actions support mulit os #197

Merged
merged 24 commits into from
Apr 7, 2023
Merged
Changes from 1 commit
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
16 changes: 10 additions & 6 deletions .github/workflows/validate-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ jobs:
echo "$i"
# 4.0 check the directory name include "incubating"
if [[ ! "$i" =~ "incubating" ]]; then
echo "The package name should include incubating" && exit 1
echo "The package name $i should include incubating" && exit 1
fi
tar xzvf "$i" || exit
cd "$(basename "$i" .tar.gz)" || exit
Expand Down Expand Up @@ -133,6 +133,7 @@ jobs:
COUNT=$(find . -type f | perl -lne 'print if -B' | grep -v *.txt | wc -l)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

need a better way to search binary files(and exclude some files marked in properties)

no we can't exit here,but we should search the key word in action log manually

if [[ $COUNT -ne 0 ]]; then
find . -type f | perl -lne 'print if -B'
# due to the search script is not perfect, we can't exit here (check manually)
echo "The package shouldn't include binary file, but get $COUNT"
Copy link
Member

@imbajin imbajin Feb 13, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Find a critical problem here, we need exclude the files with a white-list & exit here:

  1. *.txt should be allowed, but why grep -v *.txt doesn't work?
  2. exclude the file /hugegraph-hubble/hubble-fe/src/assets/imgs/logo.png
  3. exclude the file ./hugegraph-hubble/hubble-fe/public/favicon.ico
  4. exclude the file yarn.lock

This is the 1st priority we need to fix and enhance it

Copy link
Member Author

@z7658329 z7658329 Feb 13, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Find a critical problem here, we need exclude the files with a white-list & exit here:

  1. *.txt should be allowed, but why grep -v *.txt doesn't work?
  2. exclude the file /hugegraph-hubble/hubble-fe/src/assets/imgs/logo.png
  3. exclude the file ./hugegraph-hubble/hubble-fe/public/favicon.ico
  4. exclude the file yarn.lock

This is the 1st priority we need to fix and enhance it

1.should exit while check failed ?
2.use 'grep --exclude=*.{txt}' to exclude *.txt , and similar to others ?
exclude works in my repo test,see: https://github.com/z7658329/incubator-hugegraph-doc/actions/runs/4168898449/jobs/7216220550

fi

Expand All @@ -141,7 +142,8 @@ jobs:
cd .. && echo "skip computer module in java8"
continue
fi
mvn package -DskipTests -ntp && ls -lh
mvn package -DskipTests -ntp -e || exit 1
ls -lh
cd .. || exit
done

Expand Down Expand Up @@ -180,6 +182,7 @@ jobs:
echo "test hubble"
cd ./*hubble*${{ inputs.release_version }} || exit
cat conf/hugegraph-hubble.properties && bin/start-hubble.sh
# TODO: need stop the server here
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we can also add # kill the HugeGraphServer process by jps at line 154

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we can also add # kill the HugeGraphServer process by jps at line 154

seems should stop server after toolchain test

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if it's difficult to find a time to stop, we can close the old one before starting server.
image

cd ../../../ || exit
rm -rf ./*src* && ls -lh

Expand All @@ -190,12 +193,12 @@ jobs:
echo "$i"
# 7.0 check the directory name include "incubating"
if [[ ! "$i" =~ "incubating" ]]; then
echo "The package name should include incubating" && exit 1
echo "The package name $i should include incubating" && exit 1
fi
tar xzvf "$i" || exit

# 7.1 check root dir include "NOTICE"/"LICENSE"/"DISCLAIMER" files & "licenses" dir
cd "$(basename "$i" .tar.gz)" && ls -lh || exit
# 7.1 check root dir include "NOTICE"/"LICENSE"/"DISCLAIMER" & "licenses" dir
(cd "$(basename "$i" .tar.gz)" && ls -lh) || exit
if [[ ! -f "LICENSE" ]]; then
echo "The package should include LICENSE file" && exit 1
fi
Expand Down Expand Up @@ -265,10 +268,11 @@ jobs:
cat conf/hugegraph-hubble.properties
bin/stop-hubble.sh && bin/start-hubble.sh
cd - || exit
# TODO: need stop the server here

strategy:
fail-fast: false
matrix:
java_version: [ '8','11' ]
# TODO: support windows-latest or other os in future
# TODO: support windows-latest or other OS in future
os: [ubuntu-latest, macos-latest]