-
Notifications
You must be signed in to change notification settings - Fork 80
109 lines (97 loc) · 3.99 KB
/
pr-unit-tests-static-linux.yaml
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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
name: Unit Tests / Required / Static / Linux
on:
pull_request:
merge_group:
jobs:
build:
name: Build and Test in Steam SDK
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
# XXX - This matrix needs to stay in sync with the test job below!
compiler:
# Only g++ builds actually work currently
- g++
build-type:
- Release
- Debug
steam-runtime:
# - scout v1 - Debian Stretch / 9 - has a glibc too old for Github Actions / Node 20
# - soldier v2 - Debian Buster / 10 - has a weird compiler and a weird ld, no idea what is up there
- sniper # v3 - Debian Bullseye / 11
# - medic v4 - Debian Bookworm / 12 - not in the container registry yet
# - ??? v5 - Debian Trixie / 13 - not in the container registry yet
container: registry.gitlab.steamos.cloud/steamrt/${{ matrix.steam-runtime }}/sdk
steps:
- name: Install Dependencies
env:
DEBIAN_FRONTEND: noninteractive
run: |
sudo ln -fs /usr/share/zoneinfo/UTC /etc/localtime
sudo dpkg-reconfigure --frontend=noninteractive tzdata
sudo apt-get -qq update
sudo apt-get -qq upgrade -y
sudo apt-get -qq install -y --no-install-recommends \
autoconf-archive
- name: Checkout Anura
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: 0
submodules: true
- name: Ignore Filesystem Permissions for Git
run: git config --global --add safe.directory '*'
# Sets a cache up for vcpkg
- name: Install vcpkg
uses: lukka/run-vcpkg@5e0cab206a5ea620130caf672fce3e4a6b5666a1 # v11.5
- name: Set ccache up
uses: hendrikmuhs/ccache-action@ed74d11c0b343532753ecead8a951bb09bb34bc9 # v1.2.14
with:
key: unit-tests-linux-static-steam-${{ matrix.build-type }}-${{ matrix.compiler }}-${{ matrix.steam-runtime }}
- name: Build Prep Anura
run: |
cmake buildsystem/linux-steam \
-D CMAKE_CXX_COMPILER="${{ matrix.compiler }}" \
-D CMAKE_BUILD_TYPE="${{ matrix.build-type }}"
- name: Build Anura
run: |
# Compile with number of available hyperthreads
make -j "$(getconf _NPROCESSORS_ONLN)"
- name: Run Unit Tests
run: ./anura --tests
- uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
with:
name: anura-static-binary-${{ matrix.build-type }}-${{ matrix.steam-runtime }}-${{ matrix.compiler }}-${{ github.sha }}
path: anura
if-no-files-found: error
test:
name: Test on Steam Platform
needs: build
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
# XXX - This matrix needs to stay in sync with the build job above!
compiler:
# Only g++ builds actually work currently
- g++
build-type:
- Release
- Debug
steam-runtime:
# - scout v1 - Debian Stretch / 9 - has a glibc too old for Github Actions / Node 20
# - soldier v2 - Debian Buster / 10 - has a weird compiler and a weird ld, no idea what is up there
- sniper # v3 - Debian Bullseye / 11
# - medic v4 - Debian Bookworm / 12 - not in the container registry yet
# - ??? v5 - Debian Trixie / 13 - not in the container registry yet
container: registry.gitlab.steamos.cloud/steamrt/${{ matrix.steam-runtime }}/platform
steps:
- name: Checkout Anura
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
with:
name: anura-static-binary-${{ matrix.build-type }}-${{ matrix.steam-runtime }}-${{ matrix.compiler }}-${{ github.sha }}
- name: Run Unit Tests
run: |
chmod +x anura
./anura --tests