-
Notifications
You must be signed in to change notification settings - Fork 240
99 lines (99 loc) · 3.29 KB
/
pr-checks.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
name: "PR Checks"
on: push
jobs:
build-test-windows:
name: "Build and Test on Windows"
runs-on: windows-2019
env:
VCPKG_BINARY_SOURCES: 'clear;nuget,GitHub,readwrite'
steps:
- name: "Checkout Repository"
uses: actions/checkout@v2
with:
submodules: true
- name: "Checkout vcpkg"
uses: actions/checkout@v2
with:
repository: microsoft/vcpkg
ref: 2023.12.12
path: vcpkg
- name: "Setup NuGet Credentials"
run: nuget sources add
-source "https://nuget.pkg.github.com/tangrams/index.json"
-name GitHub
-username tangrams
-password ${{ secrets.GITHUB_TOKEN }}
-storepasswordincleartext
- name: "Configure CMake"
run: cmake -S . -B .\build -G "Visual Studio 16 2019"
-DCMAKE_TOOLCHAIN_FILE=".\vcpkg\scripts\buildsystems\vcpkg.cmake"
-DCMAKE_BUILD_TYPE=Debug
-DTANGRAM_BUILD_TESTS=1
- name: "Run Build"
run: cmake --build .\build
- name: "Run Tests"
run: .\tests\Debug\tests.out.exe
working-directory: .\build
build-test-macos:
name: "Build and Test on macOS"
runs-on: macos-12
steps:
- name: "Checkout Repository"
uses: actions/checkout@v2
with:
submodules: true
- name: "Install dependencies"
run: brew install ninja ccache
- name: "Cache ccache directory"
uses: actions/cache@v2
with:
path: ~/Library/Caches/ccache
key: macos-ccache-v1-${{ github.sha }}
restore-keys: macos-ccache-v1-
- name: "Reset ccache stats"
run: ccache --zero-stats
- name: "Configure CMake"
run: cmake -S . -B ./build -G Ninja
-DCMAKE_BUILD_TYPE=Debug
-DCMAKE_C_COMPILER_LAUNCHER=ccache
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache
-DTANGRAM_BUILD_TESTS=1
- name: "Run build"
run: cmake --build ./build
- name: "Print ccache stats"
run: ccache --show-stats
- name: "Run Tests"
run: ./tests/tests.out
working-directory: ./build
- name: "Upload demo app"
uses: actions/upload-artifact@v2
with:
name: macos-app
path: build/*.app
retention-days: 60
build-ios:
name: "Build for iOS"
runs-on: macos-12
steps:
- name: "Checkout Repository"
uses: actions/checkout@v2
with:
submodules: true
- name: "Install dependencies"
run: brew install ccache
- name: "Cache ccache directory"
uses: actions/cache@v2
with:
path: ~/Library/Caches/ccache
key: ios-ccache-v1-${{ github.sha }}
restore-keys: ios-ccache-v1-
- name: "Reset ccache stats"
run: ccache --zero-stats
- name: "Build iOS simulator app with framework"
run: make ios-sim BUILD_TYPE=Debug CMAKE_OPTIONS="-DTANGRAM_XCODE_USE_CCACHE=1"
- name: "Build iOS simulator app with static library"
run: make ios-static-sim BUILD_TYPE=Debug CMAKE_OPTIONS="-DTANGRAM_XCODE_USE_CCACHE=1"
- name: "Build iOS Swift app"
run: make ios-swift-sim BUILD_TYPE=Debug CMAKE_OPTIONS="-DTANGRAM_XCODE_USE_CCACHE=1"
- name: "Print ccache stats"
run: ccache --show-stats