Skip to content

Commit 996607e

Browse files
committed
Merge remote-tracking branch 'upstream/master' into add-first-snapshot-tests-using-insta
2 parents 2a80442 + b1db21e commit 996607e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

68 files changed

+2575
-961
lines changed

.clippy.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
msrv = "1.82.0"
1+
msrv = "1.88.0"
22
cognitive-complexity-threshold = 18

.github/workflows/cd.yml

Lines changed: 118 additions & 116 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@ name: CD
22

33
on:
44
push:
5-
tags:
6-
- '*'
5+
tags:
6+
- "*"
77
workflow_dispatch:
8-
8+
99
permissions:
1010
contents: write
11-
11+
1212
jobs:
1313
release:
1414
strategy:
@@ -18,115 +18,117 @@ jobs:
1818
runs-on: ${{ matrix.os }}
1919

2020
steps:
21-
- uses: actions/checkout@v4
22-
23-
- name: Get version
24-
id: get_version
25-
run: echo "version=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_OUTPUT
26-
27-
- name: Restore cargo cache
28-
uses: Swatinem/rust-cache@v2
29-
env:
30-
cache-name: ci
31-
with:
32-
shared-key: ${{ matrix.os }}-${{ env.cache-name }}-stable
33-
34-
- name: Install Rust
35-
uses: dtolnay/rust-toolchain@stable
36-
with:
37-
components: clippy
38-
39-
- name: Build
40-
if: matrix.os != 'ubuntu-22.04'
41-
env:
42-
GITUI_RELEASE: 1
43-
run: cargo build
44-
- name: Run tests
45-
if: matrix.os != 'ubuntu-22.04'
46-
run: make test
47-
- name: Run clippy
48-
if: matrix.os != 'ubuntu-22.04'
49-
run: |
50-
cargo clean
51-
make clippy
52-
53-
- name: Setup MUSL
54-
if: matrix.os == 'ubuntu-latest'
55-
run: |
56-
rustup target add x86_64-unknown-linux-musl
57-
sudo apt-get -qq install musl-tools
58-
59-
- name: Setup ARM toolchain
60-
if: matrix.os == 'ubuntu-22.04'
61-
run: |
62-
rustup target add aarch64-unknown-linux-gnu
63-
rustup target add armv7-unknown-linux-gnueabihf
64-
rustup target add arm-unknown-linux-gnueabihf
65-
66-
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
67-
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
68-
69-
tar xf $GITHUB_WORKSPACE/aarch64.tar.xz
70-
tar xf $GITHUB_WORKSPACE/arm.tar.xz
71-
72-
echo "$GITHUB_WORKSPACE/gcc-arm-8.2-2018.08-x86_64-aarch64-linux-gnu/bin" >> $GITHUB_PATH
73-
echo "$GITHUB_WORKSPACE/gcc-arm-8.2-2018.08-x86_64-arm-linux-gnueabihf/bin" >> $GITHUB_PATH
74-
75-
- name: Build Release Mac
76-
if: matrix.os == 'macos-latest'
77-
env:
78-
GITUI_RELEASE: 1
79-
run: make release-mac
80-
- name: Build Release Mac x86
81-
if: matrix.os == 'macos-latest'
82-
env:
83-
GITUI_RELEASE: 1
84-
run: |
85-
rustup target add x86_64-apple-darwin
86-
make release-mac-x86
87-
- name: Build Release Linux
88-
if: matrix.os == 'ubuntu-latest'
89-
env:
90-
GITUI_RELEASE: 1
91-
run: make release-linux-musl
92-
- name: Build Release Win
93-
if: matrix.os == 'windows-latest'
94-
env:
95-
GITUI_RELEASE: 1
96-
run: make release-win
97-
- name: Build Release Linux ARM
98-
if: matrix.os == 'ubuntu-22.04'
99-
env:
100-
GITUI_RELEASE: 1
101-
run: make release-linux-arm
102-
103-
- name: Set SHA
104-
if: matrix.os == 'macos-latest'
105-
id: shasum
106-
run: |
107-
echo sha="$(shasum -a 256 ./release/gitui-mac.tar.gz | awk '{printf $1}')" >> $GITHUB_OUTPUT
108-
109-
- name: Extract release notes
110-
if: matrix.os == 'ubuntu-latest'
111-
id: release_notes
112-
uses: ffurrer2/extract-release-notes@v2
113-
114-
- name: Release
115-
uses: softprops/action-gh-release@v2
116-
with:
117-
body: ${{ steps.release_notes.outputs.release_notes }}
118-
prerelease: ${{ contains(github.ref, '-') }}
119-
files: |
120-
./release/*.tar.gz
121-
./release/*.zip
122-
./release/*.msi
123-
124-
- name: Bump homebrew-core formula
125-
uses: mislav/bump-homebrew-formula-action@v3
126-
if: "matrix.os == 'macos-latest' && !contains(github.ref, '-')" # skip prereleases
127-
env:
128-
COMMITTER_TOKEN: ${{ secrets.BREW_TOKEN }}
129-
with:
130-
formula-name: gitui
131-
# https://github.com/mislav/bump-homebrew-formula-action/issues/58
132-
formula-path: Formula/g/gitui.rb
21+
- uses: actions/checkout@v4
22+
23+
- name: Get version
24+
id: get_version
25+
run: echo "version=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_OUTPUT
26+
27+
- name: Restore cargo cache
28+
uses: Swatinem/rust-cache@v2
29+
env:
30+
cache-name: ci
31+
with:
32+
shared-key: ${{ matrix.os }}-${{ env.cache-name }}-stable
33+
34+
- name: Install Rust
35+
uses: dtolnay/rust-toolchain@stable
36+
with:
37+
components: clippy
38+
39+
- uses: taiki-e/install-action@nextest
40+
41+
- name: Build
42+
if: matrix.os != 'ubuntu-22.04'
43+
env:
44+
GITUI_RELEASE: 1
45+
run: cargo build
46+
- name: Run tests
47+
if: matrix.os != 'ubuntu-22.04'
48+
run: make test
49+
- name: Run clippy
50+
if: matrix.os != 'ubuntu-22.04'
51+
run: |
52+
cargo clean
53+
make clippy
54+
55+
- name: Setup MUSL
56+
if: matrix.os == 'ubuntu-latest'
57+
run: |
58+
rustup target add x86_64-unknown-linux-musl
59+
sudo apt-get -qq install musl-tools
60+
61+
- name: Setup ARM toolchain
62+
if: matrix.os == 'ubuntu-22.04'
63+
run: |
64+
rustup target add aarch64-unknown-linux-gnu
65+
rustup target add armv7-unknown-linux-gnueabihf
66+
rustup target add arm-unknown-linux-gnueabihf
67+
68+
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
69+
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
70+
71+
tar xf $GITHUB_WORKSPACE/aarch64.tar.xz
72+
tar xf $GITHUB_WORKSPACE/arm.tar.xz
73+
74+
echo "$GITHUB_WORKSPACE/gcc-arm-8.2-2018.08-x86_64-aarch64-linux-gnu/bin" >> $GITHUB_PATH
75+
echo "$GITHUB_WORKSPACE/gcc-arm-8.2-2018.08-x86_64-arm-linux-gnueabihf/bin" >> $GITHUB_PATH
76+
77+
- name: Build Release Mac
78+
if: matrix.os == 'macos-latest'
79+
env:
80+
GITUI_RELEASE: 1
81+
run: make release-mac
82+
- name: Build Release Mac x86
83+
if: matrix.os == 'macos-latest'
84+
env:
85+
GITUI_RELEASE: 1
86+
run: |
87+
rustup target add x86_64-apple-darwin
88+
make release-mac-x86
89+
- name: Build Release Linux
90+
if: matrix.os == 'ubuntu-latest'
91+
env:
92+
GITUI_RELEASE: 1
93+
run: make release-linux-musl
94+
- name: Build Release Win
95+
if: matrix.os == 'windows-latest'
96+
env:
97+
GITUI_RELEASE: 1
98+
run: make release-win
99+
- name: Build Release Linux ARM
100+
if: matrix.os == 'ubuntu-22.04'
101+
env:
102+
GITUI_RELEASE: 1
103+
run: make release-linux-arm
104+
105+
- name: Set SHA
106+
if: matrix.os == 'macos-latest'
107+
id: shasum
108+
run: |
109+
echo sha="$(shasum -a 256 ./release/gitui-mac.tar.gz | awk '{printf $1}')" >> $GITHUB_OUTPUT
110+
111+
- name: Extract release notes
112+
if: matrix.os == 'ubuntu-latest'
113+
id: release_notes
114+
uses: ffurrer2/extract-release-notes@v2
115+
116+
- name: Release
117+
uses: softprops/action-gh-release@v2
118+
with:
119+
body: ${{ steps.release_notes.outputs.release_notes }}
120+
prerelease: ${{ contains(github.ref, '-') }}
121+
files: |
122+
./release/*.tar.gz
123+
./release/*.zip
124+
./release/*.msi
125+
126+
- name: Bump homebrew-core formula
127+
uses: mislav/bump-homebrew-formula-action@v3
128+
if: "matrix.os == 'macos-latest' && !contains(github.ref, '-')" # skip prereleases
129+
env:
130+
COMMITTER_TOKEN: ${{ secrets.BREW_TOKEN }}
131+
with:
132+
formula-name: gitui
133+
# https://github.com/mislav/bump-homebrew-formula-action/issues/58
134+
formula-path: Formula/g/gitui.rb

.github/workflows/ci.yml

Lines changed: 20 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
fail-fast: false
1818
matrix:
1919
os: [ubuntu-latest, macos-latest, windows-latest]
20-
rust: [nightly, stable, "1.82"]
20+
rust: [nightly, stable, "1.88"]
2121
runs-on: ${{ matrix.os }}
2222
continue-on-error: ${{ matrix.rust == 'nightly' }}
2323

@@ -47,6 +47,8 @@ jobs:
4747
- name: Rustup Show
4848
run: rustup show
4949

50+
- uses: taiki-e/install-action@nextest
51+
5052
- name: Build Debug
5153
run: |
5254
cargo build
@@ -92,7 +94,7 @@ jobs:
9294
strategy:
9395
fail-fast: false
9496
matrix:
95-
rust: [nightly, stable, "1.82"]
97+
rust: [nightly, stable, "1.88"]
9698
continue-on-error: ${{ matrix.rust == 'nightly' }}
9799
steps:
98100
- uses: actions/checkout@v4
@@ -121,6 +123,8 @@ jobs:
121123
- name: Rustup Show
122124
run: rustup show
123125

126+
- uses: taiki-e/install-action@nextest
127+
124128
- name: Setup MUSL
125129
run: |
126130
sudo apt-get -qq install musl-tools
@@ -144,7 +148,7 @@ jobs:
144148
strategy:
145149
fail-fast: false
146150
matrix:
147-
rust: [nightly, stable, "1.82"]
151+
rust: [nightly, stable, "1.88"]
148152
continue-on-error: ${{ matrix.rust == 'nightly' }}
149153
steps:
150154
- uses: actions/checkout@v4
@@ -195,7 +199,7 @@ jobs:
195199
strategy:
196200
fail-fast: false
197201
matrix:
198-
rust: [nightly, stable, "1.82"]
202+
rust: [nightly, stable, "1.88"]
199203
continue-on-error: ${{ matrix.rust == 'nightly' }}
200204
steps:
201205
- uses: actions/checkout@v4
@@ -249,10 +253,16 @@ jobs:
249253

250254
- run: cargo fmt -- --check
251255

252-
- name: cargo-sort
256+
- name: tombi install
257+
uses: tombi-toml/setup-tombi@v1
258+
env:
259+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
260+
with:
261+
version: '0.9.0'
262+
263+
- name: tombi check
253264
run: |
254-
cargo install cargo-sort --force
255-
cargo sort -c -w
265+
tombi format --check
256266
257267
- name: cargo-deny install
258268
run: |
@@ -303,26 +313,13 @@ jobs:
303313
name: Test Homebrew Formula (macOS)
304314
runs-on: macos-latest
305315
steps:
306-
- name: Checkout code
307-
uses: actions/checkout@v4
316+
- name: Set up Homebrew
317+
uses: Homebrew/actions/setup-homebrew@master
308318

309319
- name: Install stable Rust
310320
uses: actions-rs/toolchain@v1
311321
with:
312322
toolchain: stable
313323

314-
- name: Install Homebrew
315-
run: /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
316-
317-
- name: Set up Homebrew in PATH
318-
run: |
319-
echo "$HOMEBREW_PREFIX/bin:$HOMEBREW_PREFIX/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin" >> $GITHUB_PATH
320-
321-
- name: Update Homebrew
322-
run: brew update
323-
324324
- name: Let Homebrew build gitui from source
325-
run: brew install --head --build-from-source gitui
326-
327-
- name: Run Homebrew test
328-
run: brew test gitui
325+
run: brew install --build-from-source gitui

0 commit comments

Comments
 (0)