Skip to content

Commit

Permalink
Merge pull request #96 from acheronfail/next
Browse files Browse the repository at this point in the history
0.15.0
  • Loading branch information
acheronfail authored Dec 18, 2023
2 parents 946b8f5 + fae18d9 commit 2e27080
Show file tree
Hide file tree
Showing 19 changed files with 608 additions and 785 deletions.
149 changes: 76 additions & 73 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,60 @@ on:
branches:
- master
jobs:
rustfmt:
name: rustfmt
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
profile: minimal
components: rustfmt
- name: Check formatting
run: |
cargo fmt --all -- --check
readme:
name: readme
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
# cache
- uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
~/.cargo/.crates.toml
~/.cargo/.crates2.json
target/
key: ${{ runner.os }}-cargo-readme
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: nightly
override: true
profile: minimal
components: rustfmt
- name: Check readme
run: |
ci/install-packages-ubuntu.sh
cargo install just
just setup
just readme
rustup install nightly
just fmt
just check-dirty
test:
needs: ['rustfmt', 'readme']
name: test
env:
# For some builds, we use cross to test on 32-bit and big-endian
Expand All @@ -30,21 +83,19 @@ jobs:
- beta
# Our release builds are generated by a nightly compiler to take
# advantage of the latest optimizations/compile time improvements. So
# we test all of them here. (We don't do mips releases, but test on
# mips for big-endian coverage.)
# we test all of them here.
- nightly
- nightly-musl
- nightly-32
- nightly-mips
- nightly-arm
- macos
- win-msvc
- win-gnu
include:
- build: pinned
os: ubuntu-latest
# NOTE: ratatui requires 1.65.0
rust: 1.65.0
# NOTE: ripgrep requires 1.72.0
rust: 1.72.0
- build: stable
os: ubuntu-latest
rust: stable
Expand All @@ -56,22 +107,18 @@ jobs:
# NOTE: we pin to a specific version since sometimes things fail to compile on the latest nightly builds
- build: nightly
os: ubuntu-latest
rust: nightly-2023-04-16
rust: nightly-2023-12-04
- build: nightly-musl
os: ubuntu-latest
rust: nightly-2023-04-16
rust: nightly-2023-12-04
target: x86_64-unknown-linux-musl
- build: nightly-32
os: ubuntu-latest
rust: nightly-2023-04-16
rust: nightly-2023-12-04
target: i686-unknown-linux-gnu
- build: nightly-mips
os: ubuntu-latest
rust: nightly-2023-04-16
target: mips64-unknown-linux-gnuabi64
- build: nightly-arm
os: ubuntu-latest
rust: nightly-2023-04-16
rust: nightly-2023-12-04
# For stripping release binaries:
# docker run --rm -v $PWD/target:/target:Z \
# rustembedded/cross:arm-unknown-linux-gnueabihf \
Expand All @@ -80,19 +127,32 @@ jobs:
target: arm-unknown-linux-gnueabihf
- build: macos
os: macos-latest
rust: nightly-2023-04-16
rust: nightly-2023-12-04
- build: win-msvc
os: windows-2019
rust: nightly-2023-04-16
rust: nightly-2023-12-04
- build: win-gnu
os: windows-2019
rust: nightly-2023-04-16-x86_64-gnu
rust: nightly-2023-12-04-x86_64-gnu
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
submodules: recursive

# cache
- uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
~/.cargo/.crates.toml
~/.cargo/.crates2.json
target/
key: ${{ runner.os }}-cargo-${{ matrix.build }}

- name: Install packages (Ubuntu)
if: matrix.os == 'ubuntu-latest'
run: |
Expand Down Expand Up @@ -147,60 +207,3 @@ jobs:
- name: Run tests (with cross)
if: matrix.target != ''
run: ${{ env.CARGO }} test --verbose --all ${{ env.TARGET_FLAGS }}

