-
Notifications
You must be signed in to change notification settings - Fork 61
82 lines (66 loc) · 2.44 KB
/
artifacts.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
# This workflow will create game artifacts used in the awpy Python library
name: artifacts
on:
pull_request:
branches: [main]
paths:
- "awpy/**"
- "tests/**"
- "pyproject.toml"
# on:
# push:
# branches: [main]
# schedule:
# - cron: "49 1 * * *"
# workflow_dispatch:
env:
PYTHON_VERSION: 3.13
SOURCE2_VIEWER_URL: https://github.com/ValveResourceFormat/ValveResourceFormat/releases/download/11.1/cli-windows-x64.zip
CS2_APP_ID: 730
jobs:
generate-artifacts:
runs-on: windows-latest
steps:
- name: Checkout awpy library
uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v5
- name: Set up Python
run: |
uv python install ${{ env.PYTHON_VERSION }}
- name: Install awpy
shell: bash
run: |
uv sync --group dev --group test
uv tool install .
- name: Setup SteamCMD
uses: CyberAndrii/setup-steamcmd@v1
- name: Install Counter-Strike 2
run: |
$csDir = Join-Path (Get-Location) "cs_go"
steamcmd +force_install_dir $csDir +login anonymous +app_update ${{ env.CS2_APP_ID }} +quit
- name: Get Counter-Strike 2 Version
run: |
$csDir = Join-Path (Get-Location) "cs_go"
$csVersion = Get-Content "$csDir\game\csgo\steam.inf" | Select-String -Pattern "ClientVersion" | ForEach-Object { $_ -replace "ClientVersion=", "" }
echo "Counter-Strike 2 Version: $csVersion"
- name: Install Source2Viewer-CLI
run: |
Invoke-WebRequest -Uri ${{ env.SOURCE2_VIEWER_URL }} -OutFile ".\cli-windows-x64.zip"
Expand-Archive -Path .\cli-windows-x64.zip -DestinationPath . -Force
- name: Generate Triangles
run: |
Get-ChildItem -Force
.\scripts\generate-tris.ps1 -sourcePath "cs_go\game\csgo\maps"
- name: Generate Map Images
run: |
echo "Generating map images"
- name: Generate Map Data
run: |
echo "Generating map data"
- name: Generate Nav
run: |
echo "Generating nav"
- name: Generate Spawns
run: |
echo "Generating nav"