You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dubbo.apache.org by li...@apache.org on 2024/11/21 03:01:33 UTC
(dubbo) branch 3.3 updated: [Bug]Fix github workflow (#14921)
This is an automated email from the ASF dual-hosted git repository.
liujun pushed a commit to branch 3.3
in repository https://gitbox.apache.org/repos/asf/dubbo.git
The following commit(s) were added to refs/heads/3.3 by this push:
new a0e39caf46 [Bug]Fix github workflow (#14921)
a0e39caf46 is described below
commit a0e39caf4611ae88941116cb5aa42cac69167eb9
Author: heliang666s <14...@users.noreply.github.com>
AuthorDate: Thu Nov 21 11:01:27 2024 +0800
[Bug]Fix github workflow (#14921)
---
.github/workflows/build-and-test-pr.yml | 31 +++++++++------
.github/workflows/build-and-test-scheduled-3.3.yml | 44 +++++++++++++---------
.github/workflows/release-test.yml | 43 +++++++++++++--------
3 files changed, 73 insertions(+), 45 deletions(-)
diff --git a/.github/workflows/build-and-test-pr.yml b/.github/workflows/build-and-test-pr.yml
index f2c8b0dea7..5455362ebe 100644
--- a/.github/workflows/build-and-test-pr.yml
+++ b/.github/workflows/build-and-test-pr.yml
@@ -584,7 +584,7 @@ jobs:
- uses: actions/checkout@v4
with:
path: "./dubbo"
- - name: "Setup GraalVM environment"
+ - name: "Set up GraalVM environment"
uses: graalvm/setup-graalvm@v1
with:
version: '22.3.0'
@@ -592,7 +592,7 @@ jobs:
components: 'native-image'
github-token: ${{ secrets.GITHUB_TOKEN }}
native-image-job-reports: 'true'
- - name: "Setup Zookeeper environment"
+ - name: "Set up Zookeeper environment"
run: |
wget https://dlcdn.apache.org/zookeeper/zookeeper-3.8.4/apache-zookeeper-3.8.4-bin.tar.gz
tar -zxvf apache-zookeeper-3.8.4-bin.tar.gz
@@ -604,7 +604,7 @@ jobs:
native-image --version
- name: "Set current date as env variable"
run: echo "TODAY=$(date +'%Y%m%d')" >> $GITHUB_ENV
- - name: "Restore local maven repository cache"
+ - name: "Restore local Maven repository cache"
uses: actions/cache/restore@v4
with:
path: ~/.m2/repository
@@ -616,14 +616,21 @@ jobs:
run: |
cd ${{ github.workspace }}/dubbo
./mvnw ${{ env.MAVEN_ARGS }} -T 2C clean install -P '!demo',skip-spotless -Dmaven.test.skip=true -Dcheckstyle.skip=true -Dcheckstyle_unix.skip=true -Drat.skip=true
- - name: "Compile and run Dubbo demo for native (Linux)"
+ - name: "Checkout dubbo-samples repository"
+ uses: actions/checkout@v4
+ with:
+ repository: 'apache/dubbo-samples'
+ ref: master
+ path: "./dubbo-samples"
+ - name: "Compile and run Dubbo native image demo"
run: |
- cd ${{ github.workspace }}/dubbo/dubbo-demo/dubbo-demo-native/dubbo-demo-native-interface
- MVNW="${{ github.workspace }}/dubbo/mvnw ${{ env.MAVEN_ARGS }} -T 2C -Dmaven.test.skip=true"
- $MVNW clean install
- cd ../dubbo-demo-native-provider
- $MVNW clean package -P native native:compile
- nohup ./target/dubbo-demo-native-provider &
- cd ../dubbo-demo-native-consumer
+ MVNW="${{ github.workspace }}/dubbo-samples/mvnw ${{ env.MAVEN_ARGS }} -Dmaven.test.skip=true"
+ cd ${{ github.workspace }}/dubbo-samples/2-advanced/dubbo-samples-native-image/dubbo-samples-native-image-provider
$MVNW clean package -P native native:compile
- ./target/dubbo-demo-native-consumer
+ nohup ./target/dubbo-samples-native-image-provider &
+ sleep 10
+ curl \
+ --header "Content-Type: application/json" \
+ --data '{"name":"Dubbo"}' \
+ http://localhost:50052/org.apache.dubbo.nativeimage.DemoService/sayHello/
+
diff --git a/.github/workflows/build-and-test-scheduled-3.3.yml b/.github/workflows/build-and-test-scheduled-3.3.yml
index 7bf6a993bb..32aed50071 100644
--- a/.github/workflows/build-and-test-scheduled-3.3.yml
+++ b/.github/workflows/build-and-test-scheduled-3.3.yml
@@ -463,10 +463,8 @@ jobs:
steps:
- uses: actions/checkout@v4
with:
- ref: "3.3"
path: "./dubbo"
-
- - name: "Setup GraalVM environment"
+ - name: "Set up GraalVM environment"
uses: graalvm/setup-graalvm@v1
with:
version: '22.3.0'
@@ -474,32 +472,44 @@ jobs:
components: 'native-image'
github-token: ${{ secrets.GITHUB_TOKEN }}
native-image-job-reports: 'true'
-
- - name: "Setup Zookeeper environment"
+ - name: "Set up Zookeeper environment"
run: |
wget https://dlcdn.apache.org/zookeeper/zookeeper-3.8.4/apache-zookeeper-3.8.4-bin.tar.gz
tar -zxvf apache-zookeeper-3.8.4-bin.tar.gz
mv apache-zookeeper-3.8.4-bin/conf/zoo_sample.cfg apache-zookeeper-3.8.4-bin/conf/zoo.cfg
apache-zookeeper-3.8.4-bin/bin/zkServer.sh start
-
- name: "Check environment"
run: |
java --version
native-image --version
-
+ - name: "Set current date as env variable"
+ run: echo "TODAY=$(date +'%Y%m%d')" >> $GITHUB_ENV
+ - name: "Restore local Maven repository cache"
+ uses: actions/cache/restore@v4
+ with:
+ path: ~/.m2/repository
+ key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}-${{ env.TODAY }}
+ restore-keys: |
+ ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
+ ${{ runner.os }}-maven-
- name: "Compile Dubbo (Linux)"
run: |
cd ${{ github.workspace }}/dubbo
./mvnw ${{ env.MAVEN_ARGS }} -T 2C clean install -P '!demo',skip-spotless -Dmaven.test.skip=true -Dcheckstyle.skip=true -Dcheckstyle_unix.skip=true -Drat.skip=true
-
- - name: "Compile and run Dubbo demo for native (Linux)"
+ - name: "Checkout dubbo-samples repository"
+ uses: actions/checkout@v4
+ with:
+ repository: 'apache/dubbo-samples'
+ ref: master
+ path: "./dubbo-samples"
+ - name: "Compile and run Dubbo native image demo"
run: |
- cd ${{ github.workspace }}/dubbo/dubbo-demo/dubbo-demo-native/dubbo-demo-native-interface
- MVNW="${{ github.workspace }}/dubbo/mvnw ${{ env.MAVEN_ARGS }} -T 2C -Dmaven.test.skip=true"
- $MVNW clean install
- cd ../dubbo-demo-native-provider
- $MVNW clean package -P native native:compile
- nohup ./target/dubbo-demo-native-provider &
- cd ../dubbo-demo-native-consumer
+ MVNW="${{ github.workspace }}/dubbo-samples/mvnw ${{ env.MAVEN_ARGS }} -Dmaven.test.skip=true"
+ cd ${{ github.workspace }}/dubbo-samples/2-advanced/dubbo-samples-native-image/dubbo-samples-native-image-provider
$MVNW clean package -P native native:compile
- ./target/dubbo-demo-native-consumer
+ nohup ./target/dubbo-samples-native-image-provider &
+ sleep 10
+ curl \
+ --header "Content-Type: application/json" \
+ --data '{"name":"Dubbo"}' \
+ http://localhost:50052/org.apache.dubbo.nativeimage.DemoService/sayHello/
diff --git a/.github/workflows/release-test.yml b/.github/workflows/release-test.yml
index 17c4b46b98..0b8f55e529 100644
--- a/.github/workflows/release-test.yml
+++ b/.github/workflows/release-test.yml
@@ -460,8 +460,7 @@ jobs:
- uses: actions/checkout@v4
with:
path: "./dubbo"
-
- - name: "Setup GraalVM environment"
+ - name: "Set up GraalVM environment"
uses: graalvm/setup-graalvm@v1
with:
version: '22.3.0'
@@ -469,32 +468,44 @@ jobs:
components: 'native-image'
github-token: ${{ secrets.GITHUB_TOKEN }}
native-image-job-reports: 'true'
-
- - name: "Setup Zookeeper environment"
+ - name: "Set up Zookeeper environment"
run: |
wget https://dlcdn.apache.org/zookeeper/zookeeper-3.8.4/apache-zookeeper-3.8.4-bin.tar.gz
tar -zxvf apache-zookeeper-3.8.4-bin.tar.gz
mv apache-zookeeper-3.8.4-bin/conf/zoo_sample.cfg apache-zookeeper-3.8.4-bin/conf/zoo.cfg
apache-zookeeper-3.8.4-bin/bin/zkServer.sh start
-
- name: "Check environment"
run: |
java --version
native-image --version
-
+ - name: "Set current date as env variable"
+ run: echo "TODAY=$(date +'%Y%m%d')" >> $GITHUB_ENV
+ - name: "Restore local Maven repository cache"
+ uses: actions/cache/restore@v4
+ with:
+ path: ~/.m2/repository
+ key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}-${{ env.TODAY }}
+ restore-keys: |
+ ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
+ ${{ runner.os }}-maven-
- name: "Compile Dubbo (Linux)"
run: |
cd ${{ github.workspace }}/dubbo
./mvnw ${{ env.MAVEN_ARGS }} -T 2C clean install -P '!demo',skip-spotless -Dmaven.test.skip=true -Dcheckstyle.skip=true -Dcheckstyle_unix.skip=true -Drat.skip=true
-
- - name: "Compile and run Dubbo demo for native (Linux)"
+ - name: "Checkout dubbo-samples repository"
+ uses: actions/checkout@v4
+ with:
+ repository: 'apache/dubbo-samples'
+ ref: master
+ path: "./dubbo-samples"
+ - name: "Compile and run Dubbo native image demo"
run: |
- cd ${{ github.workspace }}/dubbo/dubbo-demo/dubbo-demo-native/dubbo-demo-native-interface
- MVNW="${{ github.workspace }}/dubbo/mvnw ${{ env.MAVEN_ARGS }} -T 2C -Dmaven.test.skip=true"
- $MVNW clean install
- cd ../dubbo-demo-native-provider
- $MVNW clean package -P native native:compile
- nohup ./target/dubbo-demo-native-provider &
- cd ../dubbo-demo-native-consumer
+ MVNW="${{ github.workspace }}/dubbo-samples/mvnw ${{ env.MAVEN_ARGS }} -Dmaven.test.skip=true"
+ cd ${{ github.workspace }}/dubbo-samples/2-advanced/dubbo-samples-native-image/dubbo-samples-native-image-provider
$MVNW clean package -P native native:compile
- ./target/dubbo-demo-native-consumer
+ nohup ./target/dubbo-samples-native-image-provider &
+ sleep 10
+ curl \
+ --header "Content-Type: application/json" \
+ --data '{"name":"Dubbo"}' \
+ http://localhost:50052/org.apache.dubbo.nativeimage.DemoService/sayHello/