forked from black-sliver/PopTracker
-
Notifications
You must be signed in to change notification settings - Fork 0
147 lines (138 loc) · 4.93 KB
/
Copy pathtest.yaml
File metadata and controls
147 lines (138 loc) · 4.93 KB
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
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
name: CI
on:
push:
branches-ignore:
- 'screenshots'
paths:
- '**'
- '!**.md'
- '!doc/**'
- '!schema/**'
- '!api/lua/definition/**'
- '!.github/workflows/**'
- '.github/workflows/test.yaml'
pull_request:
branches-ignore:
- 'screenshots'
paths:
- '**'
- '!**.md'
- '!doc/**'
- '!schema/**'
- '!api/lua/definition/**'
- '!.github/workflows/**'
- '.github/workflows/test.yaml'
permissions: {}
jobs:
test:
strategy:
matrix:
os:
- ubuntu-latest
- ubuntu-24.04-arm
- macos-latest # for tests on macOS, we do regular arm and special x86_64 below
shell: [bash]
extra_make_args: [''] # default build
include:
- os: windows-latest
shell: msys2 {0}
extra_make_args: ''
#- os: windows-11-arm # platform detection in Makefile doesn't work currently
# shell: msys2 {0}
# extra_make_args: ''
- os: macos-15-intel
shell: bash
# we now require 10.15 by default, but 10.13 should work with an extra dependency
extra_make_args: 'MACOS_DEPLOYMENT_TARGET=10.13'
name: Test ${{ matrix.os }} ${{ matrix.extra_make_args }}
runs-on: ${{ matrix.os }}
defaults:
run:
shell: ${{ matrix.shell }}
steps:
- name: Install dependencies (apt)
if: ${{ startsWith(matrix.os, 'ubuntu') }}
run: |
sudo apt-get update -y -qq
sudo apt-get install coreutils build-essential libsdl2-dev libsdl2-image-dev libsdl2-ttf-dev libgtest-dev libgmock-dev
- name: Install dependencies (brew)
if: ${{ startsWith(matrix.os, 'macos') }}
run: |
brew install coreutils SDL2 sdl2_ttf sdl2_image openssl@3.0 googletest || true
- name: Install extra dependencies (brew)
if: ${{ startsWith(matrix.os, 'macos') && contains(matrix.extra_make_args, 'MACOS_DEPLOYMENT_TARGET') }}
run: |
brew install boost || true
- name: Install dependencies (msys2, x86_64)
if: ${{ startsWith(matrix.os, 'windows') && !endsWith(matrix.os, 'arm')}}
uses: msys2/setup-msys2@66cd2cce69caa17b53920067426061ca1de3a884 # v2.32.0
with:
release: false
update: false
install: >-
base-devel
coreutils
make
mingw-w64-x86_64-toolchain
mingw64/mingw-w64-x86_64-SDL2
mingw64/mingw-w64-x86_64-SDL2_image
mingw64/mingw-w64-x86_64-SDL2_ttf
mingw64/mingw-w64-x86_64-freetype
mingw64/mingw-w64-x86_64-openssl
mingw64/mingw-w64-x86_64-gtest
p7zip
- name: Install dependencies (msys2, arm)
if: ${{ startsWith(matrix.os, 'windows') && endsWith(matrix.os, 'arm')}}
uses: msys2/setup-msys2@66cd2cce69caa17b53920067426061ca1de3a884 # v2.32.0
with:
msystem: CLANGARM64
update: true
install: >-
base-devel
coreutils
make
mingw-w64-clang-aarch64-toolchain
clangarm64/mingw-w64-clang-aarch64-gcc-compat
clangarm64/mingw-w64-clang-aarch64-SDL2
clangarm64/mingw-w64-clang-aarch64-SDL2_image
clangarm64/mingw-w64-clang-aarch64-SDL2_ttf
clangarm64/mingw-w64-clang-aarch64-freetype
clangarm64/mingw-w64-clang-aarch64-openssl
clangarm64/mingw-w64-clang-aarch64-gtest
p7zip
- uses: actions/checkout@v7.0.1
with:
submodules: recursive
- name: Configure ASAN (macos-latest)
if: ${{ startsWith(matrix.os, 'macos-latest') }}
run: |
# see https://github.com/google/sanitizers/wiki/AddressSanitizerContainerOverflow#false-positives
# since we don't build gtest with ASAN, we hit this issue on macos-latest
echo "ASAN_OPTIONS=detect_container_overflow=0" >> $GITHUB_ENV
- name: Enable ASAN and UBSAN
# if: ${{ !startsWith(matrix.os, 'windows') }}
if: ${{ startsWith(matrix.os, 'ubuntu') }}
run: |
# we use mingw on windows, which does not support ASAN
# macos currently hangs when trying to run tests with ASAN + UBSAN on
echo "extra_make_args=WITH_ASAN=true WITH_UBSAN=true ${{ matrix.extra_make_args }}" >> $GITHUB_ENV
- name: Enable UBSAN
if: ${{ startsWith(matrix.os, 'macos') }}
run: |
echo "extra_make_args=WITH_UBSAN=true ${{ matrix.extra_make_args }}" >> $GITHUB_ENV
- name: Build DEBUG
run: make native CONF=DEBUG ${{ env.extra_make_args }} -j4
- name: Run tests
timeout-minutes: 7
run: make test CONF=DEBUG ${{ env.extra_make_args }} -j4
nix-shell-build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7.0.1
with:
submodules: recursive
- uses: cachix/install-nix-action@630ae543ea3a38a9a4166f03376c02c50f408342
with:
nix_path: nixpkgs=channel:nixos-25.05
- run: |
nix-shell --run 'make -j4'