Skip to content

Commit df47f5d

Browse files
committed
Merge remote-tracking branch 'origin/feat-sort-branch' into feat-sort-branch
2 parents c87ee79 + cec6a9e commit df47f5d

File tree

18 files changed

+284
-80
lines changed

18 files changed

+284
-80
lines changed

.github/workflows/cd.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,16 +68,16 @@ jobs:
6868
6969
- name: Build Release Mac
7070
if: matrix.os == 'macos-latest'
71-
run: make release-mac
71+
run: GITUI_RELEASE=1 make release-mac
7272
- name: Build Release Linux
7373
if: matrix.os == 'ubuntu-latest'
74-
run: make release-linux-musl
74+
run: GITUI_RELEASE=1 make release-linux-musl
7575
- name: Build Release Win
7676
if: matrix.os == 'windows-latest'
77-
run: make release-win
77+
run: GITUI_RELEASE=1 make release-win
7878
- name: Build Release Linux ARM
7979
if: matrix.os == 'ubuntu-22.04'
80-
run: make release-linux-arm
80+
run: GITUI_RELEASE=1 make release-linux-arm
8181

8282
- name: Set SHA
8383
if: matrix.os == 'macos-latest'

.github/workflows/ci.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: CI
22

33
on:
44
schedule:
5-
- cron: '0 2 * * *' # run at 2 AM UTC
5+
- cron: '0 2 * * *'
66
push:
77
branches: [ '*' ]
88
pull_request:
@@ -78,8 +78,8 @@ jobs:
7878
run: |
7979
cargo install cargo-wix --version 0.3.3
8080
cargo wix --version
81-
cargo wix -p gitui --no-build --nocapture --output ./target/wix/gitui.msi
82-
ls -l ./target/wix/gitui.msi
81+
cargo wix -p gitui --no-build --nocapture --output ./target/wix/gitui-win.msi
82+
ls -l ./target/wix/gitui-win.msi
8383
8484
build-linux-musl:
8585
runs-on: ubuntu-latest
@@ -103,7 +103,7 @@ jobs:
103103
with:
104104
toolchain: ${{ matrix.rust }}
105105
targets: x86_64-unknown-linux-musl
106-
106+
107107
# The build would fail without manually installing the target.
108108
# https://github.com/dtolnay/rust-toolchain/issues/83
109109
- name: Manually install target
@@ -219,10 +219,10 @@ jobs:
219219

220220
- name: Install Rust
221221
uses: dtolnay/rust-toolchain@nightly
222-
222+
223223
- name: build cargo-udeps
224224
run: cargo install --git https://github.com/est31/cargo-udeps --locked
225-
225+
226226
- name: run cargo-udeps
227227
run: cargo +nightly udeps --all-targets
228228

.github/workflows/nightly.yml

