* move client/server/config into shared * move platforms into shared * move head drops into shared * move tb_entities to shared * reduce server to just a call into shared * get solo play working * fix server opening window * fix fmt * extracted a few more modules from client * near completely migrated client * fixed duplicate CharacterInputEnabled definition * simplify a few things related to builds * more simplifications * fix warnings/check * ci update * address comments * try fixing macos steam build * address comments * address comments * CI tweaks with default client feature --------- Co-authored-by: PROMETHIA-27 <electriccobras@gmail.com>
226 lines
7.3 KiB
YAML
226 lines
7.3 KiB
YAML
name: steam-alpha
|
|
|
|
on:
|
|
workflow_dispatch: # Enables manual triggers
|
|
# pull_request:
|
|
|
|
jobs:
|
|
steam-macos:
|
|
runs-on: [self-hosted, macos]
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: cargo-bins/cargo-binstall@main
|
|
- uses: dtolnay/rust-toolchain@master
|
|
with:
|
|
toolchain: stable
|
|
components: clippy, rustfmt
|
|
targets: x86_64-apple-darwin, aarch64-apple-darwin
|
|
|
|
- uses: leafwing-studios/cargo-cache@v2
|
|
with:
|
|
sweep-cache: true
|
|
|
|
- name: Build (lipo)
|
|
run: |
|
|
cargo build --release --target=x86_64-apple-darwin --bin hedz_reloaded
|
|
cargo build --release --target=aarch64-apple-darwin --bin hedz_reloaded
|
|
lipo -create -output target/release/hedz_reloaded target/aarch64-apple-darwin/release/hedz_reloaded target/x86_64-apple-darwin/release/hedz_reloaded
|
|
|
|
- name: Archive
|
|
run: |
|
|
cp target/release/hedz_reloaded ./
|
|
tar -czf hedz-macos.tar.gz hedz_reloaded
|
|
ls -lisah hedz-macos.tar.gz
|
|
|
|
- uses: actions/upload-artifact@v4
|
|
with:
|
|
name: hedz-macos
|
|
path: ./hedz-macos.tar.gz
|
|
|
|
steam-macos-deploy:
|
|
needs: steam-macos
|
|
runs-on: [self-hosted, linux]
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Download Artifacts
|
|
uses: actions/download-artifact@v4
|
|
with:
|
|
name: hedz-macos
|
|
|
|
- name: Un-Archive
|
|
run: |
|
|
ls -lisah hedz-macos.tar.gz
|
|
tar -xzf hedz-macos.tar.gz
|
|
|
|
- name: Assemble App
|
|
env:
|
|
APP_ROOT: build/macos/src/HEDZReloaded.app/Contents/MacOS
|
|
run: |
|
|
rm -rf $APP_ROOT/* | true
|
|
mkdir -p $APP_ROOT/assets
|
|
cp -r assets/* $APP_ROOT/assets
|
|
cp hedz_reloaded $APP_ROOT/
|
|
cp build/macos/libsteam_api.dylib $APP_ROOT/
|
|
|
|
- uses: ./.github/actions/steamcmd
|
|
with:
|
|
config: ${{ secrets.STEAM_CONFIG_VDF_BASE64 }}
|
|
|
|
- name: Steam deploy
|
|
env:
|
|
# needs to be fully qualified path for steamcmd to find it
|
|
DEPOT: ${{ github.workspace }}/build/steamos/scripts/hz_macos.vdf
|
|
STEAM_USR: ${{ secrets.STEAM_USR }}
|
|
run: |
|
|
cd build/steamos
|
|
~/Steam/steamcmd.sh +login $STEAM_USR +run_app_build $DEPOT +quit
|
|
|
|
- name: Set outputs
|
|
id: vars
|
|
run: |
|
|
echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
|
|
echo "branch=$(git branch --show-current)" >> $GITHUB_OUTPUT
|
|
|
|
- name: Discord notification
|
|
uses: ./.github/actions/discord-webhook
|
|
with:
|
|
webhook_url: ${{ secrets.DISCORD_WEBHOOK }}
|
|
message: New macos release (`${{ steps.vars.outputs.branch }}`) [`${{ steps.vars.outputs.sha_short }}`]
|
|
|
|
steam-steamos:
|
|
runs-on: [self-hosted, linux]
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: cargo-bins/cargo-binstall@main
|
|
- uses: extractions/setup-just@v1
|
|
- uses: dtolnay/rust-toolchain@master
|
|
with:
|
|
toolchain: stable
|
|
components: clippy, rustfmt
|
|
|
|
- name: "Install and cache dependencies (Linux)"
|
|
uses: awalsh128/cache-apt-pkgs-action@latest
|
|
with:
|
|
packages: libasound2-dev libudev-dev libwayland-dev libxkbcommon-dev
|
|
version: 2
|
|
|
|
- uses: leafwing-studios/cargo-cache@v2
|
|
with:
|
|
sweep-cache: true
|
|
|
|
- name: Build
|
|
run: |
|
|
cargo build --locked --release --target=x86_64-unknown-linux-gnu --bin hedz_reloaded
|
|
|
|
- name: Archive
|
|
run: |
|
|
cp target/x86_64-unknown-linux-gnu/release/hedz_reloaded ./
|
|
tar -czf steamos.tar.gz hedz_reloaded
|
|
|
|
- uses: actions/upload-artifact@v4
|
|
with:
|
|
name: steamos.tar.gz
|
|
path: ./steamos.tar.gz
|
|
|
|
- name: Copy Binary for SteamOS
|
|
run: |
|
|
mkdir -p build/steamos/content
|
|
cp target/x86_64-unknown-linux-gnu/release/hedz_reloaded build/steamos/content/
|
|
|
|
- name: Install SteamCMD
|
|
run: |
|
|
sudo apt-get install lib32gcc-s1 -y
|
|
mkdir ~/Steam | true
|
|
cd ~/Steam
|
|
curl -sqL "https://steamcdn-a.akamaihd.net/client/installer/steamcmd_linux.tar.gz" | tar zxvf -
|
|
chmod +x ~/Steam/
|
|
~/Steam/steamcmd.sh +help +quit
|
|
|
|
- name: Steam Auth
|
|
env:
|
|
STEAM_CONFIG: ${{ secrets.STEAM_CONFIG_VDF_BASE64 }}
|
|
STEAM_CONFIG_PATH: ~/.steam/steam/config
|
|
run: |
|
|
mkdir -p $STEAM_CONFIG_PATH
|
|
# Decode the base64 data and save it to the config location
|
|
echo "$STEAM_CONFIG" | base64 -d | gunzip > $STEAM_CONFIG_PATH/config.vdf
|
|
# Set proper permissions
|
|
chmod 755 $STEAM_CONFIG_PATH/config.vdf
|
|
|
|
- name: Steam deploy
|
|
env:
|
|
# needs to be fully qualified path for steamcmd to find it
|
|
DEPOT: ${{ github.workspace }}/build/steamos/scripts/hedz.vdf
|
|
STEAM_USR: ${{ secrets.STEAM_USR }}
|
|
run: |
|
|
cd build/steamos
|
|
~/Steam/steamcmd.sh +login $STEAM_USR +run_app_build $DEPOT +quit
|
|
|
|
- name: Set outputs
|
|
id: vars
|
|
run: |
|
|
echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
|
|
echo "branch=$(git branch --show-current)" >> $GITHUB_OUTPUT
|
|
|
|
- name: Discord notification
|
|
uses: ./.github/actions/discord-webhook
|
|
with:
|
|
webhook_url: ${{ secrets.DISCORD_WEBHOOK }}
|
|
message: New steamos release (`${{ steps.vars.outputs.branch }}`) [`${{ steps.vars.outputs.sha_short }}`]
|
|
|
|
steam-windows:
|
|
runs-on: [self-hosted, linux]
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: cargo-bins/cargo-binstall@main
|
|
- uses: extractions/setup-just@v1
|
|
- uses: dtolnay/rust-toolchain@master
|
|
with:
|
|
toolchain: stable
|
|
components: llvm-tools-preview
|
|
targets: x86_64-pc-windows-msvc
|
|
|
|
- name: Configure Cargo (Windows)
|
|
run: |
|
|
which cargo-xwin || cargo install --locked cargo-xwin
|
|
|
|
- name: install dependencies
|
|
run: |
|
|
sudo apt-get update
|
|
sudo apt-get install -y lld clang cmake ninja-build
|
|
|
|
- name: Build binaries (Windows)
|
|
run: |
|
|
cargo xwin build --locked --release --target=x86_64-pc-windows-msvc --bin hedz_reloaded
|
|
|
|
- name: Move binary
|
|
run: |
|
|
ls -lisa target/x86_64-pc-windows-msvc/release/
|
|
cp target/x86_64-pc-windows-msvc/release/hedz_reloaded.exe build/win/
|
|
|
|
- uses: ./.github/actions/steamcmd
|
|
with:
|
|
config: ${{ secrets.STEAM_CONFIG_VDF_BASE64 }}
|
|
|
|
- name: Steam deploy
|
|
env:
|
|
# needs to be fully qualified path for steamcmd to find it
|
|
DEPOT: ${{ github.workspace }}/build/steamos/scripts/hz_win.vdf
|
|
STEAM_USR: ${{ secrets.STEAM_USR }}
|
|
run: |
|
|
cd build/steamos
|
|
~/Steam/steamcmd.sh +login $STEAM_USR +run_app_build $DEPOT +quit
|
|
|
|
- name: Set outputs
|
|
id: vars
|
|
run: |
|
|
echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
|
|
echo "branch=$(git branch --show-current)" >> $GITHUB_OUTPUT
|
|
|
|
- name: Discord notification
|
|
uses: ./.github/actions/discord-webhook
|
|
with:
|
|
webhook_url: ${{ secrets.DISCORD_WEBHOOK }}
|
|
message: New windows release (`${{ steps.vars.outputs.branch }}`) [`${{ steps.vars.outputs.sha_short }}`]
|