initial commit
This commit is contained in:
commit
a2922b8bad
59 changed files with 2684583 additions and 0 deletions
75
.forgejo/workflows/ci.yml
Normal file
75
.forgejo/workflows/ci.yml
Normal file
|
|
@ -0,0 +1,75 @@
|
|||
name: CI
|
||||
on:
|
||||
push:
|
||||
branches: [master]
|
||||
tags: ['gen-v*']
|
||||
pull_request:
|
||||
|
||||
env:
|
||||
CARGO_TERM_COLOR: always
|
||||
RUSTFLAGS: "-D warnings"
|
||||
|
||||
jobs:
|
||||
lint:
|
||||
runs-on: s2-runner
|
||||
steps:
|
||||
- uses: actions/checkout@v6.0.2
|
||||
- name: cargo fmt
|
||||
run: cargo fmt --all --check
|
||||
- name: cargo clippy (advisory)
|
||||
run: cargo clippy --all-targets --all-features --message-format=short
|
||||
env:
|
||||
RUSTFLAGS: ""
|
||||
- name: cargo doc (no deps)
|
||||
run: cargo doc --no-deps --document-private-items
|
||||
env:
|
||||
RUSTDOCFLAGS: "-D warnings"
|
||||
|
||||
fuzz:
|
||||
runs-on: s2-runner
|
||||
env:
|
||||
RUSTFLAGS: ""
|
||||
steps:
|
||||
- uses: actions/checkout@v6.0.2
|
||||
- name: Clear artifacts from any earlier run
|
||||
run: rm -rf fuzz/artifacts
|
||||
- name: Fuzz — 5 targets x 2 workers x 30s
|
||||
run: bash fuzz.sh 30 2
|
||||
- name: Fail on any crash / timeout / OOM
|
||||
run: |
|
||||
found=$(find fuzz/artifacts -type f \( -name 'crash-*' -o -name 'timeout-*' -o -name 'oom-*' \) 2>/dev/null || true)
|
||||
if [ -n "$found" ]; then
|
||||
echo "fuzzing produced artifacts:"; echo "$found" | sed 's/^/ /'
|
||||
echo "triage: cargo +nightly fuzz tmin <target> <artifact>"
|
||||
exit 1
|
||||
fi
|
||||
echo "no crashes / timeouts / OOMs — the offline derivation held on every explored input."
|
||||
|
||||
test:
|
||||
runs-on: s2-runner
|
||||
steps:
|
||||
- uses: actions/checkout@v6.0.2
|
||||
- name: cargo test
|
||||
run: cargo test --release
|
||||
- name: Build the gen binary (it lives in the core crate, not the workspace default build)
|
||||
run: cargo build --release -p source2rosetta-core
|
||||
- name: Package the gen binary
|
||||
if: startsWith(github.ref, 'refs/tags/gen-v')
|
||||
run: |
|
||||
mkdir -p dist
|
||||
cp target/release/source2rosetta-gen dist/
|
||||
strip dist/source2rosetta-gen || true
|
||||
(cd dist && sha256sum source2rosetta-gen > source2rosetta-gen.sha256)
|
||||
|
||||
- name: Publish the gen release
|
||||
if: startsWith(github.ref, 'refs/tags/gen-v')
|
||||
uses: https://code.forgejo.org/actions/forgejo-release@v2
|
||||
with:
|
||||
direction: upload
|
||||
url: ${{ github.server_url }}
|
||||
repo: ${{ github.repository }}
|
||||
tag: ${{ github.ref_name }}
|
||||
release-dir: dist
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
override: true
|
||||
release-notes: "`source2rosetta-gen` ${{ github.ref_name }} — renders a published gamedata release into your framework's format: CounterStrikeSharp, Metamod/SourceMod, ModSharp, Swiftly, Plugify, or a typed C# SDK. Download it, `chmod +x`, and point it at the `gamedata-<game>.json` / `netvars-<game>.json` from a per-game release (`cs2-latest`, `dota2-latest`). Usage: see `crates/source2rosetta-core/README.md`. Linux x86-64."
|
||||
Loading…
Add table
Add a link
Reference in a new issue