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

fix: target to use for cross build and bump version to 0.12.4-rc3 #885

Closed
wants to merge 6 commits into from

Conversation

Myriad-Dreamin
Copy link
Owner

No description provided.

platform: linux
arch: arm64
cross: true
- os: ubuntu-20.04
rust-target: arm-unknown-linux-gnueabihf
Copy link
Collaborator

Choose a reason for hiding this comment

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

not sure about this. i dont know the difference between arm targets

Copy link
Owner Author

@Myriad-Dreamin Myriad-Dreamin Nov 22, 2024

Choose a reason for hiding this comment

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

We ran into some errors in #884. After diff typst CI scripting with ours, I guessed we should change targets supported by cross.

- os: ubuntu-20.04
rust-target: x86_64-unknown-linux-gnu
rust-target: x86_64-unknown-linux-musl
Copy link
Collaborator

Choose a reason for hiding this comment

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

this can help with rhel. but i heard that some libc function in musl is inefficient. we can observe if there is any slow down after changing this.

@Coekjan
Copy link

Coekjan commented Nov 22, 2024

Besides installing the musl toolchain, testing the *-musl requires more configs, like [target.x86_64-unknown-linux-musl.linker] in .cargo/config.toml. So the cargo test fails. See the poc changes below (you might need to choose cargo / cross according to the matrix.cross variable):

      - name: Test tinymist
        run: |
-          cargo test --profile=gh-release --workspace --target ${{ matrix.rust-target }}
+          cross test --profile=gh-release --workspace --target ${{ matrix.rust-target }}

Maybe we can just use cross for testing, and get rid of dealing with the complex configs and toolchain installation...

@Coekjan
Copy link

Coekjan commented Nov 22, 2024

https://github.com/Myriad-Dreamin/tinymist/actions/runs/11975350731/job/33388515141?pr=885

Seems that cross-testing *-musl targets would also require vendored openssl.

@Coekjan
Copy link

Coekjan commented Nov 22, 2024

Seems that build_alpine is similiar (same?) with build linux-x64 now?

@Myriad-Dreamin
Copy link
Owner Author

@Coekjan I've run cross test ... --features vendor-openssl, it now at least starts successfully, but it seems to be failing when downloading packages.

called `Result::unwrap()` on an `Err` value: MalformedArchive(Some("failed to create `/.cache/typst/packages/preview/tidy/0.3.0`"))

Seems that build_alpine is similiar (same?) with build linux-x64 now?

Pretty same. Now they built the same target. The only difference is in that build alpine is built in an alpine image. I suspect whether we can remove it right now, but I would rather not touching them until release 0.12.4.

@Myriad-Dreamin
Copy link
Owner Author

I'll close it and leave this issue for next release.

@Myriad-Dreamin Myriad-Dreamin deleted the cross-build-openssl branch November 26, 2024 08:53
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.

3 participants