Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI: add Playtests #22

Draft
wants to merge 12 commits into
base: master
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 59 additions & 1 deletion .github/workflows/Build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,67 @@ on:
workflow_dispatch:

jobs:
playtest:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
# branch:
# - steam_legacy
# - public
# mod:
# # - valve
# - cstrike
# # - czero
# # - dod
# # - gearbox
# # - tfc
# # - ricochet
# # - dmc
test: [
{ type: 'rehlds', file: 'cstrike-muliplayer-1', desc: 'CS: Multiplayer' },
# { type: 'rehlds', file: 'rehlds-phys-single1', desc: 'Half-Life: Physics singleplayer' },
# { type: 'rehlds', file: 'crossfire-1-multiplayer-1', desc: 'Half-Life: Multiplayer on crossfire map' },
# { type: 'rehlds', file: 'shooting-hl-1', desc: 'Half-Life: Shooting with several weapons' },
# { type: 'regamedll', file: 'cstrike-basic-1', desc: 'CS: Testing jumping, scenarios, shooting etc' },
]
env:
imageName: testdemos_local
steps:
- uses: actions/checkout@v4

- uses: actions/cache@v4
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-docker-${{ matrix.test.type }}
restore-keys: |
${{ runner.os }}-docker-

- name: Prepare
working-directory: ./testdemos_files
run: rsync -a deps/${{ matrix.test.type }}/* .

- name: Build container
run: |
docker build \
--cache-from=type=gha \
--cache-to=type=gha,mode=max \
-t $imageName .

- name: Run test
if: false
env:
demo: ${{ matrix.test.file }}
desc: ${{ matrix.test.desc }}
run: |
docker run \
--env demo \
--env desc \
-t $imageName \
./runTest.sh

build:
if: false
runs-on: ubuntu-latest
strategy:
matrix:
Expand All @@ -34,7 +93,6 @@ jobs:
steps:
- uses: actions/[email protected]
- uses: docker/[email protected]

- name: Log in to Docker Hub
if: ${{ env.needToPush }}
uses: docker/[email protected]
Expand Down