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
|
|
@ -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