- name: Test for existence of build artifacts (Windows)
if: matrix.os == 'windows-2019'
shell: bash
run: |
outdir="$(ci/cargo-out-dir.sh "${{ env.TARGET_DIR }}")"
ls "$outdir/_rgr.ps1" && file "$outdir/_rgr.ps1"
- name: Test for existence of build artifacts (Unix)
if: matrix.os != 'windows-2019'
shell: bash
run: |
outdir="$(ci/cargo-out-dir.sh "${{ env.TARGET_DIR }}")"
for f in rgr.1 _rgr rgr.bash rgr.fish; do
# We could use file -E here, but it isn't supported on macOS.
ls "$outdir/$f" && file "$outdir/$f"
done
rustfmt:
name: rustfmt
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
profile: minimal
components: rustfmt
- name: Check formatting
run: |
cargo fmt --all -- --check
readme:
name: readme
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: nightly
override: true
profile: minimal
components: rustfmt
- name: Check readme
run: |
ci/install-packages-ubuntu.sh
cargo install just
just setup
just readme
rustup install nightly
just fmt
just check-dirty
38 changes: 31 additions & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,31 +73,31 @@ jobs:
# NOTE: we pin to a specific version since sometimes things fail to compile on the latest nightly builds
- build: linux-gnu
os: ubuntu-latest
rust: nightly-2023-04-16
rust: nightly-2023-12-04
target: x86_64-unknown-linux-gnu
- build: linux-musl
os: ubuntu-latest
rust: nightly-2023-04-16
rust: nightly-2023-12-04
target: x86_64-unknown-linux-musl
- build: linux-arm-gnueabihf
os: ubuntu-latest
rust: nightly-2023-04-16
rust: nightly-2023-12-04
target: arm-unknown-linux-gnueabihf
- build: macos
os: macos-latest
rust: nightly-2023-04-16
rust: nightly-2023-12-04
target: x86_64-apple-darwin
- build: win-msvc
os: windows-2019
rust: nightly-2023-04-16
rust: nightly-2023-12-04
target: x86_64-pc-windows-msvc
- build: win-gnu
os: windows-2019
rust: nightly-2023-04-16-x86_64-gnu
rust: nightly-2023-12-04-x86_64-gnu
target: x86_64-pc-windows-gnu
- build: win32-msvc
os: windows-2019
rust: nightly-2023-04-16
rust: nightly-2023-12-04
target: i686-pc-windows-msvc

steps:
Expand Down Expand Up @@ -125,6 +125,25 @@ jobs:
override: true
target: ${{ matrix.target }}

# cache
- uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
~/.cargo/.crates.toml
~/.cargo/.crates2.json
target/
key: ${{ runner.os }}-cargo-${{ matrix.target }}

# We install ripgrep via cargo to get the latest version (we need at least 14)
# since ubuntu is still on 13 (at least it is while this is being written...)
# We need 14 in order to generate completion files.
- name: Install ripgrep
run: cargo install ripgrep

- name: Use Cross
run: |
cargo install cross
Expand Down Expand Up @@ -184,6 +203,11 @@ jobs:
staging="repgrep-${{ env.RELEASE_VERSION }}-${{ matrix.target }}"
mkdir -p "$staging"/{complete,doc}
echo 'complete -F _rg rgr' > "${outdir}/rgr.bash"
echo 'compdef $_comps[rg] rgr' > "${outdir}/_rgr"
rg --generate complete-fish | sed 's/-c rg/-c rgr/' > "${outdir}/rgr.fish"
rg --generate complete-powershell | sed "s/'rg'/'rgr'/" > "${outdir}/_rgr.ps1"
cp {LICENSE-*,CHANGELOG.md,README.md} "$staging/doc/"
cp "$outdir"/{_rgr,rgr.bash,rgr.fish,_rgr.ps1} "$staging/complete/"
Expand Down
1 change: 1 addition & 0 deletions .hidden
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
is this hidden?
15 changes: 15 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
# 0.15.0

- fae13fc don't treat patterns as regexes if --fixed-strings is passed
- fae1e2b refactor argument parsing and remove (broken) stdin things
- fae1696 fix an issue with capturing not working as expected
- fae11c0 ensure we capture -h, -v and --version
- fae1ed5 update how completions are generated since we no longer use clap
- fae1341 support reading RIPGREP_CONFIG_FILE for arguments
- fae1567 update README.md
- fae1d8f update DEVELOPMENT_NOTES.md
- fae1b324 update ci to run fmt and readme checks before tests
- 946b8f5 Merge pull request #95 from herbygillot/docs-macports-install
- fae1b328 update docs with macports instructions
- 1741e0d docs: add MacPorts install instructions

# 0.14.3

- 2b2e896 Merge pull request #93 from a-kenji/chore/move-to-ratatui
Expand Down
Loading

0 comments on commit 2e27080

Please sign in to comment.