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

Update CI workflows #324

Merged
merged 12 commits into from
Jul 6, 2023
Merged

Update CI workflows #324

merged 12 commits into from
Jul 6, 2023

Conversation

kbdharun
Copy link
Contributor

@kbdharun kbdharun commented May 10, 2023

Changes

@niklasmohrin
Copy link
Collaborator

Hi :) These changes seem nice, but they make it a bit intransparent as to what versions are used. For example, I dont see which version of the rust compiler is running (and we also want to build with two specific versions: the msrv and stable). About the OS update: not sure either, but should probably be fine

@kbdharun
Copy link
Contributor Author

Hi :) These changes seem nice, but they make it a bit intransparent as to what versions are used. For example, I don't see which version of the rust compiler is running (and we also want to build with two specific versions: the msrv and stable).

Sorry for the delay, I wasn't feeling well. I have updated the workflow now to support multiple versions of Rust, a test action run can be found here [Note: the failed actions are because I am running it in a fork, it should run fine here, also by the way can you approve the workflow run]

About the OS update: not sure either, but it should probably be fine

Yep, it is better to use the latest stable versions to have faster CIs and additional features. Let me know If you guys need me to revert it.

@niklasmohrin
Copy link
Collaborator

Hi, I think it is still not correct: You have added the line back in that starts more CI runs with different values for the rust variable, but this variable is never used (note the use of ${{ matrix.rust }} before when installing the toolchain). Currently, it is still the preinstalled version of Rust that is used, which is not what we want for the reasons I wrote before.

I was unaware that actions-rs is not maintained anymore, so switching to something else seems like a good idea. From what I can tell from actions-rs/toolchain#216 and for example jonhoo/rust-ci-conf@362696a the world is moving to dtolnay's action, so I think going with that would be a sane move :)

Note: the failed actions are because I am running it in a fork

Actually, I think that you forgot to add the checkout action back in in the two jobs that are failing as both fail because of a missing Cargo.toml file :)

About using latest os, I was wondering if we would maybe want to stay with the older versions so that we don't miss an incompatibility with for example windows 10, ubuntu 22.04 or so. @dbrgn what do you think about this?

@kbdharun
Copy link
Contributor Author

kbdharun commented May 30, 2023

Hi, I think it is still not correct: You have added the line back in that starts more CI runs with different values for the rust variable, but this variable is never used (note the use of ${{ matrix.rust }} before when installing the toolchain). Currently, it is still the preinstalled version of Rust that is used, which is not what we want for the reasons I wrote before.

Noted

I was unaware that actions-rs is not maintained anymore, so switching to something else seems like a good idea. From what I can tell from actions-rs/toolchain#216 and for example jonhoo/rust-ci-conf@362696a the world is moving to dtolnay's action, so I think going with that would be a sane move :)

Agreed, I will try to update this PR to https://github.com/dtolnay/rust-toolchain as even with matrix jobs it is possible for some old versions of packages to be dropped from runner images i.e https://github.com/actions/runner-images/blob/main/images/linux/Ubuntu2204-Readme.md.

Note: the failed actions are because I am running it in a fork

Actually, I think that you forgot to add the checkout action back in in the two jobs that are failing as both fail because of a missing Cargo.toml file :)

Oops, just now noticed it will fix it.

About using latest os, I was wondering if we would maybe want to stay with the older versions so that we don't miss an incompatibility with for example windows 10, ubuntu 22.04 or so. @dbrgn what do you think about this?

Regarding this, the official GitHub runner doesn't support Windows 10 runners while the ubuntu-latest runner is the latest LTS Ubuntu version which is 22.04 now. Do note if you need I could add Ubuntu 20.04 to tests but the runner will get removed next year when 24.04 gets released as GitHub only keeps 2 LTS versions of Ubuntu runners at a time. An alternative is running the job in a container (as GitHub self-hosted runners aren't advisable for public projects)

Edit. Done updated the CI to the suggested toolchain action, and all jobs have succeeded https://github.com/kbdharun/tealdeer/actions/runs/5124671837 (as requested I added an older supported runner for Ubuntu 20.04)

* CI: Update to dtolnay/rust-toolchain, fix checkout

* CI: update toolchain version to 1.62.1

* CI: update toolchain as matrix job
Copy link
Collaborator

@niklasmohrin niklasmohrin left a comment

Choose a reason for hiding this comment

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

Alright, some more comments before we can merge this :)

