Skip to content

Package x86_64 releases via cargo-multivers (v1/v2/v4) #2

Package x86_64 releases via cargo-multivers (v1/v2/v4)

Package x86_64 releases via cargo-multivers (v1/v2/v4) #2

name: Check
on: [push, pull_request]
env:
CARGO_TERM_COLOR: always
jobs:
check:
name: Check
runs-on: ubuntu-24.04
steps:
- name: Checkout sources
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
- name: Install stable toolchain
uses: codota/toolchain@00a8bf2bdcfe93aefd70422d3dec07337959d3a4 # v1
with:
profile: minimal
toolchain: stable
- name: Cache dependencies
uses: Swatinem/rust-cache@e18b497796c12c097a38f9edb9d0641fb99eee32 # v2
- name: Run cargo check
uses: actions-rs/cargo@844f36862e911db73fe0815f00a4a2602c279505 # v1
with:
command: check
- name: Run cargo build
uses: actions-rs/cargo@844f36862e911db73fe0815f00a4a2602c279505 # v1
with:
command: build
- name: Append usage to the README.md
shell: bash
run: .github/scripts/update-docs.sh
- name: Verify no unstaged changes
shell: bash
run: |
if [[ "$(git status --porcelain)" != "" ]]; then
echo ----------------------------------------
echo git status
echo ----------------------------------------
git status
echo ----------------------------------------
echo git diff
echo ----------------------------------------
git diff
echo ----------------------------------------
echo Troubleshooting
echo ----------------------------------------
echo '::error::Unstaged changes detected. You probably need to update the usage in the README.md. Use `.github/scripts/update-docs.sh` to update the README.'
exit 1
fi
precommit:
name: Pre-commit
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-24.04, macOS-latest]
steps:
- name: Checkout sources
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
- name: Install stable toolchain
uses: codota/toolchain@00a8bf2bdcfe93aefd70422d3dec07337959d3a4 # v1
with:
profile: minimal
toolchain: stable
- name: Cache dependencies
uses: Swatinem/rust-cache@e18b497796c12c097a38f9edb9d0641fb99eee32 # v2
- name: Run tests
run: bash src/scripts/precommit.sh