-
Notifications
You must be signed in to change notification settings - Fork 6
133 lines (115 loc) · 4.58 KB
/
ubuntu.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
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
name: "CI: Ubuntu"
on: [ push ]
env:
DISPLAY: :99.0
SDL_VIDEODRIVER: x11
VCPKG_ROOT: ${{github.workspace}}/vcpkg
VCPKG_TARGET_TRIPLET: x64-linux-tactile
VCPKG_DEFAULT_BINARY_CACHE: ${{github.workspace}}/vcpkg/bincache
VCPKG_CACHE_EDITION: 1
jobs:
ubuntu-latest-test:
runs-on: ubuntu-24.04
if: contains(github.event.head_commit.message, '[skip-ci]') == false
steps:
- uses: actions/checkout@v4
- uses: lukka/get-cmake@latest
- name: Install system dependencies
run: |
sudo apt update
sudo apt install ninja-build \
libegl1-mesa-dev \
libgles2-mesa-dev \
libgl-dev \
libasound2-dev \
libpulse-dev \
libx11-dev \
libxmu-dev \
libxi-dev \
libtool \
libltdl-dev \
xvfb \
pkg-config \
automake \
autoconf \
autoconf-archive \
autopoint \
gperf \
python3-jinja2 \
mold
- name: Use GCC 14
run: sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-14 14
- name: Cache Vcpkg
id: restore-vcpkg-and-artifacts
uses: actions/cache@v3
with:
path: |
${{env.VCPKG_ROOT}}
!${{env.VCPKG_ROOT}}\buildtrees
!${{env.VCPKG_ROOT}}\packages
!${{env.VCPKG_ROOT}}\downloads
!${{env.VCPKG_ROOT}}\installed
key: tactile-linux-vcpkg-${{hashFiles('vcpkg.json')}}-${{env.VCPKG_CACHE_EDITION}}
- name: Install Vcpkg
if: steps.restore-vcpkg-and-artifacts.outputs.cache-hit != 'true'
run: |
git clone https://github.com/microsoft/vcpkg
./vcpkg/bootstrap-vcpkg.sh -disableMetrics
sudo ./vcpkg/vcpkg integrate install
- name: Create directory ${{env.VCPKG_DEFAULT_BINARY_CACHE}}
run: mkdir -p ${{env.VCPKG_DEFAULT_BINARY_CACHE}}
- name: Register custom Vcpkg triplet file
working-directory: ./scripts
run: python add_vcpkg_triplet.py
- name: Emulate video device
run: |
/sbin/start-stop-daemon --start \
--pidfile /tmp/custom_xvfb_99.pid \
--make-pidfile \
--background \
--exec /usr/bin/Xvfb -- :99 -screen 0 800x600x24 -ac +extension GLX;
sleep 3
- name: Install assets
working-directory: ./scripts
run: python install_assets.py --skip-fonts
- name: Generate build files
env:
BOOST_ROOT: ${{ steps.install-boost.outputs.BOOST_ROOT }}
run: |
mkdir build && cd build
cmake .. -GNinja \
-DCMAKE_BUILD_TYPE=Debug \
-DCMAKE_EXE_LINKER_FLAGS="-fuse-ld=mold" \
-DCMAKE_SHARED_LINKER_FLAGS="-fuse-ld=mold" \
-DVCPKG_TARGET_TRIPLET=${{env.VCPKG_TARGET_TRIPLET}} \
-DTACTILE_BUILD_TESTS=ON \
-DTACTILE_BUILD_YAML_FORMAT=ON \
-DTACTILE_BUILD_TILED_TMJ_FORMAT=ON \
-DTACTILE_BUILD_TILED_TMX_FORMAT=ON \
-DTACTILE_BUILD_GODOT_TSCN_FORMAT=ON \
-DTACTILE_BUILD_ZLIB_COMPRESSION=ON \
-DTACTILE_BUILD_ZSTD_COMPRESSION=ON \
-DTACTILE_BUILD_OPENGL_RENDERER=ON \
-DTACTILE_BUILD_VULKAN_RENDERER=OFF \
-DTACTILE_USE_LTO=OFF \
-DTACTILE_USE_PRECOMPILED_HEADERS=ON \
--log-level=DEBUG
- name: Build
run: ninja -C build
- name: Install
run: ninja -C build install
- name: Run base tests
working-directory: ./build/debug
run: ./tactile-base-test
- name: Run core tests
working-directory: ./build/debug
run: ./tactile-core-test
- name: Run Zlib compression tests
working-directory: ./build/debug
run: ./tactile-zlib-compression-test
- name: Run Zstd compression tests
working-directory: ./build/debug
run: ./tactile-zstd-compression-test
- name: Run Tiled TMJ format tests
working-directory: ./build/debug
run: ./tactile-tiled-tmj-format-test