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

feat(ci): add OpenHarmony CI and add it to tier2 #2599

Merged
merged 3 commits into from
Feb 6, 2025

Conversation

richerfu
Copy link
Contributor

@richerfu richerfu commented Feb 6, 2025

What does this PR do

Add OpenHarmony target into CI and Update documents.

The official support: arm64,arm and x86_64, so i add three targets:

  • aarch64-unknown-linux-ohos
  • armv7-unknown-linux-ohos
  • x86_64-unknown-linux-ohos

Checklist:

  • I have read CONTRIBUTING.md
  • I have written necessary tests and rustdoc comments
  • A change log has been added if this PR modifies nix's API

@SteveLauC
Copy link
Member

Any idea what is the minimal Rust version required for these 3 targets?

@richerfu
Copy link
Contributor Author

richerfu commented Feb 6, 2025

Any idea what is the minimal Rust version required for these 3 targets?

Maybe 1.70.0 and 1.73.0
for arm64 and arm: rust-lang/rust#108792
for x86_64: rust-lang/rust#113061

I want to split it a unique task and use rust with 1.79.0, how about it?

@SteveLauC
Copy link
Member

I tend to use the workaround that Loongarch uses:

  1. Specify a separate MSRV for it

    # Rust's Loongarch support merged in 1.71.0
    MSRV_LOONGARCH: 1.71.0

    # Minimal Rust version to support all 3 official OpenHarmony targets
    MSRV_OHOS: 1.79.0 
  2. In the step that sets up Rust toolchain, use that separate MSRV if needed

    - name: setup Rust
    uses: dtolnay/rust-toolchain@master
    with:
    # Use a newer version rustc if the target is Loongarch, remove this workaround after MSRV is newer than 1.71.0
    toolchain: "${{ matrix.target == 'loongarch64-unknown-linux-gnu' && env.MSRV_LOONGARCH || env.MSRV }}"
    components: clippy

     # Use a newer version rustc if it is OpenHarmony, remove this workaround after MSRV is newer than 1.79.0 
     toolchain: "${{ contains(matrix.target, 'ohos')  && env.MSRV_OHOS || env.MSRV }}" 

@SteveLauC
Copy link
Member

Maybe 1.70.0 and 1.73.0

Sorry for missing this, if 1.73 will work, we should use it (the minimal one)

@richerfu
Copy link
Contributor Author

richerfu commented Feb 6, 2025

Maybe 1.70.0 and 1.73.0

Sorry for missing this, if 1.73 will work, we should use it (the minimal one)

1.73 is tier3, if use 1.73, we need to add them into tier3 task. I think using 1.79 be better?

@SteveLauC
Copy link
Member

1.73 is tier3, if use 1.73, we need to add them into tier3 task

Thanks for letting me know. Right, we want the Rust tier 2 support.

According to this comment, we should use 1.78 as rust-lang/compiler-team#719 was included in 1.78

@richerfu
Copy link
Contributor Author

richerfu commented Feb 6, 2025

1.73 is tier3, if use 1.73, we need to add them into tier3 task

Thanks for letting me know. Right, we want the Rust tier 2 support.

According to this comment, we should use 1.78 as rust-lang/compiler-team#719 was included in 1.78

So sorry that i made a mistake in remembering :( and already fixed it.

@SteveLauC
Copy link
Member

So sorry that i made a mistake in remembering :( and already fixed it.

No need to be sorry:)

README.md Outdated Show resolved Hide resolved
Copy link
Member

@SteveLauC SteveLauC left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@SteveLauC SteveLauC enabled auto-merge February 6, 2025 02:38
@SteveLauC SteveLauC disabled auto-merge February 6, 2025 04:14
@SteveLauC SteveLauC merged commit 746cb95 into nix-rust:master Feb 6, 2025
38 of 40 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants