This is an automated email from the ASF dual-hosted git repository. jianbin pushed a commit to branch 2.x in repository https://gitbox.apache.org/repos/asf/incubator-seata.git
The following commit(s) were added to refs/heads/2.x by this push: new 1483250bca optimize: fix node-gyp build error on arm64 and macos (#6745) 1483250bca is described below commit 1483250bca8b0d9b461c0a050aa54b9c648c28a9 Author: jimin <sliev...@163.com> AuthorDate: Tue Aug 13 10:09:09 2024 +0800 optimize: fix node-gyp build error on arm64 and macos (#6745) --- .github/workflows/build.yml | 18 +++++++++++------- .github/workflows/test.yml | 34 ++++++++++++++++++++++++++++------ changes/en-us/2.x.md | 1 + changes/zh-cn/2.x.md | 1 + 4 files changed, 41 insertions(+), 13 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e6c8b76174..19ae283868 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -26,28 +26,33 @@ jobs: - name: "Checkout" uses: actions/checkout@v3 # step 2 + - name: "Use Python 3.x" + uses: actions/setup-python@v2 + with: + python-version: '3.12' + # step 3 - name: "Set up Java JDK" uses: actions/setup-java@v3.12.0 with: distribution: 'zulu' java-version: ${{ matrix.java }} - # step 3 + # step 4 - name: "Print maven version" run: ./mvnw -version - # step 4.1 + # step 5.1 - name: "Test, Check style, Check PMD, Check license with Maven and Java8" if: matrix.java == '8' run: | ./mvnw -T 4C clean test \ -Dcheckstyle.skip=false -Dpmd.skip=false -Dlicense.skip=false -DredisCaseEnabled=true \ -e -B -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn; - # step 4.2 + # step 5.2 - name: "Test with Maven and Java${{ matrix.java }}" if: matrix.java != '8' run: | ./mvnw -T 4C clean test \ -e -B -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn; - # step 5 + # step 6 - name: "Codecov" if: matrix.java == '8' uses: codecov/codecov-action@v4.0.1 @@ -77,10 +82,9 @@ jobs: docker run --rm -v ${{ github.workspace }}:/ws:rw --workdir=/ws \ arm64v8/ubuntu:20.04 \ bash -exc 'apt-get update -y && \ - apt-get install python2 -y && \ - python2 --version && \ - apt-get install make gcc g++ -y && \ apt-get install maven -y && \ + apt-get install -y python3 python3-pip python3-distutils && \ + apt-get install -y build-essential && \ mvn -version && \ mvn clean install \ -Prelease-seata \ diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 98813bf270..b07abb5306 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -32,22 +32,32 @@ jobs: - name: "Checkout" uses: actions/checkout@v3 # step 2 + - name: "Use Python 3.x" + uses: actions/setup-python@v2 + with: + python-version: '3.12' + # step 3 - name: "Set up Java JDK" uses: actions/setup-java@v3.12.0 with: distribution: 'zulu' java-version: ${{ matrix.java }} - # step 3 - ## step 3.1: for Ubuntu and MacOS + # step 4 + ## step 4.1: for Ubuntu and MacOS - name: "Test with Maven on '${{ matrix.os }}' OS" if: matrix.os != 'windows' run: | if [ "${{ matrix.os }}" == "macos" ]; then + python3 -m ensurepip --upgrade; + python3 -m pip install --upgrade pip setuptools; + if ! python3 -c "import distutils" &>/dev/null; then + python3 -m pip install --upgrade setuptools + fi ./mvnw -T 4C clean test -P args-for-client-test -P arrch64 -Dspring-boot.version=${{ matrix.springboot }} -e -B -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn; else ./mvnw -T 4C clean test -P args-for-client-test -Dspring-boot.version=${{ matrix.springboot }} -e -B -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn; fi - ## step 3.2: for Windows + ## step 4.2: for Windows - name: "Build with Maven on 'windows' OS (Skip tests)" if: matrix.os == 'windows' run: | # Skip tests, because too many errors in unit-test. @@ -77,22 +87,32 @@ jobs: - name: "Checkout" uses: actions/checkout@v3 # step 2 + - name: "Use Python 3.x" + uses: actions/setup-python@v2 + with: + python-version: '3.12' + # step 3 - name: "Set up Java JDK" uses: actions/setup-java@v3.12.0 with: distribution: 'zulu' java-version: ${{ matrix.java }} - # step 3 - ## step 3.1: for Ubuntu and MacOS + # step 4 + ## step 4.1: for Ubuntu and MacOS - name: "Test with Maven on '${{ matrix.os }}' OS" if: matrix.os != 'windows' run: | if [ "${{ matrix.os }}" == "macos" ]; then + python3 -m ensurepip --upgrade; + python3 -m pip install --upgrade pip setuptools; + if ! python3 -c "import distutils" &>/dev/null; then + python3 -m pip install --upgrade setuptools + fi ./mvnw -T 4C clean test -P args-for-client-test -P arrch64 -Dspring-boot.version=${{ matrix.springboot }} -e -B -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn; else ./mvnw -T 4C clean test -P args-for-client-test -Dspring-boot.version=${{ matrix.springboot }} -e -B -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn; fi - ## step 3.2: for Windows + ## step 4.2: for Windows - name: "Build with Maven on 'windows' OS (Skip tests)" if: matrix.os == 'windows' run: | # Skip tests, because too many errors in unit-test. @@ -131,6 +151,8 @@ jobs: arm64v8/ubuntu:20.04 \ bash -exc 'apt-get update -y && \ apt-get install maven -y && \ + apt-get install -y python3 python3-pip python3-distutils && \ + apt-get install -y build-essential && \ mvn -version && \ mvn -T 4C clean install \ -Dspring-boot.version=${{ matrix.springboot }} \ diff --git a/changes/en-us/2.x.md b/changes/en-us/2.x.md index ec63bdbb8d..9ccfbcb904 100644 --- a/changes/en-us/2.x.md +++ b/changes/en-us/2.x.md @@ -49,6 +49,7 @@ Add changes here for all PR submitted to the 2.x branch. - [[#6741](https://github.com/apache/incubator-seata/pull/6741)] upgrade tomcat-embed-core to 9.0.90 - [[#6742](https://github.com/apache/incubator-seata/pull/6742)] upgrade npmjs version in console - [[#6743](https://github.com/apache/incubator-seata/pull/6743)] upgrade npmjs version in saga +- [[#6745](https://github.com/apache/incubator-seata/pull/6745)] fix node-gyp build error on arm64 and macos ### refactor: diff --git a/changes/zh-cn/2.x.md b/changes/zh-cn/2.x.md index b3b64767bd..1965a9a951 100644 --- a/changes/zh-cn/2.x.md +++ b/changes/zh-cn/2.x.md @@ -50,6 +50,7 @@ - [[#6742](https://github.com/apache/incubator-seata/pull/6742)] 升级 console 模块 npmjs 版本 - [[#6732](https://github.com/apache/incubator-seata/pull/6732)] 为application.example.yml与application.raft.example.yml添加默认安全配置 - [[#6743](https://github.com/apache/incubator-seata/pull/6743)] 升级saga模块npmjs版本 +- [[#6745](https://github.com/apache/incubator-seata/pull/6745)] 修复 node-gyp 在 arm64 和 macos 构建失败问题 ### refactor: --------------------------------------------------------------------- To unsubscribe, e-mail: notifications-unsubscr...@seata.apache.org For additional commands, e-mail: notifications-h...@seata.apache.org