.github/workflows/ci.yml Show resolved Hide resolved
.github/workflows/ci.yml Outdated Show resolved Hide resolved
.github/workflows/ci.yml Show resolved Hide resolved
.github/workflows/ci.yml Show resolved Hide resolved
.github/workflows/ci.yml Show resolved Hide resolved
.github/workflows/ci.yml Show resolved Hide resolved
Comment on lines 81 to 85
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
default: true
Copy link
Collaborator

Choose a reason for hiding this comment

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

There is no corresponding use of dtolnay/rust-toolchain for this use of actions-rs/toolchain

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think the general one is fine in this case as it doesn't impact the time taken by the CI.

.github/workflows/release.yml Outdated Show resolved Hide resolved
.github/workflows/release.yml Show resolved Hide resolved
.github/workflows/release.yml Show resolved Hide resolved
Copy link
Contributor Author

@kbdharun kbdharun left a comment

Choose a reason for hiding this comment

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

GitHub actions runners have cargo and rustfmt builtin. As per your request, I will add the toolchain action for those use cases too.

.github/workflows/ci.yml Outdated Show resolved Hide resolved
.github/workflows/ci.yml Outdated Show resolved Hide resolved
.github/workflows/ci.yml Outdated Show resolved Hide resolved
.github/workflows/ci.yml Show resolved Hide resolved
.github/workflows/ci.yml Show resolved Hide resolved
.github/workflows/release.yml Outdated Show resolved Hide resolved
.github/workflows/release.yml Show resolved Hide resolved
.github/workflows/release.yml Show resolved Hide resolved
Comment on lines 81 to 85
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
default: true
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think the general one is fine in this case as it doesn't impact the time taken by the CI.

.github/workflows/ci.yml Show resolved Hide resolved
.github/workflows/release.yml Outdated Show resolved Hide resolved
.github/workflows/release.yml Show resolved Hide resolved
@kbdharun
Copy link
Contributor Author

kbdharun commented Jul 6, 2023

Done, I think it is GTG now.

@dbrgn
Copy link
Collaborator

dbrgn commented Jul 6, 2023

This looks good to me, let's see if CI runs through! If yes, I think we can merge this.

Thanks for your work and your patience, @kbdharun and @niklasmohrin 🙂

@dbrgn dbrgn merged commit 7bd5ac5 into tealdeer-rs:main Jul 6, 2023
tmeijn pushed a commit to tmeijn/dotfiles that referenced this pull request Oct 16, 2024
This MR contains the following updates:

