Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

optimize: fix node-gyp build error on arm64 and macos #6745

Merged
merged 3 commits into from
Aug 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 11 additions & 7 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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/[email protected]
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/[email protected]
Expand Down Expand Up @@ -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 \
Expand Down
34 changes: 28 additions & 6 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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/[email protected]
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.
Expand Down Expand Up @@ -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/[email protected]
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.
Expand Down Expand Up @@ -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 }} \
Expand Down
1 change: 1 addition & 0 deletions changes/en-us/2.x.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
1 change: 1 addition & 0 deletions changes/zh-cn/2.x.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
Loading