Skip to content

Commit

Permalink
Update build script
Browse files Browse the repository at this point in the history
  • Loading branch information
zhicwu committed May 22, 2022
1 parent 5420317 commit afc63d9
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 18 deletions.
17 changes: 7 additions & 10 deletions .github/workflows/build.yml
Expand Up @@ -27,6 +27,10 @@ on:
description: "Pull request#"
required: false

concurrency:
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.event.number || github.sha }}
cancel-in-progress: true

jobs:
build:
runs-on: ubuntu-latest
Expand All @@ -42,7 +46,7 @@ jobs:
- clickhouse: "21.8"
protocol: grpc
fail-fast: false
timeout-minutes: 45
timeout-minutes: 30
name: Build against ClickHouse ${{ matrix.clickhouse }} (${{ matrix.protocol }})
steps:
- name: Check out Git repository
Expand Down Expand Up @@ -76,18 +80,11 @@ jobs:
</toolchains>
EOF
- name: Install JDK 8 and Maven
uses: actions/setup-java@v2
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: 8
# Step that does that actual cache save and restore
- name: Cache maven dependencies
uses: actions/cache@v2
with:
path: ~/.m2/repository
key: ${{ runner.os }}-build-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-build-
cache: 'maven'
- name: Build
run: |
mvn --batch-mode --update-snapshots -Drelease -DclickhouseVersion=${{ matrix.clickhouse }} -Dprotocol=${{ matrix.protocol }} verify
Expand Down
15 changes: 7 additions & 8 deletions .github/workflows/timezone.yml
Expand Up @@ -26,6 +26,10 @@ on:
description: "Pull request#"
required: false

concurrency:
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.event.number || github.sha }}
cancel-in-progress: true

jobs:
timezone:
runs-on: ubuntu-latest
Expand All @@ -45,16 +49,11 @@ jobs:
origin pull/${{ github.event.inputs.pr }}/merge:merged-pr && git checkout merged-pr
if: github.event.inputs.pr != ''
- name: Set up JDK 8
uses: actions/setup-java@v1
uses: actions/setup-java@v3
with:
distribution: 'temurin'
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-
cache: 'maven'
- name: Install dependencies
run: |
mvn --batch-mode --update-snapshots \
Expand Down

0 comments on commit afc63d9

Please sign in to comment.