-
Notifications
You must be signed in to change notification settings - Fork 0
88 lines (74 loc) · 2.47 KB
/
main.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
name: CI
on:
push:
paths:
- '.github/workflows/**'
- 'CMakeLists.txt'
- 'DGEngine.core/**'
- 'DGEngine.core/CMakeLists.txt'
- 'src/**'
- 'test/**'
pull_request:
paths:
- '.github/workflows/**'
- 'CMakeLists.txt'
- 'DGEngine.core/**'
- 'DGEngine.core/CMakeLists.txt'
- 'src/**'
- 'test/**'
env:
VCPKG_BINARY_SOURCES: "clear;x-gha,readwrite"
jobs:
build_linux:
name: linux build
runs-on: ubuntu-latest
steps:
- name: Checkout Columns
uses: actions/checkout@v4
- name: Export GitHub Actions cache environment variables
uses: actions/github-script@v6
with:
script: |
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');
- name: Install Ubuntu dependencies
uses: awalsh128/cache-apt-pkgs-action@latest
with:
packages: libx11-dev libxrandr-dev libxcursor-dev libxi-dev libudev-dev libgl1-mesa-dev
version: 1.0
execute_install_scripts: true
- name: Install dependencies
run: |
vcpkg install physfs sfml --triplet=x64-linux
- name: Setup Ninja Build
uses: turtlesec-no/get-ninja@main
- name: CMake build Columns
run: |
export CC=/usr/bin/gcc-11
export CXX=/usr/bin/g++-11
cmake --preset linux-x64-debug-vcpkg -DCMAKE_TOOLCHAIN_FILE=/usr/local/share/vcpkg/scripts/buildsystems/vcpkg.cmake
cmake --build --preset linux-x64-debug-vcpkg
build_windows:
name: windows build
runs-on: windows-latest
steps:
- name: Checkout Columns
uses: actions/checkout@v4
- name: Export GitHub Actions cache environment variables
uses: actions/github-script@v6
with:
script: |
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');
- name: Install dependencies
run: vcpkg install physfs sfml --triplet=x64-windows
- name: Setup MSVC
uses: TheMrMilchmann/setup-msvc-dev@v2
with:
arch: x64
- name: Setup Ninja Build
uses: turtlesec-no/get-ninja@main
- name: CMake build Columns
run: |
cmake --preset windows-x64-debug -DCMAKE_TOOLCHAIN_FILE=C:\vcpkg\scripts\buildsystems\vcpkg.cmake
cmake --build --preset windows-x64-debug