From 7ade2cb1b380c996378ce665bdb8a0b37d2fe8bd Mon Sep 17 00:00:00 2001 From: richerfu Date: Thu, 6 Feb 2025 09:26:44 +0800 Subject: [PATCH 1/3] feat(ci): add OpenHarmony CI and add it to tier2 --- .github/workflows/ci.yml | 3 +++ README.md | 3 +++ changelog/2599.added.md | 1 + 3 files changed, 7 insertions(+) create mode 100644 changelog/2599.added.md diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c0fe0fb348..71d4e37620 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -236,6 +236,9 @@ jobs: - target: s390x-unknown-linux-gnu - target: x86_64-unknown-linux-gnux32 - target: x86_64-unknown-netbsd + - target: aarch64-unknown-linux-ohos + - target: armv7-unknown-linux-ohos + - target: x86_64-unknown-linux-ohos steps: - name: checkout diff --git a/README.md b/README.md index f763a47277..bd67e5ca8e 100644 --- a/README.md +++ b/README.md @@ -90,6 +90,9 @@ The following targets are supported by `nix`:
  • x86_64-linux-android
  • x86_64-unknown-illumos
  • x86_64-unknown-netbsd
  • +
  • aarch64-unknown-linux-ohos
  • +
  • armv7-unknown-linux-ohos
  • +
  • x86_64-unknown-linux-ohos
  • armv7-unknown-linux-uclibceabihf
  • diff --git a/changelog/2599.added.md b/changelog/2599.added.md new file mode 100644 index 0000000000..95a7b19e7f --- /dev/null +++ b/changelog/2599.added.md @@ -0,0 +1 @@ +Add OpenHarmony target into CI and Update documents. From 9c05570dc3384e25a223bb4894d19ca48346e328 Mon Sep 17 00:00:00 2001 From: richerfu Date: Thu, 6 Feb 2025 10:12:58 +0800 Subject: [PATCH 2/3] fix: update ohos msrv to 1.78.0 --- .github/workflows/ci.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 71d4e37620..956dddd63d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -16,6 +16,8 @@ env: MSRV: 1.69.0 # Rust's Loongarch support merged in 1.71.0 MSRV_LOONGARCH: 1.71.0 + # Minimal Rust version to support all 3 official OpenHarmony targets as tier2 + MSRV_OHOS: 1.78.0 RUSTFLAGS: -Dwarnings jobs: @@ -247,7 +249,8 @@ jobs: - name: setup Rust uses: dtolnay/rust-toolchain@master with: - toolchain: '${{ env.MSRV }}' + # Use a newer version rustc if it is OpenHarmony, remove this workaround after MSRV is newer than 1.78.0 + toolchain: "${{ contains(matrix.target, 'ohos') && env.MSRV_OHOS || env.MSRV }}" components: clippy - name: install targets @@ -262,7 +265,7 @@ jobs: - name: before_cache_script run: rm -rf $CARGO_HOME/registry/index - + redox: runs-on: ubuntu-latest From 5a57e8eb9e39ccc4f51cca297554af16d0f41916 Mon Sep 17 00:00:00 2001 From: richerfu Date: Thu, 6 Feb 2025 10:24:12 +0800 Subject: [PATCH 3/3] Update documents --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index bd67e5ca8e..d72adbb899 100644 --- a/README.md +++ b/README.md @@ -81,18 +81,18 @@ The following targets are supported by `nix`:
    • aarch64-apple-ios
    • aarch64-linux-android
    • +
    • aarch64-unknown-linux-ohos
    • arm-linux-androideabi
    • arm-unknown-linux-musleabi
    • armv7-linux-androideabi
    • +
    • armv7-unknown-linux-ohos
    • i686-linux-android
    • loongarch64-unknown-linux-gnu
    • s390x-unknown-linux-gnu
    • x86_64-linux-android
    • x86_64-unknown-illumos
    • -
    • x86_64-unknown-netbsd
    • -
    • aarch64-unknown-linux-ohos
    • -
    • armv7-unknown-linux-ohos
    • x86_64-unknown-linux-ohos
    • +
    • x86_64-unknown-netbsd
    • armv7-unknown-linux-uclibceabihf