diff --git a/.github/workflows/java-format.yml b/.github/workflows/java-format.yml new file mode 100644 index 0000000..c6c72f0 --- /dev/null +++ b/.github/workflows/java-format.yml @@ -0,0 +1,38 @@ +name: Google Java Style Format + +on: + pull_request: + branches: [ master, develop ] + +jobs: + java-formatting: + runs-on: ubuntu-latest + steps: + - name: Checkout Repo + uses: actions/checkout@v4 + with: + token: ${{ secrets.PAT }} + + - name: Check for Java files + id: check_java_files + run: | + if [ -n "$(find . -name '*.java' -print -quit)" ]; then + echo "java_files_exist=true" >> $GITHUB_OUTPUT + else + echo "java_files_exist=false" >> $GITHUB_OUTPUT + fi + + - name: Google Java Style Format + if: steps.check_java_files.outputs.java_files_exist == 'true' + uses: axel-op/googlejavaformat-action@v3 + with: + # --aosp: 4-space indentation + args: "--replace --aosp" + # Can not auto commit, we'll commit manually + skip-commit: true + + - name: Commit Changes + if: steps.check_java_files.outputs.java_files_exist == 'true' + uses: stefanzweifel/git-auto-commit-action@v5 + with: + commit_message: "Apply Google Java Style Format" diff --git a/.gitignore b/.gitignore index 524f096..8b7dead 100644 --- a/.gitignore +++ b/.gitignore @@ -22,3 +22,6 @@ # virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml hs_err_pid* replay_pid* + +# root directory for the file explorer +.root/ diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..9967aee --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "3rdparty/docker-script"] + path = 3rdparty/docker-script + url = https://github.com/CMIPT/docker-script.git diff --git a/3rdparty/docker-script b/3rdparty/docker-script new file mode 160000 index 0000000..934e238 --- /dev/null +++ b/3rdparty/docker-script @@ -0,0 +1 @@ +Subproject commit 934e238510d11617dfdb89ea28f5acd941db74cd