-
-
Notifications
You must be signed in to change notification settings - Fork 97
145 lines (137 loc) · 4.61 KB
/
cmake.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
134
135
136
137
138
139
140
141
142
143
144
145
name: cmake
on:
push:
branches:
- '*'
pull_request:
branches:
- '*'
env:
BUILD_TYPE: Release
jobs:
ubuntu-20-04:
strategy:
matrix:
target: [linux-arm64, linux-armhf, linux-i686, linux-riscv64, linux-x86_64, win32, win64, pluginval]
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- uses: distrho/dpf-cmake-action@v1
with:
target: ${{ matrix.target }}
dpf_path: .
ubuntu-22-04:
strategy:
matrix:
target: [linux-arm64, linux-armhf, linux-i686, linux-riscv64, linux-x86_64, win32, win64, pluginval]
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- uses: distrho/dpf-cmake-action@v1
with:
target: ${{ matrix.target }}
dpf_path: .
macos-11:
strategy:
matrix:
target: [macos-intel, macos-universal, macos-10.15]
runs-on: macos-11
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- uses: distrho/dpf-cmake-action@v1
with:
target: ${{ matrix.target }}
dpf_path: .
macos-12:
strategy:
matrix:
target: [macos-intel, macos-universal, macos-10.15]
runs-on: macos-12
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- uses: distrho/dpf-cmake-action@v1
with:
target: ${{ matrix.target }}
dpf_path: .
cmake_win32:
runs-on: windows-2019
steps:
- name: Set environment
run: |
echo "release_arch=Win32" >> "${Env:GITHUB_ENV}"
echo "vcpkg_triplet=x86-windows-static" >> "${Env:GITHUB_ENV}"
echo "vcpkg_git_commit_id=a3db16a4475b963cacf0260068c497fb72c8f3c0" >> "${Env:GITHUB_ENV}"
- name: Restore from cache and install vcpkg
uses: lukka/run-vcpkg@v6
with:
setupOnly: true
vcpkgTriplet: ${{env.vcpkg_triplet}}
vcpkgGitCommitId: ${{env.vcpkg_git_commit_id}}
#- name: Install packages
# run: |
# & "${Env:VCPKG_ROOT}/vcpkg" install "cairo:${Env:vcpkg_triplet}"
- uses: actions/checkout@v2
with:
submodules: recursive
- name: Create Build Environment
working-directory: ${{runner.workspace}}
run: cmake -E make_directory build
- name: Configure CMake
working-directory: ${{runner.workspace}}/build
run: |
cmake "${Env:GITHUB_WORKSPACE}" -G"Visual Studio 16 2019" -A"${Env:release_arch}" -DCMAKE_BUILD_TYPE="${Env:BUILD_TYPE}" -DVCPKG_TARGET_TRIPLET="${Env:vcpkg_triplet}" -DCMAKE_TOOLCHAIN_FILE="${Env:VCPKG_INSTALLATION_ROOT}/scripts/buildsystems/vcpkg.cmake"
- name: Build all
working-directory: ${{runner.workspace}}/build
run: cmake --build . --config "${Env:BUILD_TYPE}" -j 2
- name: Show built files
working-directory: ${{runner.workspace}}/build/bin
run: tree
- uses: actions/upload-artifact@v2
with:
name: Win32 artifacts
path: ${{runner.workspace}}/build/bin/
cmake_win64:
runs-on: windows-2019
steps:
- name: Set environment
run: |
echo "release_arch=x64" >> "${Env:GITHUB_ENV}"
echo "vcpkg_triplet=x64-windows-static" >> "${Env:GITHUB_ENV}"
echo "vcpkg_git_commit_id=a3db16a4475b963cacf0260068c497fb72c8f3c0" >> "${Env:GITHUB_ENV}"
- name: Restore from cache and install vcpkg
uses: lukka/run-vcpkg@v6
with:
setupOnly: true
vcpkgTriplet: ${{env.vcpkg_triplet}}
vcpkgGitCommitId: ${{env.vcpkg_git_commit_id}}
#- name: Install packages
# run: |
# & "${Env:VCPKG_ROOT}/vcpkg" install "cairo:${Env:vcpkg_triplet}"
- uses: actions/checkout@v2
with:
submodules: recursive
- name: Create Build Environment
working-directory: ${{runner.workspace}}
run: cmake -E make_directory build
- name: Configure CMake
working-directory: ${{runner.workspace}}/build
run: |
cmake "${Env:GITHUB_WORKSPACE}" -G"Visual Studio 16 2019" -A"${Env:release_arch}" -DCMAKE_BUILD_TYPE="${Env:BUILD_TYPE}" -DVCPKG_TARGET_TRIPLET="${Env:vcpkg_triplet}" -DCMAKE_TOOLCHAIN_FILE="${Env:VCPKG_INSTALLATION_ROOT}/scripts/buildsystems/vcpkg.cmake"
- name: Build all
working-directory: ${{runner.workspace}}/build
run: cmake --build . --config "${Env:BUILD_TYPE}" -j 2
- name: Show built files
working-directory: ${{runner.workspace}}/build/bin
run: tree
- uses: actions/upload-artifact@v2
with:
name: Win64 artifacts
path: ${{runner.workspace}}/build/bin/