1
0
mirror of https://github.com/BurntSushi/ripgrep.git synced 2025-05-13 21:26:27 +02:00

ci/release: use latest OS versions

This commit is contained in:
Andrew Gallant 2023-07-09 09:41:39 -04:00
parent 8d464e5c78
commit efb2e8ce1e

View File

@ -24,7 +24,7 @@ on:
jobs: jobs:
create-release: create-release:
name: create-release name: create-release
runs-on: ubuntu-22.04 runs-on: ubuntu-latest
# env: # env:
# Set to force version number, e.g., when no tag exists. # Set to force version number, e.g., when no tag exists.
# RG_VERSION: TEST-0.0.0 # RG_VERSION: TEST-0.0.0
@ -64,27 +64,27 @@ jobs:
build: [linux, linux-arm, macos, win-msvc, win-gnu, win32-msvc] build: [linux, linux-arm, macos, win-msvc, win-gnu, win32-msvc]
include: include:
- build: linux - build: linux
os: ubuntu-22.04 os: ubuntu-latest
rust: nightly rust: nightly
target: x86_64-unknown-linux-musl target: x86_64-unknown-linux-musl
- build: linux-arm - build: linux-arm
os: ubuntu-22.04 os: ubuntu-latest
rust: nightly rust: nightly
target: arm-unknown-linux-gnueabihf target: arm-unknown-linux-gnueabihf
- build: macos - build: macos
os: macos-12 os: macos-latest
rust: nightly rust: nightly
target: x86_64-apple-darwin target: x86_64-apple-darwin
- build: win-msvc - build: win-msvc
os: windows-2022 os: windows-latest
rust: nightly rust: nightly
target: x86_64-pc-windows-msvc target: x86_64-pc-windows-msvc
- build: win-gnu - build: win-gnu
os: windows-2022 os: windows-latest
rust: nightly-x86_64-gnu rust: nightly-x86_64-gnu
target: x86_64-pc-windows-gnu target: x86_64-pc-windows-gnu
- build: win32-msvc - build: win32-msvc
os: windows-2022 os: windows-latest
rust: nightly rust: nightly
target: i686-pc-windows-msvc target: i686-pc-windows-msvc
@ -93,12 +93,12 @@ jobs:
uses: actions/checkout@v3 uses: actions/checkout@v3
- name: Install packages (Ubuntu) - name: Install packages (Ubuntu)
if: matrix.os == 'ubuntu-22.04' if: matrix.os == 'ubuntu-latest'
run: | run: |
ci/ubuntu-install-packages ci/ubuntu-install-packages
- name: Install packages (macOS) - name: Install packages (macOS)
if: matrix.os == 'macos-12' if: matrix.os == 'macos-latest'
run: | run: |
ci/macos-install-packages ci/macos-install-packages
@ -125,8 +125,8 @@ jobs:
- name: Build release binary - name: Build release binary
run: ${{ env.CARGO }} build --verbose --release --features pcre2 ${{ env.TARGET_FLAGS }} run: ${{ env.CARGO }} build --verbose --release --features pcre2 ${{ env.TARGET_FLAGS }}
- name: Strip release binary (linux and macos) - name: Strip release binary (linux, macos and macos-arm)
if: matrix.build == 'linux' || matrix.build == 'macos' if: matrix.build == 'linux' || matrix.os == 'macos'
run: strip "target/${{ matrix.target }}/release/rg" run: strip "target/${{ matrix.target }}/release/rg"
- name: Strip release binary (arm) - name: Strip release binary (arm)
@ -150,7 +150,7 @@ jobs:
cp "$outdir"/{rg.bash,rg.fish,_rg.ps1} "$staging/complete/" cp "$outdir"/{rg.bash,rg.fish,_rg.ps1} "$staging/complete/"
cp complete/_rg "$staging/complete/" cp complete/_rg "$staging/complete/"
if [ "${{ matrix.os }}" = "windows-2022" ]; then if [ "${{ matrix.os }}" = "windows-latest" ]; then
cp "target/${{ matrix.target }}/release/rg.exe" "$staging/" cp "target/${{ matrix.target }}/release/rg.exe" "$staging/"
7z a "$staging.zip" "$staging" 7z a "$staging.zip" "$staging"
certutil -hashfile "$staging.zip" SHA256 > "$staging.zip.sha256" certutil -hashfile "$staging.zip" SHA256 > "$staging.zip.sha256"