Commit Graph

54 Commits

Author SHA1 Message Date
Thomas Otto
1f6cc72158 cd: build binaries targeting GNU libc on ubuntu-20.04, not latest
This improves compatibility, as latest is 24.04 currently. The statically
linked musl build still uses ubuntu-latest
2024-08-16 08:31:06 -04:00
Thomas Otto
97839c61c8
CI: fix macOS build (#1696)
macos-latest defaults to aarch64 as of ~2024-04
2024-05-06 19:39:19 -04:00
Dan Davison
23b967db8a Stop running bump-homebrew-formula
It looks like delta tags/releases are automatically detected:

https://github.com/Homebrew/homebrew-core/blob/master/.github/autobump.txt
https://github.com/dandavison/delta/actions/runs/8308431801/job/22738650426
2024-03-16 10:34:46 -04:00
sitiom
1f76e3e894
Change Winget Releaser job to ubuntu-latest (#1512) 2024-03-02 12:10:01 -05:00
Dan Davison
b7fd05eba4 Add workflow_dispatch trigger 2023-11-21 13:23:32 -05:00
Dan Davison
1aa5d91e94 s/master/main/ 2023-11-21 13:20:43 -05:00
Dan Davison
b134e704fc Shorten workflow name 2023-08-12 20:39:25 -04:00
nickelc
d327bad4d5
Fix typo in publishing build job & restore cross-compilation (#1430)
* Fix typo in publishing build job

This prevented the cross-compilation targets from using the `cross`
binary for the compilation.

The script evaluated with `${{ matrix.job.cross }}` to:
```
  if [[ "" == "true" ]]; then
    cross build --release --target x86_64-unknown-linux-musl
  else
    cargo build --release --target x86_64-unknown-linux-musl
  fi
```

The correct result for `${{ matrix.job.use-cross }}` is:
```
  if [[ "true" == "true" ]]; then
    cross build --release --target x86_64-unknown-linux-musl
  else
    cargo build --release --target x86_64-unknown-linux-musl
  fi
```

* Restore previously failed cross-compilation targets

- Revert "Delete the remaining failing cross-compilation target"

  This reverts commit 2937f3277a.

- Revert "Delete another failing cross-compilation target"

  This reverts commit 4af8adf580.

- Revert "Delete i686-unknown-linux-gnu job"

  This reverts commit eebddddb0a.

- Revert "Delete arm-unknown-linux-gnueabihf job"

  This reverts commit 9a2fa348eb.
2023-06-03 06:44:29 -04:00
Dan Davison
2937f3277a Delete the remaining failing cross-compilation target
https://github.com/dandavison/delta/actions/runs/5160503594/jobs/9296619624
2023-06-02 19:20:45 -04:00
Dan Davison
4af8adf580 Delete another failing cross-compilation target
https://github.com/dandavison/delta/actions/runs/5160467636/jobs/9296549493
2023-06-02 19:15:00 -04:00
Dan Davison
eebddddb0a Delete i686-unknown-linux-gnu job
Build failure

https://github.com/dandavison/delta/actions/runs/5160397593/jobs/9296411455
2023-06-02 19:03:02 -04:00
Dan Davison
9a2fa348eb Delete arm-unknown-linux-gnueabihf job
error occurred: Failed to find tool. Is `arm-linux-gnueabihf-gcc`
installed?

https://github.com/dandavison/delta/actions/runs/5160233910/jobs/9296084928
2023-06-02 18:47:21 -04:00
nickelc
a1e55ecef3
Improve manual build job (#1404)
- Only trigger the build if the book has changed.
- Split the job into `build` and `deploy` with specific permissions.
- Don't build documentation for dependencies.
- Deploy to GitHub Pages directly without going through the `gh-pages`
  branch.
2023-04-26 12:00:22 -04:00
sitiom
56fa5dd6d3
Add Winget Releaser workflow (#1331)
* Add Winget installation in the docs

* Add GitHub actions to Dependabot

* Add Winget Releaser workflow
2023-03-07 19:29:46 +00:00
nickelc
17ad30e514
Replace unmaintained/outdated GitHub Actions (#1317)
* Replace unmaintained/outdated GitHub Actions

* Replace `actions-rs/cargo` for `cross` usage
2023-02-28 06:47:49 -05:00
Marco Ieni
667d44c885
ci: release apple arm binary (#1239)
* ci: improve formatting

* ci.yaml: apply new formatting

* ci: release apple arm binary

* use cross for mac arm

* wip

* do not use cross

* install targets
2022-12-03 06:45:26 -08:00
Marco Ieni
d6db040421
ci: improve formatting (#1238)
* ci: improve formatting

* ci.yaml: apply new formatting
2022-11-27 12:40:07 -05:00
Dan Davison
2984a8b9d3
Change Rust toolchain in 'Deploy Manual' CI task (#1183) 2022-09-05 10:28:53 -04:00
Dan Davison
1f5ffdc306 Split README.md into mdbook manual
github actions config copied from https://github.com/Wilfred/difftastic
2022-01-15 19:27:24 -05:00
Dan Davison
67124941d5 Tweak issue template 2021-12-22 12:23:09 -05:00
Dan Davison
31481db596 Tweak issue template 2021-12-22 12:04:21 -05:00
Dan Davison
e692804991 Ignore RUSTSEC-2020-0071
- Run audit when changing audit.toml
2021-10-26 12:04:29 -04:00
Ben Armstead
ea3417abe4
Remove unnecessary borrows (#692) 2021-08-18 11:59:02 -07:00
Dan Davison
e5c6ae47d0 clippy
- Fix --allow argument added in previous commit f956a38bfc
- Fix lint
2021-08-02 16:21:06 +01:00
Dan Davison
f956a38bfc Ignore clippy needless_borrow lint failures 2021-08-02 09:12:10 +01:00
Dan Davison
4f66b7dc2d Disable docs CI check
Delta doesn't really have proper doc-oriented comments yet.
2021-06-23 05:34:42 +01:00
dependabot-preview[bot]
656a1f939d
Upgrade to GitHub-native Dependabot (#579)
Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2021-04-29 13:07:50 -04:00
Marco Ieni
feb8b12ea1
CI: check docs (#559)
* CI: check docs

* Don't use triple-slash doc comments

A full pass would need to be done to make the comments suitable for
generating documentation.

Co-authored-by: Dan Davison <dandavison7@gmail.com>
2021-04-15 18:18:16 -04:00
Dan Davison
9e53f52044 Reference correct token in bump-homebrew-formula workflow
Should fix #460. Thanks @MarcoIeni
2020-12-27 09:17:09 +00:00
Dan Davison
446ecbe3fb
Merge pull request #467 from MarcoIeni/patch-2
ci: run also on push
2020-12-26 21:37:09 +00:00
Dan Davison
3c4be772a6 CI on push-to-master and pull_request, per @MarcoIeni 2020-12-26 20:24:35 +00:00
Philippe Blain
36d8eae6b7
cd: set MACOSX_DEPLOYMENT_TARGET to 10.7 (#468)
The binary release of delta 0.4.5 for macOS created by the "Continuous
Deployment" GitHub Actions workflow does not run on older macOS, like
10.11 (El Capitan) [1].

The Rust compiler, rustc, by default, will build macOS binaries
compatible with macOS 10.7 or newer [2], [3], but some *-sys crates invoke a
C compiler and thus will target the macOS version the C compiler is
running on [4], thus limiting the compatibility of the resulting
binary. The macOS virtual machines used on GitHub Actions run macOS
10.15.7, and since delta depends on some *-sys crates, the delta binary
built by cargo targets macOS 10.15, as can be verified by using the
following command:

    $ otool -l ./target/x86_64-apple-darwin/release/delta | grep LC_BUILD_VERSION -A4
    cmd LC_BUILD_VERSION
    cmdsize 32
    platform 1
    sdk 10.15.6
    minos 10.15

or, if building locally on an older macOS versions, (here 10.11):

    $ otool -l ./target/debug/delta | grep  LC_VERSION_MIN_MACOSX -A2
    cmd LC_VERSION_MIN_MACOSX
    cmdsize 16
    version 10.11

To restore compatibility with older macOS version, explicitely set the environment
variable `MACOSX_DEPLOYMENT_TARGET` to the default for rustc, "10.7".
This will make the `clang` C compiler invoked by *-sys crates also
target 10.7, thus restoring the compatibility of the delta binary.

For simplicity, add this variable to the environment for all platforms,
which should not have any effect on non-macOS platforms.

[1] https://github.com/dandavison/delta/issues/462
[2] 65d053ab74/compiler/rustc_target/src/spec/apple_base.rs (L15-L17)
[3] 65d053ab74/compiler/rustc_target/src/spec/apple_base.rs (L53-L61)
[4] https://users.rust-lang.org/t/compile-rust-binary-for-older-versions-of-mac-osx/38695/5
2020-12-26 19:31:06 +00:00
Marco Ieni
3904beefa8
ci: run also on push 2020-12-26 12:33:28 +01:00
Marco Ieni
5e39a0e4dd
automatically publish to crates.io on tag (#419)
* automatically publish to crates.io on tag

* Update cd.yml

Add newline

Co-authored-by: Dan Davison <dandavison7@gmail.com>
2020-12-23 11:31:57 +00:00
Dan Davison
2aeec901de
Run CI on pull_request only (#450) 2020-12-16 23:18:01 +00:00
ulwlu
e0e879df24
Add cd to update brew formula in homebrew core 2020-12-13 23:48:11 +09:00
Dan Davison
d68001471d
Add test coverage of main.rs (#423)
* Refactor: pass handle to writer

* Add test of list_syntax_themes

* Add test of show_syntax_themes

* Refactor: pass writer handle

* Add test of show_config

* Exclude main function from coverage calculations

* DEBUGGING

* Refactor: only use stdin if non-empty

Motivation: in the CI test build, atty::is(stdin) seems to be
returning false.
2020-12-03 19:18:44 -05:00
Dan Davison
15d06cbf75
Disable some clippy warnings (#422) 2020-12-03 15:14:38 -05:00
Marco Ieni
2cfc0aafa4
add cd (#417)
Signed-off-by: MarcoIeni <11428655+MarcoIeni@users.noreply.github.com>
2020-12-02 09:40:17 -05:00
Marco Ieni
9d72205be8
ci: add unit tests for other linux targets (#413)
* ci: add unit tests for other linux targets

Signed-off-by: MarcoIeni <11428655+MarcoIeni@users.noreply.github.com>

* ci: runs all ubuntu configurations

Signed-off-by: MarcoIeni <11428655+MarcoIeni@users.noreply.github.com>

* ci: update matrix variables

Signed-off-by: MarcoIeni <11428655+MarcoIeni@users.noreply.github.com>

* ci: use cross for i686

Signed-off-by: MarcoIeni <11428655+MarcoIeni@users.noreply.github.com>
2020-11-29 17:47:25 -05:00
Marco Ieni
64a9027f96
GitHub Continuous Integration: run tests on linux, mac and windows (#411)
* GitHub actions: add integration tests

Signed-off-by: MarcoIeni <11428655+MarcoIeni@users.noreply.github.com>
Co-authored-by: danyspin97 <oss@danyspin97.org>
Co-authored-by: surveyor3 <samuelebertollo.sb@gmail.com>

* GitHub actions: fix jobs names

Signed-off-by: MarcoIeni <11428655+MarcoIeni@users.noreply.github.com>

* GitHub actions: remove windows from integration tests

Signed-off-by: MarcoIeni <11428655+MarcoIeni@users.noreply.github.com>
Co-authored-by: danyspin97 <oss@danyspin97.org>
Co-authored-by: surveyor3 <samuelebertollo.sb@gmail.com>

* GitHub actions: fix target variable name

Signed-off-by: MarcoIeni <11428655+MarcoIeni@users.noreply.github.com>
Co-authored-by: danyspin97 <oss@danyspin97.org>
Co-authored-by: surveyor3 <samuelebertollo.sb@gmail.com>

Co-authored-by: danyspin97 <oss@danyspin97.org>
Co-authored-by: surveyor3 <samuelebertollo.sb@gmail.com>
Co-authored-by: Dan Davison <dandavison7@gmail.com>
2020-11-28 14:48:40 -05:00
Marco Ieni
5fd7a1acea
CI: add code coverage (#409)
Signed-off-by: MarcoIeni <11428655+MarcoIeni@users.noreply.github.com>
2020-11-25 23:27:31 -05:00
Marco Ieni
68498c455a
ci: add end to end tests (#400) 2020-11-22 18:16:30 -05:00
Marco Ieni
670f5a3fe9
add audit and some CI on ubuntu (#399)
* add audit and CI on ubuntu

* revert Contents changes in README

Signed-off-by: MarcoIeni <11428655+MarcoIeni@users.noreply.github.com>

* README: restore new line

Signed-off-by: MarcoIeni <11428655+MarcoIeni@users.noreply.github.com>
2020-11-22 14:27:57 -05:00
Dan Davison
6328f98080 Edit github issue templates 2020-07-17 09:26:26 -04:00
Dan Davison
d21b8dbd08 Update bug template 2020-04-29 20:15:41 -04:00
Dan Davison
6bca6832c2 Update issue templates 2020-04-28 19:13:31 -04:00
Dan Davison
622f6b6499 Delete superfluous issue templates 2020-04-28 10:34:16 -04:00
Dan Davison
cfbabd2fb2 Update issue templates 2020-04-28 10:32:59 -04:00
Dan Davison
0038dfbe7e Update issue templates 2020-04-28 10:30:43 -04:00