This repository has been archived by the owner on May 2, 2024. It is now read-only.
forked from prestodb/presto
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add GitHub Actions workflow to build repro-cassandra jar
- Loading branch information
Showing
1 changed file
with
54 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
name: Build presto-cassandra | ||
|
||
on: | ||
push: | ||
branches: | ||
- 'repro-*' | ||
|
||
env: | ||
# An envar that signals to tests we are executing in the CI environment | ||
CONTINUOUS_INTEGRATION: true | ||
MAVEN_OPTS: "-Xmx1024M -XX:+ExitOnOutOfMemoryError" | ||
MAVEN_INSTALL_OPTS: "-Xmx2G -XX:+ExitOnOutOfMemoryError" | ||
MAVEN_FAST_INSTALL: "-B -V --quiet -T C1 -DskipTests -Dair.check.skip-all -Dmaven.javadoc.skip=true" | ||
MAVEN_TEST: "-B -Dair.check.skip-all -Dmaven.javadoc.skip=true -DLogTestDurationListener.enabled=true --fail-at-end" | ||
RETRY: .github/bin/retry | ||
|
||
jobs: | ||
presto-cassandra: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
id-token: write | ||
contents: read | ||
steps: | ||
- uses: aws-actions/configure-aws-credentials@v4 | ||
with: | ||
aws-region: ap-northeast-1 | ||
role-to-assume: ${{ vars.ROLE_TO_ASSUME }} | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-java@v3 | ||
with: | ||
distribution: corretto | ||
java-version: 8 | ||
- name: Cache local Maven repository | ||
id: cache-maven | ||
uses: actions/cache@v2 | ||
with: | ||
path: ~/.m2/repository | ||
key: ${{ runner.os }}-maven-2-${{ hashFiles('**/pom.xml') }} | ||
restore-keys: | | ||
${{ runner.os }}-maven-2- | ||
- name: Populate maven cache | ||
if: steps.cache-maven.outputs.cache-hit != 'true' | ||
run: ./mvnw de.qaware.maven:go-offline-maven-plugin:resolve-dependencies | ||
- name: Maven Install | ||
run: | | ||
export MAVEN_OPTS="${MAVEN_INSTALL_OPTS}" | ||
./mvnw install ${MAVEN_FAST_INSTALL} -am -pl :presto-cassandra | ||
- name: Upload presto-cassandra.jar to S3 | ||
run: | | ||
presto_cassandra_jar=presto-cassandra-$(yq .project.version pom.xml).jar | ||
aws s3api put-object \ | ||
--bucket ${{ vars.DEPLOY_S3_BUCKET }} \ | ||
--key "${{ vars.DEPLOY_S3_KEY_PREFIX }}/${{ github.ref_name }}/${{ github.run_number }}/${presto_cassandra_jar}" \ | ||
--body "./presto-cassandra/target/${presto_cassandra_jar}" |