This is an automated email from the ASF dual-hosted git repository. jin pushed a commit to branch visit-stage in repository https://gitbox.apache.org/repos/asf/incubator-hugegraph-computer.git
commit 06f11300c9ed50a0e16498884f7e4b7a89772cf4 Author: imbajin <[email protected]> AuthorDate: Wed Nov 22 13:03:42 2023 +0800 chore(ci): update common 1.2 & upgrade action version --- .github/configs/settings.xml | 60 +++++++++++++++++++++++++++++++ .github/workflows/ci.yml | 14 ++++++-- .github/workflows/codeql-analysis.yml | 68 ++++++++++++++++++++--------------- .github/workflows/license-checker.yml | 8 ++++- .github/workflows/stale.yml | 2 +- pom.xml | 18 ++++++++-- 6 files changed, 135 insertions(+), 35 deletions(-) diff --git a/.github/configs/settings.xml b/.github/configs/settings.xml new file mode 100644 index 00000000..294ded1c --- /dev/null +++ b/.github/configs/settings.xml @@ -0,0 +1,60 @@ +<!-- + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + --> + +<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 https://maven.apache.org/xsd/settings-1.0.0.xsd"> + <servers> + <server> + <id>github</id> + <username>${env.GITHUB_ACTOR}</username> + <password>${env.GITHUB_TOKEN}</password> + </server> + </servers> + + <profiles> + <profile> + <id>local-repo</id> + <repositories> + <repository> + <id>central</id> + <url>https://repo.maven.apache.org/maven2</url> + <releases> + <enabled>true</enabled> + </releases> + <snapshots> + <enabled>false</enabled> + </snapshots> + </repository> + <repository> + <id>staged-releases</id> + <url>https://repository.apache.org/content/groups/staging/</url> + </repository> + </repositories> + <pluginRepositories> + <pluginRepository> + <id>staged-releases</id> + <url>https://repository.apache.org/content/groups/staging/</url> + </pluginRepository> + </pluginRepositories> + </profile> + </profiles> + + <activeProfiles> + <activeProfile>local-repo</activeProfile> + </activeProfiles> +</settings> diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e64ec7d7..9573b001 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,14 +11,16 @@ jobs: computer-ci: runs-on: ubuntu-latest env: + USE_STAGE: 'true' # Whether to include the stage repository. TRAVIS_DIR: computer-dist/src/assembly/travis KUBERNETES_VERSION: 1.20.1 + # TODO: update it before release HUGEGRAPH_SERVER_COMMIT_ID: d01c8737d7d5909119671953521f1401dcd1a188 BSP_ETCD_URL: http://localhost:2579 steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 2 @@ -73,6 +75,7 @@ jobs: - name: Prepare env and service run: | $TRAVIS_DIR/install-env.sh + # TODO: use docker image to replace it $TRAVIS_DIR/install-hugegraph-from-source.sh $HUGEGRAPH_SERVER_COMMIT_ID $TRAVIS_DIR/load-data-into-hugegraph.sh @@ -82,6 +85,12 @@ jobs: java-version: '11' distribution: 'zulu' + - name: Use staged maven repo + if: ${{ env.USE_STAGE == 'true' }} + run: | + cp $HOME/.m2/settings.xml /tmp/settings.xml + mv -vf .github/configs/settings.xml $HOME/.m2/settings.xml + - name: Compile run: mvn clean compile -Dmaven.javadoc.skip=true -ntp @@ -92,6 +101,7 @@ jobs: run: mvn test -P unit-test -ntp - name: Upload coverage to Codecov - uses: codecov/[email protected] + uses: codecov/codecov-action@v3 with: + token: ${{ secrets.CODECOV_TOKEN }} file: target/site/jacoco/jacoco.xml diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 7bc30f62..4457592c 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -4,8 +4,8 @@ name: "CodeQL" on: pull_request: - # The branches below must be a subset of the branches above, now enable it in all PR - # branches: [ master ] + # The branches below must be a subset of the branches above, now enable it in all PR + # branches: [ master ] schedule: - cron: '45 7 * * 1' @@ -24,43 +24,55 @@ jobs: language: [ 'go', 'java' ] steps: - - name: Checkout repository - uses: actions/checkout@v3 + - name: Checkout repository + uses: actions/checkout@v4 - # Initializes the CodeQL tools for scanning. - - name: Initialize CodeQL - uses: github/codeql-action/init@v2 - with: - languages: ${{ matrix.language }} - # If you wish to specify custom queries, you can do so here or in a config file. - # By default, queries listed here will override any specified in a config file. - # Prefix the list here with "+" to use these queries and those in the config file. - # queries: ./path/to/local/query, your-org/your-repo/queries@main + - name: Setup Java JDK + uses: actions/setup-java@v3 + with: + distribution: 'zulu' + java-version: '11' - # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). - # If this step fails, then you should remove it and run the build manually (see below) - - name: Autobuild - uses: github/codeql-action/autobuild@v2 + - name: use staged maven repo settings + if: ${{ env.USE_STAGE == 'true' }} + run: | + cp $HOME/.m2/settings.xml /tmp/settings.xml + mv -vf .github/configs/settings.xml $HOME/.m2/settings.xml - # âšī¸ Command-line programs to run using the OS shell. - # đ https://git.io/JvXDl + # Initializes the CodeQL tools for scanning. + - name: Initialize CodeQL + uses: github/codeql-action/init@v2 + with: + languages: ${{ matrix.language }} + # If you wish to specify custom queries, you can do so here or in a config file. + # By default, queries listed here will override any specified in a config file. + # Prefix the list here with "+" to use these queries and those in the config file. + # queries: ./path/to/local/query, your-org/your-repo/queries@main - # âī¸ If the Autobuild fails above, remove it and uncomment the following three lines - # and modify them (or add more) to build your code if your project - # uses a compiled language + # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). + # If this step fails, then you should remove it and run the build manually (see below) + - name: Autobuild + uses: github/codeql-action/autobuild@v2 - #- run: | - # make bootstrap - # make release + # âšī¸ Command-line programs to run using the OS shell. + # đ https://git.io/JvXDl - - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v2 + # âī¸ If the Autobuild fails above, remove it and uncomment the following three lines + # and modify them (or add more) to build your code if your project + # uses a compiled language + + #- run: | + # make bootstrap + # make release + + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v2 dependency-review: runs-on: ubuntu-latest steps: - name: 'Checkout Repository' - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: 'Dependency Review' uses: actions/dependency-review-action@v3 diff --git a/.github/workflows/license-checker.yml b/.github/workflows/license-checker.yml index ea2c3687..5706d52d 100644 --- a/.github/workflows/license-checker.yml +++ b/.github/workflows/license-checker.yml @@ -15,7 +15,7 @@ jobs: check-license-header: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 # More info could refer to: https://github.com/apache/skywalking-eyes - name: Check License Header uses: apache/skywalking-eyes@main @@ -41,6 +41,7 @@ jobs: # runs-on: ubuntu-latest # env: # SCRIPT_DEPENDENCY: computer-dist/scripts/dependency +# USE_STAGE: 'true' # Whether to include the stage repository. # steps: # - name: Checkout source # uses: actions/checkout@v3 @@ -49,6 +50,11 @@ jobs: # with: # java-version: '11' # distribution: 'adopt' +# - name: use staged maven repo settings +# if: ${{ env.USE_STAGE == 'true' }} +# run: | +# cp $HOME/.m2/settings.xml /tmp/settings.xml +# mv -vf .github/configs/settings.xml $HOME/.m2/settings.xml # - name: mvn install # run: | # mvn install -DskipTests=true -ntp diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml index 3ba4f72b..5b5cdc21 100644 --- a/.github/workflows/stale.yml +++ b/.github/workflows/stale.yml @@ -13,7 +13,7 @@ jobs: pull-requests: write steps: - - uses: actions/stale@v3 + - uses: actions/stale@v8 with: repo-token: ${{ secrets.GITHUB_TOKEN }} stale-issue-message: 'Due to the lack of activity, the current issue is marked as stale and will be closed after 20 days, any update will remove the stale label' diff --git a/pom.xml b/pom.xml index 2784670b..79bf1727 100644 --- a/pom.xml +++ b/pom.xml @@ -31,7 +31,8 @@ <name>hugegraph-computer</name> <url>https://github.com/apache/hugegraph-computer</url> <description> - hugegraph-computer is a fast-speed, highly-scalable, fault-tolerance graph processing system developed by apache. + hugegraph-computer is a fast-speed, highly scalable, fault-tolerance graph processing + system developed by apache. </description> <inceptionYear>2020</inceptionYear> @@ -88,6 +89,7 @@ </prerequisites> <properties> + <!-- TODO: update the version after toolchain v1.2 fixed --> <revision>1.0.0</revision> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <top.level.dir>${project.basedir}/..</top.level.dir> @@ -100,7 +102,7 @@ <hadoop-version>3.1.2</hadoop-version> <netty-version>4.1.42.Final</netty-version> <commons-lang3-version>3.12.0</commons-lang3-version> - <hugegraph-common-version>1.0.0</hugegraph-common-version> + <hugegraph-common-version>1.2.0</hugegraph-common-version> <hugegraph-client-version>1.0.0</hugegraph-client-version> <hugegraph-rpc-version>1.0.0</hugegraph-rpc-version> <hugegraph-loader-version>1.0.0</hugegraph-loader-version> @@ -347,7 +349,7 @@ </plugin> <plugin> <artifactId>maven-compiler-plugin</artifactId> - <!-- Keep fix version to avoid computer-k8s-operator build error --> + <!-- Keep a fixed version to avoid computer-k8s-operator build error --> <version>3.1</version> <configuration> <source>${compiler.source}</source> @@ -526,5 +528,15 @@ </plugins> </build> </profile> + <!-- use mvn -P stage to enable the remote apache-stage repo --> + <profile> + <id>stage</id> + <repositories> + <repository> + <id>staged-releases</id> + <url>https://repository.apache.org/content/groups/staging/</url> + </repository> + </repositories> + </profile> </profiles> </project>
