-
-
Notifications
You must be signed in to change notification settings - Fork 4
58 lines (48 loc) · 1.82 KB
/
clang-ubuntu-22.04.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
name: clang:ubuntu
on: push
jobs:
build:
strategy:
matrix:
build_mode: ["Release", "Debug"]
os: ["ubuntu-24.04"]
clang: ["18"]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Cache and Install Dependencies
id: cache-and-install
uses: actions/cache@v4
with:
path: |
${{ github.workspace }}/.deps
key: ${{ matrix.os }}-${{ hashFiles('**/lockfiles') }}-${{ hashFiles('CMakeLists.txt') }}-${{ hashFiles('vcpkg.json') }}
- name: Update Apt
run: |
sudo apt update
sudo apt upgrade
sudo apt dist-upgrade
- name: Install Build Tools
run: sudo apt install build-essential ninja-build clang-${{ matrix.clang }} cmake wget libxrandr-dev nasm libstdc++-14-dev
- name: Install VCPKG
if: steps.cache-and-install.outputs.cache-hit != 'true'
run: |
git clone --depth=1 https://github.com/microsoft/vcpkg.git ${{ github.workspace }}/.deps/vcpkg
cd ${{ github.workspace }}/.deps/vcpkg
./bootstrap-vcpkg.sh -disableMetrics
- name: Install Dependencies, Configure, and Build Ashura
env:
CC: clang-${{ matrix.clang }}
CXX: clang++-${{ matrix.clang }}
VCPKG_ROOT: ${{ github.workspace }}/.deps/vcpkg
run: |
mkdir build
cd build
cmake .. -DCMAKE_TOOLCHAIN_FILE=${{ github.workspace }}/.deps/vcpkg/scripts/buildsystems/vcpkg.cmake -DVCPKG_INSTALLED_DIR=${{ github.workspace }}/.deps/vcpkg/installed -DCMAKE_BUILD_TYPE=${{ matrix.build_mode }} -DCMAKE_EXPORT_COMPILE_COMMANDS=1 -GNinja
ninja
- name: Run Tests
run: |
cd build
./ashura_std_tests
./ashura_engine_tests