From a1f6a76611268e32e19cb60c476daf8874d50a65 Mon Sep 17 00:00:00 2001 From: Remi Dettai Date: Wed, 2 Nov 2022 16:14:29 +0000 Subject: [PATCH 1/2] ci(trino): first attempt for build --- .github/workflows/trino.yaml | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 .github/workflows/trino.yaml diff --git a/.github/workflows/trino.yaml b/.github/workflows/trino.yaml new file mode 100644 index 0000000..6f342c1 --- /dev/null +++ b/.github/workflows/trino.yaml @@ -0,0 +1,31 @@ +name: Trino +on: + workflow_dispatch: + inputs: + trino-version: + required: true + description: The Trino version (e.g. 378), should be compatible with the patch + + +jobs: + build: + name: Trino Build + runs-on: ubuntu-20.04 + steps: + - uses: actions/setup-java@v3 + with: + distribution: 'zulu' + java-version: 17 + cache: 'maven' + - name: Clone + run: git clone --depth 1 --branch ${{ github.event.inputs.trino-version }} https://github.com/trinodb/trino.git + - name: Patch + run: | + sed -i 's@verifyJvmRequirements();@// verifyJvmRequirements();@' core/trino-main/src/main/java/io/trino/server/Server.java + sed -i 's@import static io.trino.server.TrinoSystemRequirements.verifyJvmRequirements;@@' core/trino-main/src/main/java/io/trino/server/Server.java + - name: Build + run: ./mvnw clean install -DskipTests + - uses: actions/upload-artifact@v3 + with: + name: trino-server-${{ github.event.inputs.trino-version }} + path: core/trino-server/target/trino-server-${{ github.event.inputs.trino-version }}.tar.gz From d275985a3e55ff0897139d42db7ea427a91a63ca Mon Sep 17 00:00:00 2001 From: Remi Dettai Date: Thu, 3 Nov 2022 07:51:46 +0000 Subject: [PATCH 2/2] ci(trino): avoid checkstyle error with line delete --- .github/workflows/trino.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/trino.yaml b/.github/workflows/trino.yaml index 6f342c1..057c2d2 100644 --- a/.github/workflows/trino.yaml +++ b/.github/workflows/trino.yaml @@ -1,5 +1,5 @@ name: Trino -on: +on: workflow_dispatch: inputs: trino-version: @@ -21,10 +21,10 @@ jobs: run: git clone --depth 1 --branch ${{ github.event.inputs.trino-version }} https://github.com/trinodb/trino.git - name: Patch run: | - sed -i 's@verifyJvmRequirements();@// verifyJvmRequirements();@' core/trino-main/src/main/java/io/trino/server/Server.java - sed -i 's@import static io.trino.server.TrinoSystemRequirements.verifyJvmRequirements;@@' core/trino-main/src/main/java/io/trino/server/Server.java + sed -i '/verifyJvmRequirements()/d' core/trino-main/src/main/java/io/trino/server/Server.java + sed -i '/import static io.trino.server.TrinoSystemRequirements.verifyJvmRequirements;/d' core/trino-main/src/main/java/io/trino/server/Server.java - name: Build - run: ./mvnw clean install -DskipTests + run: ./mvnw -pl core/trino-server clean install -DskipTests - uses: actions/upload-artifact@v3 with: name: trino-server-${{ github.event.inputs.trino-version }}