Skip to content

Commit

Permalink
feat(ci): Remove out of date Steam CI configurations and enable testi…
Browse files Browse the repository at this point in the history
…ng for Steam Linux build (endless-sky#10545)
  • Loading branch information
tibetiroka authored Oct 6, 2024
1 parent 019c6b8 commit c03f8ef
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 33 deletions.
3 changes: 3 additions & 0 deletions .github/path-filters.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ unit_tests:
integration_tests:
- 'tests/integration/config/plugins/integration-tests/**'

steam:
- 'steam/**'

doxygen_config:
- 'Doxyfile'

Expand Down
37 changes: 35 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,17 @@ name: CI

on:
push:
# Run for pushes to master or a release branch, e.g. a PR was merged ...
# Run for pushes to master, e.g. a PR was merged ...
branches:
- master
- releases/v[0-9]+.[0-9]+.[0-9]+
# ... and only when we've possibly changed how the game will function.
paths:
- 'source/**'
- 'data/**'
- 'tests/**'
- '.github/workflows/**'
- '.github/path-filters.yml'
- 'steam/**'
- 'CMakeLists.txt'
- 'CMakePresets.json'
- Doxyfile
Expand All @@ -24,6 +25,8 @@ on:
- 'data/**'
- 'tests/**'
- '.github/workflows/**'
- '.github/path-filters.yml'
- 'steam/**'
- 'CMakeLists.txt'
- 'CMakePresets.json'
- Doxyfile
Expand Down Expand Up @@ -84,6 +87,36 @@ jobs:
run: ctest --preset ${{ matrix.opengl == 'GL' && 'linux-ci-benchmark' || 'linux-gles-ci-benchmark' }}


build_steam:
name: Steam
needs: changed
if: ${{ needs.changed.outputs.game_code == 'true' || needs.changed.outputs.unit_tests == 'true' || needs.changed.outputs.integration_tests == 'true' || needs.changed.outputs.cmake_files == 'true' || needs.changed.outputs.ci_config == 'true' || needs.changed.outputs.steam == 'true' }}
runs-on: ubuntu-latest
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v4
with:
show-progress: false
- name: Setup cached directories
uses: actions/cache@v4
with:
path: /home/runner/.cache/sccache
key: ${{ runner.os }}-steam-ci-sccache-${{ github.ref }}
restore-keys: |
${{ runner.os }}-steam-ci-sccache-refs/heads/master
- name: Setup sccache
uses: Mozilla-Actions/sccache-action@v0.0.5
- name: Build Endless Sky
run: |
cd steam
docker compose run steam-x64
- name: Test Endless Sky
run: |
cd steam
docker compose run test-steam-x64
build_windows:
name: Windows
needs: changed
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/compute-changes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ on:
value: ${{ jobs.changed.outputs.unit_tests }}
integration_tests:
value: ${{ jobs.changed.outputs.integration_tests }}
steam:
value: ${{ jobs.changed.outputs.steam }}
doxygen_config:
value: ${{ jobs.changed.outputs.doxygen_config }}
codespell:
Expand Down Expand Up @@ -42,6 +44,7 @@ jobs:
game_code: ${{ steps.filter.outputs.game_code }}
unit_tests: ${{ steps.filter.outputs.unit_tests }}
integration_tests: ${{ steps.filter.outputs.integration_tests }}
steam: ${{ steps.filter.outputs.steam }}
codespell: ${{ steps.filter.outputs.codespell }}
editorconfig_files: ${{ steps.filter.outputs.editorconfig_files }}
content_style_check: ${{ steps.filter.outputs.content_style_check }}
Expand Down
32 changes: 1 addition & 31 deletions steam/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,21 +15,6 @@ services:
ninja EndlessSky
steam-x86:
image: registry.gitlab.steamos.cloud/steamrt/sniper/sdk:latest
working_dir: /endless-sky
volumes:
- '..:/endless-sky'
command:
- '/bin/bash'
- '-c'
- |
mkdir -p build/steam-x86
cd build/steam-x86
cmake ../../ -GNinja -DES_STEAM=ON -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS=-m32 -DVCPKG_TARGET_TRIPLET=linux-x86-release-static
ninja EndlessSky
test-steam-x64:
image: registry.gitlab.steamos.cloud/steamrt/sniper/sdk:latest
volumes:
Expand All @@ -42,19 +27,4 @@ services:
cd build/steam-x64
ninja
./endless-sky --version
ctest --label-exclude "(benchmark|integration-debug)"
test-steam-x86:
image: registry.gitlab.steamos.cloud/steamrt/sniper/sdk:latest
volumes:
- '..:/endless-sky'
working_dir: /endless-sky
command:
- '/bin/bash'
- '-c'
- |
cd build/steam-x86
ninja
./endless-sky --version
ctest --label-exclude "(benchmark|integration-debug)"
ctest --label-exclude "integration-debug"

0 comments on commit c03f8ef

Please sign in to comment.