forked from ElementsProject/libwally-core
-
Notifications
You must be signed in to change notification settings - Fork 4
137 lines (130 loc) · 4.5 KB
/
check_push_cmake_build.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
name: push check
on:
push:
branches:
- cmake_build
- cfd-develop
- dlc-develop
- cfd-stable-*
- feature/*
pull_request:
branches:
- cmake_build
- cfd-develop
- dlc-develop
- cfd-stable-*
- feature/*
jobs:
cmake-build:
timeout-minutes: 20
name: cmake build
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-2022, windows-2019, macos-14, macos-13, macos-12, ubuntu-24.04, ubuntu-22.04, ubuntu-20.04]
generator: ['Unix Makefiles']
include:
- os: windows-2022
generator: 'Visual Studio 17 2022'
- os: windows-2019
generator: 'Visual Studio 16 2019'
- os: windows-2019
generator: 'MSYS Makefiles'
exclude:
- os: windows-2022
generator: 'Unix Makefiles'
- os: windows-2019
generator: 'Unix Makefiles'
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: setup python
uses: actions/setup-python@v5
with:
python-version: '3.x'
architecture: x64
- name: cmake-generate
if: "matrix.generator == 'Unix Makefiles' || matrix.generator == 'MSYS Makefiles'"
run: |
cmake -S . -B build -G "${{ matrix.generator }}" -DENABLE_SHARED=on -DENABLE_ELEMENTS=on -DCMAKE_BUILD_PARALLEL_LEVEL=2 -DGENERATE_WALLY=off -DTARGET_RPATH="./wrap_js/build/Release;\$\${ORIGIN}/;\${ORIGIN}/"
- name: cmake-generate-vs
if: "matrix.generator != 'Unix Makefiles' && matrix.generator != 'MSYS Makefiles'"
run: |
cmake -S . -B build -G "${{ matrix.generator }}" -A x64 -DENABLE_SHARED=on -DENABLE_ELEMENTS=on -DCMAKE_BUILD_PARALLEL_LEVEL=2 -DGENERATE_WALLY=off -DTARGET_RPATH="./wrap_js/build/Release;\$\${ORIGIN}/;\${ORIGIN}/"
- name: cmake-build
run: |
cmake --version
cmake --build build --config Release
- name: test
run: |
cd build
ctest -C Release --output-on-failure
cmake-swig-python-build:
timeout-minutes: 20
name: cmake swig python build
runs-on: ${{ matrix.os }}
strategy:
matrix:
# os: [macos-13, windows-2022, ubuntu-22.04]
os: [ubuntu-22.04]
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: setup python
uses: actions/setup-python@v5
with:
python-version: '3.x'
architecture: x64
- name: cmake-generate-python-config
if: matrix.os != 'windows-2022'
run: |
cmake -S . -B build -G "Unix Makefiles" -DENABLE_SHARED=on -DENABLE_ELEMENTS=on -DCMAKE_BUILD_PARALLEL_LEVEL=2 -DENABLE_SWIG_PYTHON=on -DGENERATE_WALLY=off -DTARGET_RPATH="./wrap_js/build/Release;../"
- name: cmake-generate-windows-python-config
if: matrix.os == 'windows-2022'
run: |
cmake -S . -B build -G "Visual Studio 17 2022" -A x64 -DENABLE_SHARED=on -DENABLE_ELEMENTS=on -DCMAKE_BUILD_PARALLEL_LEVEL=2 -DENABLE_SWIG_PYTHON=on -DGENERATE_WALLY=off -DTARGET_RPATH="./wrap_js/build/Release;../"
- name: cmake-build
run: |
cmake --version
cmake --build build --config Release
- name: test
run: |
cd build
ctest -C Release --output-on-failure
cmake-swig-java-build:
timeout-minutes: 20
name: cmake swig java build
runs-on: ${{ matrix.os }}
strategy:
matrix:
# os: [macos-13, windows-2022, ubuntu-22.04]
os: [ubuntu-22.04]
java: ['8', '11', '17', '21']
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: setup java
uses: actions/setup-java@v4
with:
java-version: ${{ matrix.java }}
architecture: x64
distribution: 'temurin'
- name: cmake-generate-java-config
if: matrix.os != 'windows-2022'
run: |
cmake -S . -B build -G "Unix Makefiles" -DENABLE_SHARED=on -DENABLE_ELEMENTS=on -DCMAKE_BUILD_PARALLEL_LEVEL=2 -DENABLE_SWIG_JAVA=on -DGENERATE_WALLY=off -DTARGET_RPATH="./wrap_js/build/Release;../"
- name: cmake-generate-windows-java-config
if: matrix.os == 'windows-2022'
run: |
cmake -S . -B build -G "Visual Studio 17 2022" -A x64 -DENABLE_SHARED=on -DENABLE_ELEMENTS=on -DCMAKE_BUILD_PARALLEL_LEVEL=2 -DENABLE_SWIG_JAVA=on -DGENERATE_WALLY=off -DTARGET_RPATH="./wrap_js/build/Release;../"
- name: cmake-build
run: |
cmake --version
cmake --build build --config Release
- name: test
run: |
cd build
ctest -C Release --output-on-failure