Lines changed: 119 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,119 @@
1+
name: Build Nightly Releases
2+
3+
on:
4+
schedule:
5+
- cron: '0 3 * * *'
6+
workflow_dispatch:
7+
8+
env:
9+
CARGO_TERM_COLOR: always
10+
AWS_BUCKET_NAME: s3://gitui/nightly/
11+
12+
jobs:
13+
release:
14+
strategy:
15+
fail-fast: false
16+
matrix:
17+
os: [
18+
ubuntu-latest, macos-latest, windows-latest, ubuntu-22.04
19+
]
20+
runs-on: ${{ matrix.os }}
21+
22+
steps:
23+
- uses: actions/checkout@v4
24+
25+
- name: Restore cargo cache
26+
uses: Swatinem/rust-cache@v2
27+
env:
28+
cache-name: ci
29+
with:
30+
shared-key: ${{ matrix.os }}-${{ env.cache-name }}-stable
31+
32+
- name: Install Rust
33+
uses: dtolnay/rust-toolchain@stable
34+
with:
35+
components: clippy
36+
37+
# ideally we trigger the nightly build/deploy only if the normal nightly CI finished successfully
38+
- name: Run tests
39+
if: matrix.os != 'ubuntu-22.04'
40+
run: make test
41+
- name: Run clippy
42+
if: matrix.os != 'ubuntu-22.04'
43+
run: |
44+
cargo clean
45+
make clippy
46+
47+
- name: Setup MUSL
48+
if: matrix.os == 'ubuntu-latest'
49+
run: |
50+
rustup target add x86_64-unknown-linux-musl
51+
sudo apt-get -qq install musl-tools
52+
53+
- name: Setup ARM toolchain
54+
if: matrix.os == 'ubuntu-22.04'
55+
run: |
56+
rustup target add aarch64-unknown-linux-gnu
57+
rustup target add armv7-unknown-linux-gnueabihf
58+
rustup target add arm-unknown-linux-gnueabihf
59+
60+
curl -o $GITHUB_WORKSPACE/aarch64.tar.xz https://armkeil.blob.core.windows.net/developer/Files/downloads/gnu-a/8.2-2018.08/gcc-arm-8.2-2018.08-x86_64-aarch64-linux-gnu.tar.xz
61+
curl -o $GITHUB_WORKSPACE/arm.tar.xz https://armkeil.blob.core.windows.net/developer/Files/downloads/gnu-a/8.2-2018.08/gcc-arm-8.2-2018.08-x86_64-arm-linux-gnueabihf.tar.xz
62+
63+
tar xf $GITHUB_WORKSPACE/aarch64.tar.xz
64+
tar xf $GITHUB_WORKSPACE/arm.tar.xz
65+
66+
echo "$GITHUB_WORKSPACE/gcc-arm-8.2-2018.08-x86_64-aarch64-linux-gnu/bin" >> $GITHUB_PATH
67+
echo "$GITHUB_WORKSPACE/gcc-arm-8.2-2018.08-x86_64-arm-linux-gnueabihf/bin" >> $GITHUB_PATH
68+
69+
- name: Build Release Mac
70+
if: matrix.os == 'macos-latest'
71+
run: make release-mac
72+
- name: Build Release Linux
73+
if: matrix.os == 'ubuntu-latest'
74+
run: make release-linux-musl
75+
- name: Build Release Win
76+
if: matrix.os == 'windows-latest'
77+
run: make release-win
78+
- name: Build Release Linux ARM
79+
if: matrix.os == 'ubuntu-22.04'
80+
run: make release-linux-arm
81+
82+
- name: Ubuntu 22.04 Upload Artifact
83+
if: matrix.os == 'ubuntu-22.04'
84+
env:
85+
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_KEY_ID }}
86+
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_KEY_SECRET }}
87+
AWS_DEFAULT_REGION: ${{ secrets.AWS_REGION }}
88+
run: |
89+
aws s3 cp ./release/gitui-linux-armv7.tar.gz $AWS_BUCKET_NAME
90+
aws s3 cp ./release/gitui-linux-arm.tar.gz $AWS_BUCKET_NAME
91+
aws s3 cp ./release/gitui-linux-aarch64.tar.gz $AWS_BUCKET_NAME
92+
93+
- name: Ubuntu Latest Upload Artifact
94+
if: matrix.os == 'ubuntu-latest'
95+
env:
96+
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_KEY_ID }}
97+
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_KEY_SECRET }}
98+
AWS_DEFAULT_REGION: ${{ secrets.AWS_REGION }}
99+
run: |
100+
aws s3 cp ./release/gitui-linux-x86_64.tar.gz $AWS_BUCKET_NAME
101+
102+
- name: MacOS Upload Artifact
103+
if: matrix.os == 'macos-latest'
104+
env:
105+
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_KEY_ID }}
106+
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_KEY_SECRET }}
107+
AWS_DEFAULT_REGION: ${{ secrets.AWS_REGION }}
108+
run: |
109+
aws s3 cp ./release/gitui-mac.tar.gz $AWS_BUCKET_NAME
110+
111+
- name: Windows Upload Artifact
112+
if: matrix.os == 'windows-latest'
113+
env:
114+
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_KEY_ID }}
115+
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_KEY_SECRET }}
116+
AWS_DEFAULT_REGION: ${{ secrets.AWS_REGION }}
117+
run: |
118+
aws s3 cp ./release/gitui-win.msi $env:AWS_BUCKET_NAME
119+
aws s3 cp ./release/gitui-win.tar.gz $env:AWS_BUCKET_NAME

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,18 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
88
## Unreleased
99

