-
Notifications
You must be signed in to change notification settings - Fork 0
65 lines (53 loc) · 1.98 KB
/
linux.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
name: Linux
env:
VCPKG_BINARY_SOURCES: "clear;x-gha,readwrite"
on:
push:
paths:
- '**'
- '!README.md'
- '!LICENSE.txt'
- '!.github/workflows/*.yml'
- '.github/workflows/linux.yml'
jobs:
build:
strategy:
matrix:
build: [Debug, Release]
use_std_module: [ON, OFF]
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- name: Install Vulkan SDK
uses: humbletim/setup-vulkan-sdk@v1.2.0
with:
vulkan-query-version: latest
vulkan-components: Vulkan-Headers, Vulkan-Loader
vulkan-use-cache: true
- name: Install Ninja and build dependencies
run: |
sudo apt-get install ninja-build
- name: Install libc++ if using standard library module
if: matrix.use_std_module == 'ON'
run: sudo apt-get install libc++-dev libc++abi-dev
- name: Install vcpkg
run: |
git clone https://github.com/microsoft/vcpkg.git
cd vcpkg && ./bootstrap-vcpkg.sh
echo "VCPKG_ROOT=${{ github.workspace }}/vcpkg" >> $GITHUB_ENV
- name: Export GitHub Actions cache environment variables
uses: actions/github-script@v7
with:
script: |
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');
- name: Apply patch for vcpkg-based dependency management
run: git apply vcpkg-deps.patch .github/workflows/ci-fix.patch
- name: Configure
run: |
mv .github/workflows/CMakeUserPresets.json .
cmake --preset=${{ matrix.use_std_module == 'ON' && 'clang-libcxx' || 'clang' }} \
-DCMAKE_BUILD_TYPE=${{ matrix.build }} \
-DVKU_USE_STD_MODULE=${{ matrix.use_std_module }}
- name: Install
run: cmake --build --preset=${{ matrix.use_std_module == 'ON' && 'clang-libcxx' || 'clang' }} --target install