<sync>(code): sync code from release-3.8.0 #2485
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Java-SDK GitHub Actions | |
on: | |
pull_request: | |
release: | |
types: [ published, created, edited ] | |
env: | |
CCACHE_DIR: ${{ github.workspace }}/ccache | |
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true | |
jobs: | |
build: | |
name: build | |
runs-on: ${{ matrix.os }} | |
continue-on-error: true | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ ubuntu-20.04, ubuntu-22.04, windows-2019, macos-12 ] | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
fetch-depth: 5 | |
- uses: actions/cache@v2 | |
id: deps_cache | |
with: | |
path: | | |
~/.gradle/caches | |
~/.gradle/wrapper | |
~/.m2/repository | |
~/.ccache | |
~/.fisco | |
key: build-${{ matrix.os }}-${{ github.base_ref }}-${{ hashFiles('.github/workflows/workflow.yml') }} | |
restore-keys: | | |
build-${{ matrix.os }}-${{ github.base_ref }}-${{ hashFiles('.github/workflows/workflow.yml') }} | |
build-${{ matrix.os }}-${{ github.base_ref }}- | |
build-${{ matrix.os }}- | |
- name: install Ubuntu dependencies | |
if: runner.os == 'Linux' | |
run: | | |
sudo apt update && sudo apt install -y git curl libssl-dev build-essential ccache | |
- name: install macOS dependencies | |
if: runner.os == 'macOS' | |
run: | | |
brew install [email protected] ccache | |
- name: Set up JDK 1.8.0.382 | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'zulu' | |
java-version: '8.0.382' | |
- name: run build test | |
if: runner.os == 'Windows' | |
run: ./gradlew.bat build | |
- name: run integration testing | |
if: runner.os != 'Windows' | |
run: /bin/bash .ci/ci_check.sh | |
build-centos: | |
name: build-centos | |
runs-on: ${{ matrix.os }} | |
continue-on-error: true | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ ubuntu-20.04 ] | |
container: docker.io/centos:7 | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
fetch-depth: 5 | |
- uses: actions/cache@v2 | |
id: deps_cache | |
with: | |
path: | | |
~/.gradle/caches | |
~/.gradle/wrapper | |
~/.m2/repository | |
~/.ccache | |
~/.fisco | |
key: build-${{ matrix.os }}-${{ github.base_ref }}-${{ hashFiles('.github/workflows/workflow.yml') }} | |
restore-keys: | | |
build-${{ matrix.os }}-${{ github.base_ref }}-${{ hashFiles('.github/workflows/workflow.yml') }} | |
build-${{ matrix.os }}-${{ github.base_ref }}- | |
build-${{ matrix.os }}- | |
- name: Set up JDK 1.8.0.345 | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'zulu' | |
java-version: '8.0.345' | |
- name: install CentOS dependencies | |
run: | | |
sed -i s/mirror.centos.org/mirrors.aliyun.com/g /etc/yum.repos.d/*.repo | |
sed -i s/^#.*baseurl=http/baseurl=http/g /etc/yum.repos.d/*.repo | |
sed -i s/^mirrorlist=http/#mirrorlist=http/g /etc/yum.repos.d/*.repo | |
yum clean all | |
yum makecache | |
yum update -y | |
yum install -y epel-release centos-release-scl wget which git openssl-devel openssl tree | |
- name: Set up JDK 1.8.0.345 | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'zulu' | |
java-version: '8.0.345' | |
- name: run build test | |
run: /bin/bash gradlew build --info | |
- name: run integration testing | |
run: /bin/bash .ci/ci_check.sh && tree ./build/reports | |
- name: upload unittest coverage | |
run: curl -LO https://codecov.io/bash && /bin/bash ./bash | |
# uses: codecov/codecov-action@v3 | |
# with: | |
# token: ${{ secrets.CODECOV_TOKEN }} | |
# files: ./build/reports/jacoco/test/jacocoTestReport.xml | |
# flags: unittest | |
# fail_ci_if_error: true | |
# verbose: true |