1010
### Added
11+
* provide nightly builds (see [NIGHTLIES.md](./NIGHTLIES.md)) ([#2083](https://github.com/extrawurst/gitui/issues/2083))
1112
* sign commits using openpgp [[@hendrikmaus](https://github.com/hendrikmaus)] ([#97](https://github.com/extrawurst/gitui/issues/97))
13+
* support `core.commitChar` filtering [[@concelare](https://github.com/concelare)] ([#2136](https://github.com/extrawurst/gitui/issues/2136))
14+
* more version info in `gitui -V` and `help popup` (including git hash)
1215
* add sort_by popup to branchlist [[@UUGTech](https://github.com/UUGTech)]([#2146](https://github.com/extrawurst/gitui/issues/2146))
1316

1417
### Changed
1518
* Make info and error message popups scrollable [[@MichaelAug](https://github.com/MichaelAug)] ([#1138](https://github.com/extrawurst/gitui/issues/1138))
19+
* clarify `x86_64` linux binary in artifact names: `gitui-linux-x86_64.tar.gz` (formerly known as `musl`) ([#2148](https://github.com/extrawurst/gitui/issues/2148))
20+
21+
### Fixes
22+
* add syntax highlighting support for more file types, e.g. Typescript, TOML, etc. [[@martihomssoler](https://github.com/martihomssoler)] ([#2005](https://github.com/extrawurst/gitui/issues/2005))
1623

1724
## [0.25.2] - 2024-03-22
1825

Cargo.lock

Lines changed: 31 additions & 14 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ readme = "README.md"
1212
license = "MIT"
1313
categories = ["command-line-utilities"]
1414
keywords = ["git", "gui", "cli", "terminal", "ui"]
15+
build = "build.rs"
1516

1617
[dependencies]
1718
anyhow = "1.0"
@@ -57,6 +58,7 @@ syntect = { version = "5.2", default-features = false, features = [
5758
"html",
5859
] }
5960
tui-textarea = "0.4.0"
61+
two-face = { version = "0.3.0", default-features = false }
6062
unicode-segmentation = "1.11"
6163
unicode-truncate = "0.2"
6264
unicode-width = "0.1"
@@ -66,15 +68,18 @@ which = "6.0"
6668
pretty_assertions = "1.4"
6769
tempfile = "3"
6870

71+
[build-dependencies]
72+
chrono = { version = "0.4", default-features = false, features = ["clock"] }
73+
6974
[badges]
7075
maintenance = { status = "actively-developed" }
7176

7277
[features]
7378
default = ["ghemoji", "regex-fancy", "trace-libgit", "vendor-openssl"]
7479
ghemoji = ["gh-emoji"]
7580
# regex-* features are mutually exclusive.
76-
regex-fancy = ["syntect/regex-fancy"]
77-
regex-onig = ["syntect/regex-onig"]
81+
regex-fancy = ["syntect/regex-fancy", "two-face/syntect-fancy"]
82+
regex-onig = ["syntect/regex-onig", "two-face/syntect-onig"]
7883
timing = ["scopetime/enabled"]
7984
trace-libgit = ["asyncgit/trace-libgit"]
8085
vendor-openssl = ["asyncgit/vendor-openssl"]

Makefile

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ ARGS=-l
77
# ARGS=-l -d ~/code/git-bare-test.git -w ~/code/git-bare-test
88

99
profile:
10-
sudo CARGO_PROFILE_RELEASE_DEBUG=true cargo flamegraph --features timing -- ${ARGS}
10+
CARGO_PROFILE_RELEASE_DEBUG=true cargo flamegraph --features timing -- ${ARGS}
1111

1212
run-timing:
1313
cargo run --features=timing --release -- ${ARGS}
@@ -30,13 +30,13 @@ release-win: build-release
3030
mkdir -p release
3131
tar -C ./target/release/ -czvf ./release/gitui-win.tar.gz ./gitui.exe
3232
cargo install cargo-wix --version 0.3.3
33-
cargo wix -p gitui --no-build --nocapture --output ./release/gitui.msi
34-
ls -l ./release/gitui.msi
33+
cargo wix -p gitui --no-build --nocapture --output ./release/gitui-win.msi
34+
ls -l ./release/gitui-win.msi
3535

3636
release-linux-musl: build-linux-musl-release
3737
strip target/x86_64-unknown-linux-musl/release/gitui
3838
mkdir -p release
39-
tar -C ./target/x86_64-unknown-linux-musl/release/ -czvf ./release/gitui-linux-musl.tar.gz ./gitui
39+
tar -C ./target/x86_64-unknown-linux-musl/release/ -czvf ./release/gitui-linux-x86_64.tar.gz ./gitui
4040

4141
build-linux-musl-debug:
4242
cargo build --target=x86_64-unknown-linux-musl
@@ -100,4 +100,4 @@ licenses:
100100
cargo bundle-licenses --format toml --output THIRDPARTY.toml
101101

102102
clean:
103-
cargo clean
103+
cargo clean

0 commit comments

Comments
 (0)