-
Notifications
You must be signed in to change notification settings - Fork 0
115 lines (98 loc) · 3.51 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
name: CMake
on:
push:
branches: [ master ]
paths-ignore:
- '**.md'
- '**.pdf'
- 'reports/**'
- 'docs/**'
- 'parser/**'
pull_request:
branches: [ master ]
paths-ignore:
- '**.md'
- '**.pdf'
- 'reports/**'
- 'docs/**'
- 'parser/**'
env:
BUILD_TYPE: Release
jobs:
build:
name: ${{ matrix.os }}-${{ matrix.cxx_compiler || matrix._cxx_compiler }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
c_compiler: gcc-10
cxx_compiler: g++-10
generator: '-G "Unix Makefiles"'
- os: ubuntu-latest
c_compiler: clang
cxx_compiler: clang++
generator: '-G "Unix Makefiles"'
- os: macos-latest
c_compiler: clang
cxx_compiler: clang++
generator: '-G "Unix Makefiles"'
- os: windows-latest
# c_compiler: msbuild
# cxx_compiler: msbuild
_cxx_compiler: msbuild
# generator: '-G "Unix Makefiles"'
- os: windows-latest
c_compiler: x86_64-w64-mingw32-gcc
cxx_compiler: x86_64-w64-mingw32-g++
generator: '-G "MinGW Makefiles"'
outputs:
upload_url: ${{ steps.create_release.outputs.upload_url }}
steps:
- uses: actions/checkout@v3
- name: Set up MinGW
if: ${{matrix.cxx_compiler == 'x86_64-w64-mingw32-g++'}}
uses: deevroman/[email protected]
with:
platform: x64
# - name: update MinGW
# if: ${{matrix.cxx_compiler == 'x86_64-w64-mingw32-g++'}}
# run: choco upgrade mingw
- name: Build llp
run: |
cmake -B ${{github.workspace}}/llp/build ${{matrix.generator}} -DCMAKE_CXX_COMPILER=${{matrix.cxx_compiler}} -DCMAKE_C_COMPILER=${{matrix.c_compiler}} -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} ${{github.workspace}}/llp
cmake --build ${{github.workspace}}/llp/build --config ${{env.BUILD_TYPE}}
- name: Build examples
run: |
cmake -B ${{github.workspace}}/examples/build ${{matrix.generator}} -DCMAKE_CXX_COMPILER=${{matrix.cxx_compiler}} -DCMAKE_C_COMPILER=${{matrix.c_compiler}} -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} ${{github.workspace}}/examples
cmake --build ${{github.workspace}}/examples/build --config ${{env.BUILD_TYPE}}
- uses: actions/upload-artifact@v3
with:
name: ${{ matrix.os }}-${{ matrix.cxx_compiler || matrix._cxx_compiler}}-llp
path: examples/build/bin/*/*
retention-days: 1
- name: test
working-directory: ${{github.workspace}}/llp/build
run: ctest -C ${{env.BUILD_TYPE}} --output-on-failure --exclude-regex Bench
- name: bench
working-directory: ${{github.workspace}}/llp/build
run: ctest -C ${{env.BUILD_TYPE}} --output-on-failure --tests-regex Bench -VV
create_release:
name: "Prelease"
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v3
- uses: "marvinpinto/action-automatic-releases@latest"
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: "latest"
prerelease: true
title: "Development Build"
files: |
ubuntu-latest-g++-10-llp
ubuntu-latest-clang++-llp
macos-latest-clang++-llp
windows-latest-msbuild-llp
windows-latest-x86_64-w64-mingw32-g++-llp