Skip to content

Commit a0e39ca

Browse files
authored
[Bug]Fix github workflow (#14921)
1 parent acf6e8d commit a0e39ca

File tree

3 files changed

+73
-45
lines changed

3 files changed

+73
-45
lines changed

.github/workflows/build-and-test-pr.yml

Lines changed: 19 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -584,15 +584,15 @@ jobs:
584584
- uses: actions/checkout@v4
585585
with:
586586
path: "./dubbo"
587-
- name: "Setup GraalVM environment"
587+
- name: "Set up GraalVM environment"
588588
uses: graalvm/setup-graalvm@v1
589589
with:
590590
version: '22.3.0'
591591
java-version: '17'
592592
components: 'native-image'
593593
github-token: ${{ secrets.GITHUB_TOKEN }}
594594
native-image-job-reports: 'true'
595-
- name: "Setup Zookeeper environment"
595+
- name: "Set up Zookeeper environment"
596596
run: |
597597
wget https://dlcdn.apache.org/zookeeper/zookeeper-3.8.4/apache-zookeeper-3.8.4-bin.tar.gz
598598
tar -zxvf apache-zookeeper-3.8.4-bin.tar.gz
@@ -604,7 +604,7 @@ jobs:
604604
native-image --version
605605
- name: "Set current date as env variable"
606606
run: echo "TODAY=$(date +'%Y%m%d')" >> $GITHUB_ENV
607-
- name: "Restore local maven repository cache"
607+
- name: "Restore local Maven repository cache"
608608
uses: actions/cache/restore@v4
609609
with:
610610
path: ~/.m2/repository
@@ -616,14 +616,21 @@ jobs:
616616
run: |
617617
cd ${{ github.workspace }}/dubbo
618618
./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
619-
- name: "Compile and run Dubbo demo for native (Linux)"
619+
- name: "Checkout dubbo-samples repository"
620+
uses: actions/checkout@v4
621+
with:
622+
repository: 'apache/dubbo-samples'
623+
ref: master
624+
path: "./dubbo-samples"
625+
- name: "Compile and run Dubbo native image demo"
620626
run: |
621-
cd ${{ github.workspace }}/dubbo/dubbo-demo/dubbo-demo-native/dubbo-demo-native-interface
622-
MVNW="${{ github.workspace }}/dubbo/mvnw ${{ env.MAVEN_ARGS }} -T 2C -Dmaven.test.skip=true"
623-
$MVNW clean install
624-
cd ../dubbo-demo-native-provider
625-
$MVNW clean package -P native native:compile
626-
nohup ./target/dubbo-demo-native-provider &
627-
cd ../dubbo-demo-native-consumer
627+
MVNW="${{ github.workspace }}/dubbo-samples/mvnw ${{ env.MAVEN_ARGS }} -Dmaven.test.skip=true"
628+
cd ${{ github.workspace }}/dubbo-samples/2-advanced/dubbo-samples-native-image/dubbo-samples-native-image-provider
628629
$MVNW clean package -P native native:compile
629-
./target/dubbo-demo-native-consumer
630+
nohup ./target/dubbo-samples-native-image-provider &
631+
sleep 10
632+
curl \
633+
--header "Content-Type: application/json" \
634+
--data '{"name":"Dubbo"}' \
635+
http://localhost:50052/org.apache.dubbo.nativeimage.DemoService/sayHello/
636+

.github/workflows/build-and-test-scheduled-3.3.yml

Lines changed: 27 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -463,43 +463,53 @@ jobs:
463463
steps:
464464
- uses: actions/checkout@v4
465465
with:
466-
ref: "3.3"
467466
path: "./dubbo"
468-
469-
- name: "Setup GraalVM environment"
467+
- name: "Set up GraalVM environment"
470468
uses: graalvm/setup-graalvm@v1
471469
with:
472470
version: '22.3.0'
473471
java-version: '17'
474472
components: 'native-image'
475473
github-token: ${{ secrets.GITHUB_TOKEN }}
476474
native-image-job-reports: 'true'
477-
478-
- name: "Setup Zookeeper environment"
475+
- name: "Set up Zookeeper environment"
479476
run: |
480477
wget https://dlcdn.apache.org/zookeeper/zookeeper-3.8.4/apache-zookeeper-3.8.4-bin.tar.gz
481478
tar -zxvf apache-zookeeper-3.8.4-bin.tar.gz
482479
mv apache-zookeeper-3.8.4-bin/conf/zoo_sample.cfg apache-zookeeper-3.8.4-bin/conf/zoo.cfg
483480
apache-zookeeper-3.8.4-bin/bin/zkServer.sh start
484-
485481
- name: "Check environment"
486482
run: |
487483
java --version
488484
native-image --version
489-
485+
- name: "Set current date as env variable"
486+
run: echo "TODAY=$(date +'%Y%m%d')" >> $GITHUB_ENV
487+
- name: "Restore local Maven repository cache"
488+
uses: actions/cache/restore@v4
489+
with:
490+
path: ~/.m2/repository
491+
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}-${{ env.TODAY }}
492+
restore-keys: |
493+
${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
494+
${{ runner.os }}-maven-
490495
- name: "Compile Dubbo (Linux)"
491496
run: |
492497
cd ${{ github.workspace }}/dubbo
493498
./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
494-
495-
- name: "Compile and run Dubbo demo for native (Linux)"
499+
- name: "Checkout dubbo-samples repository"
500+
uses: actions/checkout@v4
501+
with:
502+
repository: 'apache/dubbo-samples'
503+
ref: master
504+
path: "./dubbo-samples"
505+
- name: "Compile and run Dubbo native image demo"
496506
run: |
497-
cd ${{ github.workspace }}/dubbo/dubbo-demo/dubbo-demo-native/dubbo-demo-native-interface
498-
MVNW="${{ github.workspace }}/dubbo/mvnw ${{ env.MAVEN_ARGS }} -T 2C -Dmaven.test.skip=true"
499-
$MVNW clean install
500-
cd ../dubbo-demo-native-provider
501-
$MVNW clean package -P native native:compile
502-
nohup ./target/dubbo-demo-native-provider &
503-
cd ../dubbo-demo-native-consumer
507+
MVNW="${{ github.workspace }}/dubbo-samples/mvnw ${{ env.MAVEN_ARGS }} -Dmaven.test.skip=true"
508+
cd ${{ github.workspace }}/dubbo-samples/2-advanced/dubbo-samples-native-image/dubbo-samples-native-image-provider
504509
$MVNW clean package -P native native:compile
505-
./target/dubbo-demo-native-consumer
510+
nohup ./target/dubbo-samples-native-image-provider &
511+
sleep 10
512+
curl \
513+
--header "Content-Type: application/json" \
514+
--data '{"name":"Dubbo"}' \
515+
http://localhost:50052/org.apache.dubbo.nativeimage.DemoService/sayHello/

.github/workflows/release-test.yml

Lines changed: 27 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -460,41 +460,52 @@ jobs:
460460
- uses: actions/checkout@v4
461461
with:
462462
path: "./dubbo"
463-
464-
- name: "Setup GraalVM environment"
463+
- name: "Set up GraalVM environment"
465464
uses: graalvm/setup-graalvm@v1
466465
with:
467466
version: '22.3.0'
468467
java-version: '17'
469468
components: 'native-image'
470469
github-token: ${{ secrets.GITHUB_TOKEN }}
471470
native-image-job-reports: 'true'
472-
473-
- name: "Setup Zookeeper environment"
471+
- name: "Set up Zookeeper environment"
474472
run: |
475473
wget https://dlcdn.apache.org/zookeeper/zookeeper-3.8.4/apache-zookeeper-3.8.4-bin.tar.gz
476474
tar -zxvf apache-zookeeper-3.8.4-bin.tar.gz
477475
mv apache-zookeeper-3.8.4-bin/conf/zoo_sample.cfg apache-zookeeper-3.8.4-bin/conf/zoo.cfg
478476
apache-zookeeper-3.8.4-bin/bin/zkServer.sh start
479-
480477
- name: "Check environment"
481478
run: |
482479
java --version
483480
native-image --version
484-
481+
- name: "Set current date as env variable"
482+
run: echo "TODAY=$(date +'%Y%m%d')" >> $GITHUB_ENV
483+
- name: "Restore local Maven repository cache"
484+
uses: actions/cache/restore@v4
485+
with:
486+
path: ~/.m2/repository
487+
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}-${{ env.TODAY }}
488+
restore-keys: |
489+
${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
490+
${{ runner.os }}-maven-
485491
- name: "Compile Dubbo (Linux)"
486492
run: |
487493
cd ${{ github.workspace }}/dubbo
488494
./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
489-
490-
- name: "Compile and run Dubbo demo for native (Linux)"
495+
- name: "Checkout dubbo-samples repository"
496+
uses: actions/checkout@v4
497+
with:
498+
repository: 'apache/dubbo-samples'
499+
ref: master
500+
path: "./dubbo-samples"
501+
- name: "Compile and run Dubbo native image demo"
491502
run: |
492-
cd ${{ github.workspace }}/dubbo/dubbo-demo/dubbo-demo-native/dubbo-demo-native-interface
493-
MVNW="${{ github.workspace }}/dubbo/mvnw ${{ env.MAVEN_ARGS }} -T 2C -Dmaven.test.skip=true"
494-
$MVNW clean install
495-
cd ../dubbo-demo-native-provider
496-
$MVNW clean package -P native native:compile
497-
nohup ./target/dubbo-demo-native-provider &
498-
cd ../dubbo-demo-native-consumer
503+
MVNW="${{ github.workspace }}/dubbo-samples/mvnw ${{ env.MAVEN_ARGS }} -Dmaven.test.skip=true"
504+
cd ${{ github.workspace }}/dubbo-samples/2-advanced/dubbo-samples-native-image/dubbo-samples-native-image-provider
499505
$MVNW clean package -P native native:compile
500-
./target/dubbo-demo-native-consumer
506+
nohup ./target/dubbo-samples-native-image-provider &
507+
sleep 10
508+
curl \
509+
--header "Content-Type: application/json" \
510+
--data '{"name":"Dubbo"}' \
511+
http://localhost:50052/org.apache.dubbo.nativeimage.DemoService/sayHello/

0 commit comments

Comments
 (0)