read what the binary says about itself: names, signatures, prototypes; gen v2
This commit is contained in:
parent
54ef572202
commit
c458b4cb50
34 changed files with 58363 additions and 192 deletions
|
|
@ -33,7 +33,7 @@ jobs:
|
|||
- 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
|
||||
- name: Fuzz — 8 targets x 2 workers x 30s
|
||||
run: bash fuzz.sh 30 2
|
||||
- name: Fail on any crash / timeout / OOM
|
||||
run: |
|
||||
|
|
|
|||
|
|
@ -86,9 +86,6 @@ jobs:
|
|||
|
||||
- name: Produce — validate the contribution live (no model fold; the build is unchanged)
|
||||
run: |
|
||||
# The model already contains this build (derive folded it), and the forward-only guard needs the
|
||||
# target to sort strictly after the model's latest. "<buildid>-<patch>" does: it shares the buildid
|
||||
# prefix and is longer, and the next update's buildid still sorts above it.
|
||||
ln -sfn "$GAME_DIR" "work/$BUILDID-$PATCH"
|
||||
./target/release/source2rosetta --game "$GAME" produce \
|
||||
--seed "seed-$GAME.patched.json" \
|
||||
|
|
@ -100,9 +97,6 @@ jobs:
|
|||
cp "seed-$GAME.patched.json" "dist/seed-$GAME.json"
|
||||
|
||||
- name: Drop the re-folded model, compress the seed
|
||||
# A contribution does not change the binary, so the sidecar fold just re-folds a build the model
|
||||
# already has. Publishing that would append a duplicate row and grow the model on every PR — so the
|
||||
# model asset is left alone and `<game>-latest` keeps the one the last derive published.
|
||||
run: |
|
||||
rm -f "dist/model-$GAME.json"
|
||||
gzip -6 "dist/seed-$GAME.json"
|
||||
|
|
|
|||
|
|
@ -23,6 +23,7 @@ jobs:
|
|||
STEAM_APPS: /home/cs2/.steam/SteamApps
|
||||
STEAM_USER: source2rosetta
|
||||
RELEASE_BASE: ${{ github.server_url }}/${{ github.repository }}/releases/download
|
||||
OVERRIDE_DIR: /home/cs2/rosetta-override
|
||||
steps:
|
||||
- uses: actions/checkout@v6.0.2
|
||||
|
||||
|
|
@ -34,9 +35,6 @@ jobs:
|
|||
*) echo "unknown game '$GAME' (expected cs2 or dota2)"; exit 1 ;;
|
||||
esac
|
||||
echo "APPID=$APPID" >> "$GITHUB_ENV"
|
||||
# No password here: the runner holds a cached refresh token from a one-time interactive login, so
|
||||
# this is non-interactive. If it ever fails with a login error the token has lapsed — re-run
|
||||
# `steamcmd +login $STEAM_USER` once on the runner, as the runner user.
|
||||
steamcmd +login "$STEAM_USER" +app_update "$APPID" +quit
|
||||
|
||||
- name: Resolve the game paths + the new buildid
|
||||
|
|
@ -52,24 +50,29 @@ jobs:
|
|||
- name: Build the deriver
|
||||
run: cargo build --release
|
||||
|
||||
- name: Fetch the previous model + seed (the two non-user-facing release artifacts)
|
||||
- name: Fetch the previous model + seed (or take a manually-placed override)
|
||||
run: |
|
||||
mkdir -p in dist work
|
||||
curl -fsSL -o in/model.gz "$RELEASE_BASE/$GAME-latest/model-$GAME.json.gz"
|
||||
gunzip -c in/model.gz > "in/model-$GAME.json"
|
||||
curl -fsSL -o in/seed.gz "$RELEASE_BASE/$GAME-latest/seed-$GAME.json.gz"
|
||||
gunzip -c in/seed.gz > "in/seed-$GAME.json"
|
||||
OVR="$OVERRIDE_DIR/$GAME"
|
||||
for stem in "model-$GAME.json" "seed-$GAME.json"; do
|
||||
if [ -f "$OVR/$stem" ]; then
|
||||
echo "::warning::baseline OVERRIDE in use for $stem — taken from $OVR, not the $GAME-latest release"
|
||||
cp "$OVR/$stem" "in/$stem"
|
||||
echo "OVERRIDE_USED=1" >> "$GITHUB_ENV"
|
||||
else
|
||||
curl -fsSL -o "in/$stem.gz" "$RELEASE_BASE/$GAME-latest/$stem.gz"
|
||||
gunzip -c "in/$stem.gz" > "in/$stem"
|
||||
fi
|
||||
done
|
||||
|
||||
- name: Produce — derive + validate-live + typed netvars + fold model N -> N+1
|
||||
run: |
|
||||
# --target is a buildid-named SYMLINK to the install, not the install path itself: the deriver labels
|
||||
# a build by its directory NAME, and the forward-only guard demands each target sort strictly after
|
||||
# the model's latest build. Passing ".../game" would label every build "game", so the SECOND run
|
||||
# would be rejected as not-newer. Buildids are monotonic and sort after the corpus's date labels.
|
||||
ln -sfn "$GAME_DIR" "work/$BUILDID"
|
||||
./target/release/source2rosetta --game "$GAME" produce \
|
||||
--seed "in/seed-$GAME.json" \
|
||||
--corpus-model "in/model-$GAME.json" \
|
||||
--prototypes mappings/prototypes.json \
|
||||
--ehandle-classes mappings/ehandle-classes.json \
|
||||
--target "work/$BUILDID" \
|
||||
--game-dir "$GAME_DIR" \
|
||||
--version "$GAME-$BUILDID-0" \
|
||||
|
|
@ -104,3 +107,9 @@ jobs:
|
|||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
override: true
|
||||
release-notes: "Rolling ${{ env.GAME }} gamedata — always the newest build (currently ${{ env.BUILDID }}). Stable URL; assets overwritten each update."
|
||||
|
||||
- name: Consume the baseline override
|
||||
if: env.OVERRIDE_USED != ''
|
||||
run: |
|
||||
rm -f "$OVERRIDE_DIR/$GAME"/*
|
||||
echo "override consumed — subsequent $GAME runs resume from the $GAME-latest release"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue