Skip to content

Commit

Permalink
Merge branch 'develop' into validate_stale_conn
Browse files Browse the repository at this point in the history
  • Loading branch information
ryan-tu authored Dec 1, 2021
2 parents 9afa1c4 + 8a4aee2 commit a265d08
Show file tree
Hide file tree
Showing 384 changed files with 57,249 additions and 2,984 deletions.
12 changes: 2 additions & 10 deletions .github/workflows/analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,15 +53,6 @@ jobs:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2
- name: Check style and spell
uses: zhicwu/checkstyle-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
reporter: 'github-pr-check'
# added,diff_context,file,nofilter
filter_mode: 'added'
if: github.event_name == 'pull_request_target' || github.event.inputs.pr != ''
continue-on-error: true
- name: Update sonar config
run: |
sed -i -e 's|^\(.*<sonar.projectKey>\).*\(</sonar.projectKey>\)$|\1ClickHouse_clickhouse-jdbc\2|' \
Expand All @@ -73,5 +64,6 @@ jobs:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
run: |
find . -type f -name "log4j.*" -exec rm -fv '{}' \;
mvn -q --batch-mode -Panalysis verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar
mvn -q --batch-mode --global-toolchains .github/toolchains.xml -Drelease \
-Panalysis verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar
continue-on-error: true
8 changes: 4 additions & 4 deletions .github/workflows/benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@ jobs:
run: |
mvn --batch-mode --update-snapshots -q -DskipTests install
cd clickhouse-benchmark
mvn --batch-mode --update-snapshots install
java -DclickhouseVersion="21.8" -jar target/benchmarks.jar -rf text -p client=clickhouse-jdbc Basic
java -DclickhouseVersion="21.8" -jar target/benchmarks.jar -rf text \
-p client=clickhouse-http-jdbc -p client=clickhouse-grpc-jdbc -p type=default Basic
echo "BENCHMARK_REPORT<<EOF" >> $GITHUB_ENV
cat jmh-result.text >> $GITHUB_ENV
echo "EOF" >> $GITHUB_ENV
Expand Down Expand Up @@ -97,9 +97,9 @@ jobs:
continue-on-error: true
- name: Update version and group id
run: |
find . -type f -name "pom.xml" -exec sed -i -e 's|${revision}|${{ github.event.inputs.version }}|g' \
find . -type f -name "pom.xml" -exec sed -i -e 's|${revision}|${{ github.event.inputs.driver }}|g' \
-e 's|^\( <version>\).*\(</version>\)$|\1${{ github.event.inputs.driver }}\2|' \
-e 's|${parent.groupId}|com.clickhouse|g' '{}' \;
-e 's|${parent.groupId}|com.clickhouse|g' -e 's|${project.parent.groupId}|com.clickhouse|g' '{}' \;
find . -type f -name "log4j.*" -exec rm -fv '{}' \;
continue-on-error: true
- name: Install driver as needed
Expand Down
35 changes: 29 additions & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,10 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
java: [8, 11, 17]
# most recent LTS releases as well as latest stable builds
clickhouse: ["21.3", "21.8", "latest"]
fail-fast: false
name: Build using JDK ${{ matrix.java }} against ClickHouse ${{ matrix.clickhouse }}
name: Build against ClickHouse ${{ matrix.clickhouse }}
steps:
- name: Check out Git repository
uses: actions/checkout@v2
Expand All @@ -45,10 +44,34 @@ jobs:
git fetch --no-tags --prune --progress --no-recurse-submodules --depth=1 \
origin pull/${{ github.event.inputs.pr }}/merge:merged-pr && git checkout merged-pr
if: github.event.inputs.pr != ''
- name: Set up JDK ${{ matrix.java }}
uses: actions/setup-java@v1
- name: Install JDK 11
uses: AdoptOpenJDK/install-jdk@v1
with:
java-version: ${{ matrix.java }}
version: '11'
targets: 'JDK11_HOME'
- name: Setup Toolchain
shell: bash
run: |
mkdir -p $HOME/.m2 \
&& cat << EOF > $HOME/.m2/toolchains.xml
<?xml version="1.0" encoding="UTF8"?>
<toolchains>
<toolchain>
<type>jdk</type>
<provides>
<version>11</version>
</provides>
<configuration>
<jdkHome>${{ env.JDK11_HOME }}</jdkHome>
</configuration>
</toolchain>
</toolchains>
EOF
- name: Install JDK 8 and Maven
uses: actions/setup-java@v2
with:
distribution: 'temurin'
java-version: 8
# Step that does that actual cache save and restore
- name: Cache maven dependencies
uses: actions/cache@v2
Expand All @@ -57,6 +80,6 @@ jobs:
key: ${{ runner.os }}-build-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-build-
- name: Build with Maven
- name: Build
run: |
mvn --batch-mode --update-snapshots -Drelease -DclickhouseVersion=${{ matrix.clickhouse }} verify
32 changes: 28 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,39 @@ jobs:
steps:
- name: Check out Git repository
uses: actions/checkout@v2
- name: Install Java and Maven
uses: actions/setup-java@v1
- name: Install JDK 11
uses: AdoptOpenJDK/install-jdk@v1
with:
version: '11'
targets: 'JDK11_HOME'
- name: Setup Toolchain
shell: bash
run: |
mkdir -p $HOME/.m2 \
&& cat << EOF > $HOME/.m2/toolchains.xml
<?xml version="1.0" encoding="UTF8"?>
<toolchains>
<toolchain>
<type>jdk</type>
<provides>
<version>11</version>
</provides>
<configuration>
<jdkHome>${{ env.JDK11_HOME }}</jdkHome>
</configuration>
</toolchain>
</toolchains>
EOF
- name: Install JDK 8 and Maven
uses: actions/setup-java@v2
with:
distribution: 'temurin'
java-version: 8
- name: Update pom files and reduce logs
- name: Update Configuration
run: |
find . -type f -name "pom.xml" -exec sed -i -e 's|${revision}|${{ github.event.inputs.version }}|g' \
-e 's|^\( <version>\).*\(</version>\)$|\1${{ github.event.inputs.version }}\2|' \
-e 's|${parent.groupId}|com.clickhouse|g' '{}' \;
-e 's|${parent.groupId}|com.clickhouse|g' -e 's|${project.parent.groupId}|com.clickhouse|g' '{}' \;
find . -type f -name "log4j.*" -exec rm -fv '{}' \;
- name: Release Maven package
uses: samuelmeuli/action-maven-publish@v1
Expand Down
7 changes: 3 additions & 4 deletions .github/workflows/third_party_libs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,19 +19,18 @@ jobs:
- name: Install Java and Maven
uses: actions/setup-java@v1
with:
java-version: 9
java-version: 11
- name: Update pom files and reduce logs
run: |
find . -type f -name "pom.xml" -exec sed -i -e 's|${revision}|${{ github.event.inputs.version }}|g' \
-e 's|^\( <version>\).*\(</version>\)$|\1${{ github.event.inputs.version }}\2|' \
-e 's|${parent.groupId}|com.clickhouse|g' '{}' \;
-e 's|${parent.groupId}|com.clickhouse|g' -e 's|${project.parent.groupId}|com.clickhouse|g' '{}' \;
find . -type f -name "log4j.*" -exec rm -fv '{}' \;
- name: Release Maven package
uses: samuelmeuli/action-maven-publish@v1
with:
directory: third-party-libraries
directory: ./third-party-libraries/
maven_profiles: release
maven_args: -q --batch-mode
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
gpg_passphrase: ${{ secrets.GPG_PASSPHRASE }}
nexus_username: ${{ secrets.SONATYPE_USER }}
Expand Down
15 changes: 11 additions & 4 deletions .github/workflows/timezone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,20 +43,27 @@ jobs:
git fetch --no-tags --prune --progress --no-recurse-submodules --depth=1 \
origin pull/${{ github.event.inputs.pr }}/merge:merged-pr && git checkout merged-pr
if: github.event.inputs.pr != ''
- name: Set up JDK 11
- name: Set up JDK 8
uses: actions/setup-java@v1
with:
java-version: 11
java-version: 8
- name: Cache maven dependencies
uses: actions/cache@v2
with:
path: ~/.m2/repository
key: ${{ runner.os }}-build-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-build-
- name: Test using Maven
- name: Install dependencies
run: |
mvn --batch-mode --update-snapshots \
--projects clickhouse-client -DskipTests \
--also-make install
- name: Test JDBC driver
run: |
mvn --batch-mode --update-snapshots \
--projects clickhouse-jdbc \
-DclickhouseTimezone=${{ matrix.serverTz }} \
-DclickhouseVersion=21.8 \
-Duser.timezone=${{ matrix.clientTz }} verify
-Duser.timezone=${{ matrix.clientTz }} \
--also-make clean verify
3 changes: 1 addition & 2 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
Copyright 2016-2021 Yandex LLC

Apache License
Version 2.0, January 2004
Expand Down Expand Up @@ -188,7 +187,7 @@ Copyright 2016-2021 Yandex LLC
same "printed page" as the copyright notice for easier
identification within third-party archives.

Copyright 2016-2021 Yandex LLC
Copyright [yyyy] [name of copyright owner]

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
Loading

0 comments on commit a265d08

Please sign in to comment.