| Package | Update | Change |
|---|---|---|
| [dbrgn/tealdeer](https://github.com/dbrgn/tealdeer) | minor | `v1.6.1` -> `v1.7.0` |

MR created with the help of [el-capitano/tools/renovate-bot](https://gitlab.com/el-capitano/tools/renovate-bot).

**Proposed changes to behavior should be submitted there as MRs.**

---

### Release Notes

<details>
<summary>dbrgn/tealdeer (dbrgn/tealdeer)</summary>

### [`v1.7.0`](https://github.com/dbrgn/tealdeer/blob/HEAD/CHANGELOG.md#v170-v170-2024-10-02)

[Compare Source](tealdeer-rs/tealdeer@v1.6.1...v1.7.0)

It's been 24 months since the last release, time for tealdeer 1.7.0! Thanks to
16 individual contributors, a few nice changes and features are included in
this release.

One change is that you can **query multiple platforms at once**. For example:

    tldr --platform openbsd --platform linux df

This will show the `df` page for OpenBSD (if available), followed by Linux (if
available), with fallback to the current platform on which tealdeer runs.

What's that `openbsd` thing up there? Yes, there's now **support for the BSD
platforms `freebsd`, `netbsd` and `openbsd`**.

And since we're already talking about platform support: Our **binary releases
now include builds for ARM64 (aka `aarch64`) on macOS (Apple Silicon, M1/M2/M3)
and Linux**. *(Keep in mind that binary releases are generated in CI and are
unsigned. For a trusted build, please compile from source.)*

There's also a breaking change for the folks using [custom pages and
patches](https://tealdeer-rs.github.io/tealdeer/usage_custom_pages.html): These
files now use a `.md` extension. Old files will continue to work, but will
result a deprecation warning being printed when used.

On a personal note, this will be the last release from me
([Danilo](https://github.com/dbrgn/)) as primary maintainer of tealdeer. For
details, see [#&#8203;376](tealdeer-rs/tealdeer#376).

Changes:

-   \[added] Allow querying multiple platforms (\[[#&#8203;300](tealdeer-rs/tealdeer#300)])
-   \[added] Add BSD platform support (\[[#&#8203;354](tealdeer-rs/tealdeer#354)])
-   \[added] Allow building with native-tls in addition to rustls (\[[#&#8203;303](tealdeer-rs/tealdeer#303)])
-   \[changed] Change custom page files to use a `.md` file extension (\[[#&#8203;322](tealdeer-rs/tealdeer#322)])
-   \[changed] Update to clap v4 for doing command line parsing (\[[#&#8203;298](tealdeer-rs/tealdeer#298)])
-   \[changed] Performance optimization in LineIterator (\[[#&#8203;314](tealdeer-rs/tealdeer#314)])
-   \[changed] Performance optimizations by tweaking Cargo flags (\[[#&#8203;355](tealdeer-rs/tealdeer#355)])
-   \[changed] Include completions in published crate (\[[#&#8203;333](tealdeer-rs/tealdeer#333)])
-   \[changed] Minimal supported Rust version is now 1.75 (\[[#&#8203;298](tealdeer-rs/tealdeer#298)])
-   \[fixed] Fix bash/zsh/fish completions when cache is empty (\[[#&#8203;327](tealdeer-rs/tealdeer#327)], \[[#&#8203;331](tealdeer-rs/tealdeer#331)])
-   \[docs] Publish docs only when tagging a release (\[[#&#8203;362](tealdeer-rs/tealdeer#362)])
-   \[docs] List Scoop and Debian packages (\[[#&#8203;305](tealdeer-rs/tealdeer#305)], \[[#&#8203;315](tealdeer-rs/tealdeer#315)])
-   \[docs] Add "Tips and Tricks" chapter to user manual (\[[#&#8203;342](tealdeer-rs/tealdeer#342)])
-   \[docs] Various docs improvements (\[[#&#8203;293](tealdeer-rs/tealdeer#293)])
-   \[chore] Improvements to CI workflows (\[[#&#8203;324](tealdeer-rs/tealdeer#324)])
-   \[chore] Update Cargo.toml license field following SPDX 2.1 (\[[#&#8203;336](tealdeer-rs/tealdeer#336)])
-   \[chore] Dependency updates

Contributors to this version:

-   \[Adam Henley]\[[@&#8203;adamazing](https://github.com/adamazing)]
-   \[Andrea Frigido]\[[@&#8203;frisoft](https://github.com/frisoft)]
-   \[Blair Noctis]\[[@&#8203;nc7s](https://github.com/nc7s)]
-   \[Danilo Bargen]\[[@&#8203;dbrgn](https://github.com/dbrgn)]
-   \[Felix Yan]\[[@&#8203;felixonmars](https://github.com/felixonmars)]
-   \[Iliia Maleki]\[[@&#8203;iliya-malecki](https://github.com/iliya-malecki)]
-   \[JJ Style]\[[@&#8203;jj-style](https://github.com/jj-style)]
-   \[K.B.Dharun Krishna]\[[@&#8203;kbdharun](https://github.com/kbdharun)]
-   \[Linus Walker]\[[@&#8203;Walker-00](https://github.com/Walker-00)]
-   \[Mohit Raj]\[[@&#8203;agrmohit](https://github.com/agrmohit)]
-   \[Nicolai Fröhlich]\[[@&#8203;nifr](https://github.com/nifr)]
-   \[Niklas Mohrin]\[[@&#8203;niklasmohrin](https://github.com/niklasmohrin)]
-   \[[@&#8203;qknogxxb](https://github.com/qknogxxb)]\[[@&#8203;qknogxxb](https://github.com/qknogxxb)]
-   \[[@&#8203;tveness](https://github.com/tveness)]\[[@&#8203;tveness](https://github.com/tveness)]
-   \[Y.D.X.]\[[@&#8203;YDX-2147483647](https://github.com/YDX-2147483647)]
-   \[Zacchary Dempsey-Plante]\[[@&#8203;zedseven](https://github.com/zedseven)]

Thanks!

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever MR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this MR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this MR, check this box

---

This MR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy40NDAuNyIsInVwZGF0ZWRJblZlciI6IjM3LjQ0MC43IiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJSZW5vdmF0ZSBCb3QiXX0=-->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants