forked from alandefreitas/matplotplusplus
-
Notifications
You must be signed in to change notification settings - Fork 0
113 lines (111 loc) 路 3.73 KB
/
Copy pathbuild.yml
File metadata and controls
113 lines (111 loc) 路 3.73 KB
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
name: Matplotplusplus
on:
push:
paths:
- '**.c'
- '**.cpp'
- '**.h'
- '**.hpp'
- '**.cmake'
- '**/CMakeLists.txt'
- '.github/workflows/build.yml'
pull_request:
paths:
- '**.c'
- '**.cpp'
- '**.h'
- '**.hpp'
- '**.cmake'
- '**/CMakeLists.txt'
- '.github/workflows/build.yml'
jobs:
Build:
name: ${{ matrix.config.name }}
runs-on: ${{ matrix.config.os }}
strategy:
fail-fast: false
matrix:
config:
# see: https://github.com/actions/virtual-environments
- {
name: "Windows-MSVC/2019/Static/X86/Release",
os: windows-2019,
config: Release,
cmake_extra_args: -G "Visual Studio 16 2019" -A Win32,
sudocmd: "",
artifact_name: "Windows x86",
cores: 2,
}
- {
name: "Windows-MSVC/2019/Static/X64/Release",
os: windows-2019,
config: Release,
cmake_extra_args: -G "Visual Studio 16 2019" -A x64 -DCMAKE_CXX_FLAGS="/O2",
sudocmd: "",
artifact_name: "Windows x64",
cores: 2,
}
- {
name: "Windows-MinGW/2019/Static/X64/Release",
os: windows-2019,
config: Release,
cmake_extra_args: "-G \"MinGW Makefiles\" -DCMAKE_C_COMPILER=C:/msys64/mingw64/bin/gcc.exe -DCMAKE_CXX_COMPILER=C:/msys64/mingw64/bin/g++.exe",
sudocmd: "",
artifact_name: "Windows x64",
cores: 2,
}
- {
name: "Ubuntu/18.04/Static/X64/Release",
os: ubuntu-18.04,
config: Release,
cmake_extra_args: "-DCMAKE_C_COMPILER=/usr/bin/gcc-10 -DCMAKE_CXX_COMPILER=/usr/bin/g++-10 -DCMAKE_CXX_FLAGS=\"-O2\"",
sudocmd: "sudo",
artifact_name: "Linux",
cores: 2,
}
- {
name: "MacOSX/10.15/Static/X64/Release",
os: macos-10.15,
config: Release,
cmake_extra_args: "-DCMAKE_CXX_FLAGS=\"-O2\"",
sudocmd: "sudo",
artifact_name: "MacOSX",
cores: 4,
}
steps:
- uses: actions/checkout@v2
- name: Create Work Dir
run: mkdir build
- name: Configure
working-directory: ./build
run: |
cmake .. ${{ matrix.config.cmake_extra_args }} -DCMAKE_BUILD_TYPE=${{ matrix.config.config }} -DBUILD_WITH_PEDANTIC_WARNINGS=ON
- name: Build
working-directory: ./build
run: cmake --build . --parallel ${{ matrix.config.cores }} --config ${{ matrix.config.config }}
- name: Test
working-directory: ./build
run: ctest --parallel ${{ matrix.config.cores }} -C ${{ matrix.config.config }}
- name: Install
working-directory: ./build
run: ${{ matrix.config.sudocmd }} cmake --install .
- name: Integration Test
working-directory: ./test/integration
run: |
mkdir build
cd build
cmake .. ${{ matrix.config.cmake_extra_args }} -DCMAKE_BUILD_TYPE=${{ matrix.config.config }}
cmake --build . --parallel ${{ matrix.config.cores }} --config ${{ matrix.config.config }}
continue-on-error: true
- name: Create packages
working-directory: ./build
run: ${{ matrix.config.sudocmd }} cpack
- name: Archive Packages
uses: actions/upload-artifact@v2
with:
name: Binary Packages ${{ matrix.config.artifact_name }}
path: build/matplotplusplus-?.?.?-*.*
- name: Archive Installer Packages as is
uses: kittaakos/upload-artifact-as-is@v0
with:
path: build/matplotplusplus-?.?.?-*.*