windows ci and cd (#21)

This commit is contained in:
extrawurst
2025-04-23 23:30:36 +02:00
committed by GitHub
parent 921cb05f96
commit 10aa7131ea
7 changed files with 136 additions and 7 deletions

View File

@@ -1,12 +1,10 @@
name: ci_release
name: archive_release_steamos
on:
workflow_dispatch: # Enables manual triggers
push:
branches: ["master"]
workflow_dispatch: # Enables manual triggers
jobs:
release:
steamos:
runs-on: [self-hosted, linux]
steps:
- uses: actions/checkout@v4

42
.github/workflows/archive_win.yml vendored Normal file
View File

@@ -0,0 +1,42 @@
name: archive_win
on:
workflow_dispatch: # Enables manual triggers
jobs:
win:
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 and cache dependencies (Windows)"
uses: awalsh128/cache-apt-pkgs-action@latest
with:
packages: lld clang cmake ninja-build
version: 1.0
- name: Build binaries (Windows)
run: |
cargo xwin build --locked --release --target=x86_64-pc-windows-msvc
- name: Archive
run: |
ls -lisa target/x86_64-pc-windows-msvc/release/
cp target/x86_64-pc-windows-msvc/release/hedz_reloaded.exe hedz_reloaded.exe
tar -czf win.tar.gz hedz_reloaded.exe
- uses: actions/upload-artifact@v4
with:
name: win.tar.gz
path: ./win.tar.gz

View File

@@ -168,3 +168,59 @@ jobs:
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 and cache dependencies (Windows)"
uses: awalsh128/cache-apt-pkgs-action@latest
with:
packages: lld clang cmake ninja-build
version: 1.0
- name: Build binaries (Windows)
run: |
cargo xwin build --locked --release --target=x86_64-pc-windows-msvc
- 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/hedz_reloaded.exe
- 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=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_OUTPUT
- name: Discord notification
uses: appleboy/discord-action@v1.2.0
with:
webhook_url: ${{ secrets.DISCORD_WEBHOOK }}
message: New windows release (`${{ steps.vars.outputs.branch }}`) [`${{ steps.vars.outputs.sha_short }}`]

View File

@@ -21,3 +21,6 @@ build:
steam_macos:
cd ../macos && just build-app
./builder_osx/steamcmd +login $STEAM_USR +run_app_build ../scripts/hz_macos.vdf +quit
steam_win:
./builder_osx/steamcmd +login $STEAM_USR +run_app_build ../scripts/hz_win.vdf +quit

View File

@@ -0,0 +1,30 @@
"AppBuild"
{
"AppID" "1603000" // your AppID
"Desc" "win build"
"verbose" "1" // spew more build details in console
"SetLive" "alpha"
"ContentRoot" "../../" // root content folder, relative to location of this file
"BuildOutput" "../output" // build output folder for build logs and build cache files
"Depots"
{
"1603003"
{
"FileMapping"
{
"LocalPath" "../assets/*" // all files from contentroot folder
"DepotPath" "./assets" // mapped into the root of the depot
"recursive" "1" // include all subfolders
}
"FileMapping"
{
"LocalPath" "win/*"
"DepotPath" "."
"recursive" "1"
}
}
}
}

BIN
build/win/steam_api64.dll Normal file

Binary file not shown.

BIN
build/win/steam_api64.lib Normal file

Binary file not shown.