Skip to content

Refrain from compiling debug-level messages out of release build #263

Refrain from compiling debug-level messages out of release build

Refrain from compiling debug-level messages out of release build #263

Workflow file for this run

name: build
on: [push, pull_request]
env:
CARGO_TERM_COLOR: always
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- os: windows-latest
target: x86_64-pc-windows-msvc
artifact_name: git-absorb.exe
- os: ubuntu-latest
target: x86_64-unknown-linux-gnu
artifact_name: git-absorb
- os: macos-15-intel
target: x86_64-apple-darwin
artifact_name: git-absorb
- os: macos-latest
target: aarch64-apple-darwin
artifact_name: git-absorb
steps:
- uses: actions/checkout@v4
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.target }}
- name: Build
run: cargo build --release --verbose --target ${{ matrix.target }}
- name: Run tests
run: cargo test --verbose --target ${{ matrix.target }}
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: git-absorb-${{ matrix.target }}
path: target/${{ matrix.target }}/release/${{ matrix.artifact_name }}
check-format:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Check format
run: cargo fmt --check
check-clippy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Check clippy lints
run: cargo clippy
build-man-page:
name: build-man-page
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup environment
run: |
sudo apt-get update
sudo apt-get --assume-yes --no-install-recommends install asciidoc
- name: Build from asciidoc
working-directory: ./Documentation
run: make
- name: Upload man page as artifact
uses: actions/upload-artifact@v4
with:
path: Documentation/git-absorb.1
name: git-absorb.1
- name: Upload HTML docs page as artifact
uses: actions/upload-artifact@v4
with:
path: Documentation/git-absorb.html
name: git-absorb.html