diff --git a/.github/workflows/ci-build-multi-os.yaml b/.github/workflows/ci-build-multi-os.yaml new file mode 100644 index 0000000000000..2e863e12a90a0 --- /dev/null +++ b/.github/workflows/ci-build-multi-os.yaml @@ -0,0 +1,76 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# + +name: CI - Build - Multiple - OS +on: + pull_request: + branches: + - master + push: + branches: + - branch-* + +env: + MAVEN_OPTS: -Dmaven.wagon.httpconnectionManager.ttlSeconds=25 -Dmaven.wagon.http.retryHandler.count=3 + +jobs: + + build: + name: + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-latest, macos-latest] + timeout-minutes: 120 + + steps: + - name: Cancel Previous Runs + uses: styfle/cancel-workflow-action@0.6.0 + with: + access_token: ${{ github.token }} + + - name: checkout + uses: actions/checkout@v2 + with: + fetch-depth: 25 + ref: ${{ github.event.pull_request.head.sha }} + + - name: Check if this pull request only changes documentation + id: docs + uses: apache/pulsar-test-infra/diff-only@master + with: + args: site2 deployment .asf.yaml .ci ct.yaml + + - name: Cache local Maven repository + if: steps.docs.outputs.changed_only == 'no' + uses: actions/cache@v2 + with: + path: ~/.m2/repository + key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} + restore-keys: | + ${{ runner.os }}-maven- + - name: Set up JDK 1.8 + uses: actions/setup-java@v1 + if: steps.docs.outputs.changed_only == 'no' + with: + java-version: 1.8 + + - name: build package + if: steps.docs.outputs.changed_only == 'no' + run: mvn clean install -DskipTests \ No newline at end of file diff --git a/src/rename-netty-native-libs.sh b/src/rename-netty-native-libs.sh index 5a5a56940417c..99da5b0654266 100755 --- a/src/rename-netty-native-libs.sh +++ b/src/rename-netty-native-libs.sh @@ -32,7 +32,14 @@ FILES_TO_RENAME=( echo "----- Renaming epoll lib in $JAR_PATH ------" TMP_DIR=`mktemp -d` -unzip -q $JAR_PATH -d $TMP_DIR +CUR_DIR=$(pwd) +cd ${TMP_DIR} +# exclude `META-INF/LICENSE` +unzip -q $JAR_PATH -x "META-INF/LICENSE" +# include `META-INF/LICENSE` as LICENSE.netty. +# This approach is to get around the issue that MacOS is not able to recognize the difference between `META-INF/LICENSE` and `META-INF/license/`. +unzip -p $JAR_PATH META-INF/LICENSE > META-INF/LICENSE.netty +cd ${CUR_DIR} pushd $TMP_DIR