summaryrefslogtreecommitdiffstats
path: root/.github
AgeCommit message (Collapse)Author
2023-11-25ci: add Debian release buildAndrew Gallant
Previously, we were running 'cargo deb' locally. But the release process is a little simpler now thanks to GitHub Actions and the 'gh' tool, so I felt comfortable putting the 'deb' generation in CI. Now the only real manual part of release asset creation is the M2 release, but that should hopefully be automated once GitHub makes Apple silicon runners available for free.
2023-11-21ci: strip release binaries on macOSAndrew Gallant
We were purportedly doing this already, but actually weren't because of confusion in the `if` condition. Closes #2636
2023-11-21doc: scrub mentions of asciidoc/asciidoctorAndrew Gallant
This optional dependency is now finally dropped. So ends a long journey of trying to generate man pages in a lightweight and dependable way. The only thing I could figure out how to make work reliably was to just learn how to write roff myself. Yay.
2023-11-20cli: replace clap with lexopt and supporting codeAndrew Gallant
ripgrep began it's life with docopt for argument parsing. Then it moved to Clap and stayed there for a number of years. Clap has served ripgrep well, and it probably could continue to serve ripgrep well, but I ended up deciding to move off of it. Why? The first time I had the thought of moving off of Clap was during the 2->3->4 transition. I thought the 3.x and 4.x releases were great, but for me, it ended up moving a little too quickly. Since the release of 4.x was telegraphed around when 3.x came out, I decided to just hold off and wait to migrate to 4.x instead of doing a 3.x migration followed shortly by another 4.x migration. Of course, I just never ended up doing the migration at all. I never got around to it and there just wasn't a compelling reason for me to upgrade. While I never investigated it, I saw an upgrade as a non-trivial amount of work in part because I didn't encapsulate the usage of Clap enough. The above is just what got me started thinking about it. It wasn't enough to get me to move off of it on its own. What ended up pushing me over the edge was a combination of factors: * As mentioned above, I didn't want to run on the migration treadmill. This has proven to not be much of an issue, but at the time of the 2->3->4 releases, I didn't know how long Clap 4.x would be out before a 5.x would come out. * The release of lexopt[1] caught my eye. IMO, that crate demonstrates exactly how something new can arrive on the scene and just thoroughly solve a problem minimalistically. It has the docs, the reasoning, the simple API, the tests and good judgment. It gets all the weird corner cases right that Clap also gets right (and is part of why I was originally attracted to Clap). * I have an overall desire to reduce the size of my dependency tree. In part because a smaller dependency tree tends to correlate with better compile times, but also in part because it reduces my reliance and trust on others. It lets me be the "master" of ripgrep's destiny by reducing the amount of behavior that is the result of someone else's decision (whether good or bad). * I perceived that Clap solves a more general problem than what I actually need solved. Despite the vast number of flags that ripgrep has, its requirements are actually pretty simple. We just need simple switches and flags that support one value. No multi-value flags. No sub-commands. And probably a lot of other functionality that Clap has that makes it so flexible for so many different use cases. (I'm being hand wavy on the last point.) With all that said, perhaps most importantly, the future of ripgrep possibly demands a more flexible CLI argument parser. In today's world, I would really like, for example, flags like `--type` and `--type-not` to be able to accumulate their repeated values into a single sequence while respecting the order they appear on the CLI. For example, prior to this migration, `rg regex-automata -Tlock -ttoml` would not return results in `Cargo.lock` in this repository because the `-Tlock` always took priority even though `-ttoml` appeared after it. But with this migration, `-ttoml` now correctly overrides `-Tlock`. We would like to do similar things for `-g/--glob` and `--iglob` and potentially even now introduce a `-G/--glob-not` flag instead of requiring users to use `!` to negate a glob. (Which I had done originally to work-around this problem.) And some day, I'd like to add some kind of boolean matching to ripgrep perhaps similar to how `git grep` does it. (Although I haven't thought too carefully on a design yet.) In order to do that, I perceive it would be difficult to implement correctly in Clap. I believe that this last point is possible to implement correctly in Clap 2.x, although it is awkward to do so. I have not looked closely enough at the Clap 4.x API to know whether it's still possible there. In any case, these were enough reasons to move off of Clap and own more of the argument parsing process myself. This did require a few things: * I had to write my own logic for how arguments are combined into one single state object. Of course, I wanted this. This was part of the upside. But it's still code I didn't have to write for Clap. * I had to write my own shell completion generator. * I had to write my own `-h/--help` output generator. * I also had to write my own man page generator. Well, I had to do this with Clap 2.x too, although my understanding is that Clap 4.x supports this. With that said, without having tried it, my guess is that I probably wouldn't have liked the output it generated because I ultimately had to write most of the roff by hand myself to get the man page I wanted. (This also had the benefit of dropping the build dependency on asciidoc/asciidoctor.) While this is definitely a fair bit of extra work, it overall only cost me a couple days. IMO, that's a good trade off given that this code is unlikely to change again in any substantial way. And it should also allow for more flexible semantics going forward. Fixes #884, Fixes #1648, Fixes #1701, Fixes #1814, Fixes #1966 [1]: https://docs.rs/lexopt/0.3.0/lexopt/index.html
2023-10-09core: polish the core of ripgrepAndrew Gallant
This I believe finishes are quest to do mechanical updates to ripgrep's style, bringing it in line with my current practice (loosely speaking).
2023-09-25cli: add new 'hostname' functionAndrew Gallant
This will enable us to query for the current system's hostname in both Unix and Windows environments. We could have pulled in the 'gethostname' crate for this, but: 1. I'm not a huge fan of micro-crates. 2. The 'gethostname' crate panics if an error occurs. (Which, to be fair, an error should never occur, but it seems plausible on borked systems? ripgrep runs in a lot of places, so I'd rather not take the chance of a panic bringing down ripgrep for an optional convenience feature.) 3. The 'gethostname' crate uses the 'windows-targets' crate from Microsoft. This is arguably the "right" thing to do, but ripgrep doesn't use them yet and they appear high-churn. So I just added a safe wrapper to do this to winapi-util[1] and then inlined the Unix version here. This brings in no extra dependencies and the routine is fallible so that callers can recover from potentially strange failures. [1]: https://github.com/BurntSushi/winapi-util/pull/14
2023-09-18github: convert bug-report issue template to issue formdana
Trying this to see how well it works. PR #2560
2023-08-28ci: replace mips with powerpc64, aarch64 and s390xAndrew Gallant
We drop our MIPS target because it no longer works.[1] We were previously using it as a means of testing ripgrep in a big endian environment. So to achieve that without MIPS, we test on powerpc64 and s390x. (No particular reason to do both, but why not.) We also add aarch64 as a proxy for at least ensuring everything works for the same architecture as Apple silicon. It's not a guarantee that everything works, but it seems better than nothing until we can actually test Apple silicon in CI. [1]: https://github.com/rust-lang/regex/commit/c788378d6fe407f4774df98a78436cea5d98525b
2023-07-09ci/release: use latest OS versionsAndrew Gallant
2023-07-09ci/release: add sha256 sums to release artifactsxEgoist
Fixes #1924, Closes #2168
2023-07-09github: remove dependabot configurationAndrew Gallant
This does not seem to have worked at all. For example, there were Actions being used that were clearly deprecated/archived[1]. But Dependabot didn't make a peep. So just get rid of it to avoid the false sense that someone is checking our dependencies for us. [1]: https://github.com/BurntSushi/ripgrep/pull/2360
2023-07-08ci/release: Use GITHUB_REF_NAME instead of GITHUB_REFJames McKinney
This is a nice quality of life improvement. Closes #2358
2023-07-08ci/release: use GitHub CLIJames McKinney
The old actions I was using are apparently archived because they make use of deprecated features (like `set-output`). Sigh. Closes #2360
2023-07-05ci: try to fix CIAndrew Gallant
2023-06-05cli: replace atty with std::io::IsTerminalMartin Nordholts
The `atty` crate is unmaintained[1] and `std::io::IsTerminal` was stabilized in Rust 1.70. [1]: https://rustsec.org/advisories/RUSTSEC-2021-0145.html PR #2526
2022-11-14msrv: bump to Rust 1.65.0Andrew Gallant
This matches the latest stable release of Rust and let's us use nice things like 'let else'.
2022-09-29ci: bump actions/checkout from 2 to 3 (#2318)dependabot[bot]
Bumps [actions/checkout](https://github.com/actions/checkout) from 2 to 3. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v2...v3) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-09-29ci: bump actions/upload-release-asset from 1.0.1 to 1.0.2 (#2317)dependabot[bot]
Bumps [actions/upload-release-asset](https://github.com/actions/upload-release-asset) from 1.0.1 to 1.0.2. - [Release notes](https://github.com/actions/upload-release-asset/releases) - [Commits](https://github.com/actions/upload-release-asset/compare/v1.0.1...v1.0.2) --- updated-dependencies: - dependency-name: actions/upload-release-asset dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-09-29ci: enable Dependabot for the Actions workflowsLingMan
Dependabot automatically files PRs for updatable dependencies. As configured it watches all workflow files in `.github/workflows` for possible updates to any of the Actions depended upon. We specifically do not enable Dependabot for other things, in order to avoid running in a hamster wheel. Closes #2315
2022-09-29ci: remove `fetch-depth` parameter from the checkout actionLingMan
It is already set to 1 by default. Closes #2316
2022-09-29ci: use `cargo check`'s `--check` option directlyLingMan
2022-09-29ci: switch to using '@master' dtolnay actionLingMan
The `v1` tag exists but isn't really supported. This mirrors [1]. See also [2]. [1]: https://github.com/BurntSushi/bstr/commit/50086e74dae976ab78a039c86fc6342cecc55fae [2]: https://github.com/BurntSushi/bstr/pull/122#issuecomment-1201930916
2022-09-29ci: use latest runner images in CILingMan
The `ubuntu-18.04` image is deprecated and will be removed by 2023-04-01[1][2] with scheduled brownouts starting on 2022-10-03. Update all images to the latest available versions. [1]: https://github.blog/changelog/2022-08-09-github-actions-the-ubuntu-18-04-actions-runner-image-is-being-deprecated-and-will-be-removed-by-12-1-22/ [2]: https://github.com/actions/runner-images/issues/6002
2022-07-14ci: switch to dtolnay/rust-toolchainAndrew Gallant
The actions-rs/toolchain project appears dead. dtolnay's also seems more sustainable given its simplicity, but it does enough to suit our needs.
2021-06-01msrv: bump to Rust 1.52.1Andrew Gallant
This matches the latest stable release of Rust.
2021-06-01github: add note about file typesAndrew Gallant
2021-05-31ci: re-work github actions releaseAndrew Gallant
This combines the tips from #1820 and the patch submitted in #1675. The latter wasn't taken as-is because I didn't agree with some of the changes, and in particular, it removed the ability to easily test the release on a branch with a dummy tag name. I've tried to add that back here with the 'rg_version' output. Overall though, using outputs is indeed much simpler. Closes #1675, Closes #1820
2021-05-31ci: check docs for all cratesMarco Ieni
This also replaces '--all' in Cargo commands with '--workspace'. The former has apparently been deprecated. We also fix a couple warnings that this new step detected. Closes #1848
2020-11-16ci: update to GITHUB_ENVAndrew Gallant
Apparently ::set-env has been completely disabled. Sigh.
2020-11-09ci: install cross from crates.ioTaiki Endo
A new release of cross has been put out, so we no longer need to install it from git. PR #1728
2020-05-08doc: use asciidoctor instead of a2xChayoung You
AsciiDoc development is continued under asciidoctor. See https://github.com/asciidoc/asciidoc. We do however fallback to a2x if asciidoctor is not present. This is to ease migration, but at some point, it's likely that support for a2x will be dropped. Originally reported downstream: https://github.com/Homebrew/linuxbrew-core/issues/19885 Closes #1544
2020-04-14github: add necessary metadataAndrew Gallant
2020-04-14github: switch to new issue template formatAndrew Gallant
And also point folks toward Discussions.
2020-04-01ci: disable man page checkAndrew Gallant
It appears to be intermittently failing. Specifically, a2x seems to be failing occasionally with no apparent reason why. The error message it gives is inscrutable. Sigh.
2020-03-30ci: upgrade to actions/checkout@v2Andrew Gallant
In particular, this appears to fix an extremely annoying bug that was causing PR builds to fail if they were re-run. For more details: https://github.com/actions/checkout/issues/23#issuecomment-572688577
2020-03-28ci: attempt to fix CIAndrew Gallant
It looks like a2x isn't working, so take a shot at fixing it.
2020-03-15ci: tweak release nameAndrew Gallant
This is consistent with prior releases.
2020-03-15release: 12.0.0, take 212.0.0Andrew Gallant
2020-03-15ci: make script names consistentAndrew Gallant
2020-03-15ci: rebuild release infrastructure on GitHub ActionsAndrew Gallant
2020-02-27ci: fix ci by removing fetch-depth 1pierreN
It's not clear why removing this makes things work. I've submitted PRs that passed CI with fetch-depth=1. Maybe it only fails when PRs are submitted from external contributors? Either way, for now, we remove this and absorb the extra cost in order to get PRs passing CI again. PR #1501
2020-02-20ci: switch build to GitHub ActionsAndrew Gallant
2020-01-10ci: disable github actions for nowAndrew Gallant
The CI build failures are annoying and distracting. Hopefully soon I'll be able to invest more time in the switch.
2019-09-11ci: get GitHub Actions running againJonathan Clem
Basically, matrix.os needs to be defined for every build. We were commenting out some of the builds in order to debug CI in the `include` section, but we also need to comment them out in the `build section.
2019-08-31ci: initial github actions configAndrew Gallant