Commit Graph

143 Commits

Author SHA1 Message Date
Mahdi Dibaiee 6dc621ec18 Set minimum supported rust version to 1.51 2021-12-30 07:58:15 +01:00
Martin Nordholts ce89fb2751 CICD: Add check for accidental inclusion of GPL:ed code 2021-11-28 21:04:37 +01:00
Martin Nordholts 043f3381b0
CICD: Make the 'cargo fmt' check a toplevel job (#1883)
Mainly to make it easier to see what went wrong when it fails.

If this ever gets of out sync with a particular Rust version, we can most likely
save the situation by introducing a `rustfmt.toml` file.
2021-10-04 08:08:14 +02:00
Martin Nordholts 418fce5683 Bump MSRV to 1.46
See #1874 and #1872.
2021-10-03 07:51:37 +02:00
Kuan-Yi Li 47283f226a Add bash completion to deb package
From the discussion in #1734, instead of using `env.PROJECT_NAME`,
`steps.strip.outputs.BIN_NAME` could potentially be a better choice as
the filename needs to match the called executable for bash-completion's
on demand loading to work. This `BIN_NAME` needs to stay in sync with
`env.PROJECT_EXECUTABLE` which is replaced in the template, but not
available for the deb build at this stage.

Follow the same route as for the fish/zsh completions for now for the
sake of consistency.

Closes #1733
2021-10-02 11:13:19 +02:00
Martin Nordholts d935ea1cda
Add regression testing for the custom assets functionality (#1829)
The test is following the same steps regular users are instructed to follow:
https://github.com/sharkdp/bat/blob/master/README.md#adding-new-syntaxes--language-definitions
2021-09-07 17:01:15 +02:00
Martin Nordholts 8ca852c728
CICD: Put documentation testing in its own job (#1831)
For increased parallelization and thus a faster CICD pipeline.
2021-09-03 18:03:52 +02:00
Martin Nordholts 355a82db54 CICD: Sort build matrix by target 2021-08-29 15:39:25 +02:00
Martin Nordholts b3e17bde82 CICD: Remove disabled windows-2019 i686-pc-windows-gnu from build matrix
It just messes up alignment. Nothing gets better by keeing it around.
2021-08-29 15:39:25 +02:00
Martin Nordholts 4b38e7b1d7 CICD: Swap target and os in matrix job name
The full name can frequently not be shown, and target is more relevant than os,
so show target first.
2021-08-29 15:39:25 +02:00
Rashil Gandhi 43afae34be
Add PowerShell completion file (#1826) 2021-08-28 13:39:17 +02:00
Martin Nordholts 19c3e82abf
Replace deprecated 'error-chain' with 'thiserror' (#1820)
We can't use #[from] on Error::Msg(String) because String does not implement Error.
(Which it shouldn't; see e.g. https://internals.rust-lang.org/t/impl-error-for-string/8881.)
So we implement From manually for Error::Msg, since our current code was written
in that way for error-chain.
2021-08-26 13:12:21 +02:00
David Peter ff70a80741 Add statically linked binaries for ARM 2021-08-22 15:52:23 +02:00
David Peter ecdb17148d Use Ubuntu 20.04 instead of 18.04 2021-08-22 15:52:23 +02:00
a1346054 51edacb5eb style: trim excess whitespace 2021-08-21 23:07:37 +02:00
Martin Nordholts cbd96237fd CICD: Add 'cargo fmt' check 2021-08-19 07:18:05 +02:00
Martin Nordholts 25fa577cd0 Make 'build-assets' an optional capability for application
Also structure features a bit more clever to avoid duplication of
feature dependency declarations.
2021-08-17 10:58:21 +02:00
Martin Nordholts cb4973987b Cargo.toml: Introduce 'quick-build-application' feature
Use it like this:

  cargo build --no-default-features --features quick-build-application

It reduces dependencies to build from 154 to 125, allowing quicker iteration
when developing the app.
2021-08-08 11:18:26 +02:00
Martin Nordholts 697d106bd4 CICD: Pass --locked to all cargo commands
To avoid that earlier cargo commands "fixes" Cargo.lock before cargo commands
with --locked has a chance to check if it is up to date.
2021-08-02 21:49:51 +02:00
David Peter fb1ab09e3e Add Enselic in FUNDING.yml 2021-07-26 20:11:34 +02:00
David Peter 84e2a2e5d1 Add custom FUNDING.yml 2021-07-25 12:30:40 +02:00
David Peter fddd11a205 CICD: sync with pastel, minor changes 2021-07-05 17:24:59 +02:00
Ville Skyttä e05f5010da Add bash completion
Closes https://github.com/sharkdp/bat/issues/1010
2021-06-28 11:58:03 +02:00
dependabot-preview[bot] 285b1556a9 Upgrade to GitHub-native Dependabot 2021-05-12 11:18:03 +02:00
Marco Ieni 8321cc661c
CI: check docs (#1612) 2021-05-12 07:20:12 +02:00
Martin Nordholts 8f93844427 CICD: Remove explicit allow of clippy::match_bool since MSRV 1.45 bump
Now that we are on MSRV 1.45, there is no need to "backport" the change
that reclassified clippy::match_bool as "pedantic".
2021-03-08 07:08:55 +01:00
David Peter 52f84b063c Update dependencies, MSRV: 1.45 2021-03-07 15:33:37 +01:00
David Peter 2540311cdf Update bug report issue template (--diagnostic option) 2021-03-01 08:27:07 +01:00
Martin Nordholts 9db9a38565 CICD: Add workflow_dispatch to enable manual builds
Which is useful when you want to test a fix without creating a PR for
it.
2021-02-28 16:27:40 +01:00
Martin Nordholts 0371f55541 CICD: Don't run jobs twice in PRs
Without this change, creating a PR triggers all jobs to run twice. Once
due to a push event and once due to a pull_request event.

Change to only trigger jobs due to push when pushing a tag or to the
master branch, to avoid duplicate jobs for each PR.
2021-02-22 21:45:52 +01:00
David Peter bc35592fd9 CICD: Build step naming 2021-02-21 19:11:42 +01:00
David Peter f5d834407e CICD: Improved job names 2021-02-21 11:16:30 +01:00
David Peter 557a748ac7 CICD: Remove code coverage computation 2021-02-21 10:24:27 +01:00
Martin Nordholts 3f10f71ad2 CICD: Build: Rename 'Check is release' step to 'Check for release'
To get a name that sounds like proper English.
2021-02-18 07:59:10 +01:00
Martin Nordholts 7b6388b19f CICD: Build: Add separate 'Calculate test options' step
And move it down to right before it is needed, to reduce its scope.

For #1474
2021-02-18 07:59:10 +01:00
Martin Nordholts b98ec4bbc5 CICD: Build: Check IS_RELEASE in separate step
And move it closer to where it is actually needed, to reduce its scope.

For #1474
2021-02-18 07:59:10 +01:00
Martin Nordholts 94fd481f36 CICD: Build: Remove unused ${{ matrix.job.cargo-options }} expansions 2021-02-18 07:59:10 +01:00
Martin Nordholts 0e5ea9c354 CICD: Build: Use package-specific staging dir
A common staging dir confuses more than it helps, so let each package
step take care of its own staging dir.

For #1474
2021-02-16 21:53:54 +01:00
Martin Nordholts eac36dd3b5 CICD: Build: Introduce and use new 'Strip release bin' step
So that we don't have to duplicate that logic in both 'Debian package'
and 'Package' steps.

For #1474
2021-02-16 07:27:44 +01:00
Martin Nordholts d36b091fd7 CICD: Build: Move PKG_* vars to 'Package' step
For improved modularization of CICD script.

For #1474
2021-01-11 22:18:49 +01:00
Martin Nordholts 3dcf02549e CICD: Build: Move DPKG_* vars to 'Debian package' step
For cleaner CICD script. Note that we can't use outputs defined in our
own step, so also change to shell vars intead.

For #1474
2021-01-11 22:18:49 +01:00
Martin Nordholts e402011a73 CICD: Build: Split out dir creation into the individual package steps
It's cleaner because we can reuse helper vars and create the dirs closer
in time to when they are needed.

For #1474
2021-01-11 22:18:49 +01:00
Keith Hall b25713938d
Fix typo in bug report template 2021-01-11 15:40:03 +02:00
Martin Nordholts 221c9815a5 CICD: Build: Split up into separate 'Debian package' step
Make sure to ignore whitespace changes when diffing.

For #1474
2021-01-10 20:44:03 +01:00
Martin Nordholts c5c683f67c Explicitly allow clippy::match_bool until we bump MSRV
Since we run clippy on Rust 1.42.0 we still get warnings about the
presence of clippy::match_bool lints. That lint has been moved from
'Style' to 'Pedantic' in Rust 1.45.0 and onwards however, so let's
silent it in our clippy runs too.
2021-01-10 20:38:16 +01:00
sharkdp faa27ed6e3 CICD: simply use 'sed' to extract crate information 2021-01-10 14:44:46 +01:00
sharkdp f3227c259e Use cache for faster install 2021-01-10 14:44:46 +01:00
sharkdp 2cfeebab90 CICD: Use 'cargo get' to extract crate metadata 2021-01-10 14:44:46 +01:00
Martin Nordholts e3b1142364 CICD: Build: DEPLOY -> IS_RELEASE and inline it
This simplifies and clarifies the script.

For #1474
2021-01-10 10:56:15 +01:00
Martin Nordholts 8832ff3c6a CICD: Build: Adapt release version regex to bat
All bat tags begin with a small 'v', so no need for a generic pattern in
the CI script. This will also help us ensure we keep the same format on
future tags.
2021-01-10 10:56:15 +01:00