[main] Author commits with the GitHub noreply address #1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| workflow_dispatch: | |
| env: | |
| CARGO_TERM_COLOR: always | |
| jobs: | |
| check: | |
| name: fmt + clippy + tests | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install Rust | |
| run: | | |
| rustup toolchain install stable --profile minimal \ | |
| --component rustfmt,clippy | |
| rustup default stable | |
| - uses: Swatinem/rust-cache@v2 | |
| # Same gate as `make check`, split so failures are readable in the UI. | |
| - run: cargo fmt --check | |
| - run: cargo clippy --all-targets -- -D warnings | |
| - run: cargo test | |
| build-musl: | |
| name: static musl binary | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install Rust | |
| run: | | |
| rustup toolchain install stable --profile minimal | |
| rustup default stable | |
| rustup target add x86_64-unknown-linux-musl | |
| - uses: Swatinem/rust-cache@v2 | |
| - run: cargo build --release --target x86_64-unknown-linux-musl | |
| # The README promises a small, fully static binary; fail if that regresses. | |
| - name: Verify the binary is statically linked | |
| run: | | |
| bin=target/x86_64-unknown-linux-musl/release/codexbar-systray | |
| ls -lh "$bin" | |
| ldd "$bin" 2>&1 | tee /tmp/ldd.txt | |
| grep -q 'statically linked\|not a dynamic executable' /tmp/ldd.txt | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: codexbar-systray-x86_64-linux-musl | |
| path: target/x86_64-unknown-linux-musl/release/codexbar-systray | |
| if-no-files-found: error |