From 7cab303370e706d1c251fb85de446ac2ff267e19 Mon Sep 17 00:00:00 2001 From: richerfu Date: Mon, 6 Oct 2025 09:50:25 +0800 Subject: [PATCH 1/2] Add test ci --- .github/workflows/ci.yml | 30 ++++++++++++++++++++++++++++++ README.md | 2 ++ 2 files changed, 32 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..98f6a13 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,30 @@ +name: Build test + +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + +jobs: + test: + runs-on: ubuntu-latest + name: Test build + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Setup OpenHarmony SDK + uses: openharmony-rs/setup-ohos-sdk@v0.2 + id: setup-ohos + with: + version: '5.0.0' + + - name: Setup Zig for OpenHarmony + uses: openharmony-zig/setup-zig-ohos@v0.1.0 + id: setup-zig + + - name: Build + run: | + zig build \ No newline at end of file diff --git a/README.md b/README.md index cf57553..41f84ef 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,8 @@ A simple ping implement by zig. +> Note: This is an experiential project, if you want a stable version, please use `@ohos-rs/ping`. + ## Usage ```ts From 5c9ff1684bce59ddbfd99f3bafbd3cc97b59cac1 Mon Sep 17 00:00:00 2001 From: richerfu Date: Mon, 6 Oct 2025 09:51:21 +0800 Subject: [PATCH 2/2] Fix ci --- .github/workflows/ci.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 98f6a13..0202ace 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -2,15 +2,15 @@ name: Build test on: push: - branches: [ main ] + branches: [main, master] pull_request: - branches: [ main ] + branches: [main, master] jobs: test: runs-on: ubuntu-latest name: Test build - + steps: - name: Checkout uses: actions/checkout@v4 @@ -19,7 +19,7 @@ jobs: uses: openharmony-rs/setup-ohos-sdk@v0.2 id: setup-ohos with: - version: '5.0.0' + version: "5.0.0" - name: Setup Zig for OpenHarmony uses: openharmony-zig/setup-zig-ohos@v0.1.0 @@ -27,4 +27,4 @@ jobs: - name: Build run: | - zig build \ No newline at end of file + zig build