mirror of
https://github.com/aziascreations/BakaShrot.git
synced 2026-11-23 20:58:46 +01:00
68966a8031
Step 11: the servers replicate by name (push_to and accept_from), their messages and attachments, damaged copies asked for again. Step 12: the server stops cleanly on SIGTERM/SIGINT (Ctrl+C, Ctrl+Break and the console closing on Windows), committing what was queued; logs go to the console, BAKASHROT_LOG sets the level. release.py builds a release per platform (the programs, the DLL, a Python wheel with the library, THIRD-PARTY.txt) and smoke-tests it; CI runs it on v* tags. Built for size (opt-level "s"): 25-31% smaller. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
72 lines
2.3 KiB
YAML
72 lines
2.3 KiB
YAML
# The new sources (Source/): the same checks as Source/check.ps1, on Windows
|
|
# and Linux; a release of each (Source/release.py) on a version tag or when
|
|
# run by hand. Gitea Actions runs this file too.
|
|
name: Source
|
|
|
|
on:
|
|
push:
|
|
branches: ["**"]
|
|
# Tags aren't filtered by paths.
|
|
tags: ["v*"]
|
|
paths: ["Source/**", ".github/workflows/source.yml"]
|
|
pull_request:
|
|
paths: ["Source/**", ".github/workflows/source.yml"]
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
check:
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
os: [windows-latest, ubuntu-latest]
|
|
runs-on: ${{ matrix.os }}
|
|
defaults:
|
|
run:
|
|
working-directory: Source
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
# Installs the toolchain Source/rust-toolchain.toml pins.
|
|
- run: rustup toolchain install
|
|
- run: cargo fmt --all -- --check
|
|
- run: cargo clippy --workspace --all-targets --all-features -- -D warnings
|
|
- run: cargo test --workspace --all-features
|
|
- run: cargo doc --workspace --no-deps --all-features
|
|
env:
|
|
RUSTDOCFLAGS: -D warnings
|
|
|
|
release:
|
|
# Build, package, smoke test: target/dist/'s archive, kept as an
|
|
# artifact. Linux builds in manylinux 2.28 (glibc 2.28): the programs,
|
|
# the .so and the wheel run on systems that old.
|
|
if: github.event_name == 'workflow_dispatch' || startsWith(github.ref, 'refs/tags/v')
|
|
needs: check
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
include:
|
|
- os: windows-latest
|
|
python: python
|
|
- os: ubuntu-latest
|
|
container: quay.io/pypa/manylinux_2_28_x86_64
|
|
python: /opt/python/cp312-cp312/bin/python
|
|
runs-on: ${{ matrix.os }}
|
|
container: ${{ matrix.container }}
|
|
defaults:
|
|
run:
|
|
working-directory: Source
|
|
shell: bash
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- if: matrix.container
|
|
run: |
|
|
curl --proto '=https' -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain none
|
|
echo "$HOME/.cargo/bin" >> "$GITHUB_PATH"
|
|
- run: rustup toolchain install
|
|
- run: ${{ matrix.python }} release.py
|
|
- uses: actions/upload-artifact@v4
|
|
with:
|
|
name: bakashrot-${{ matrix.os }}
|
|
path: |
|
|
Source/target/dist/*.zip
|
|
Source/target/dist/*.tar.gz
|