-
Notifications
You must be signed in to change notification settings - Fork 0
108 lines (96 loc) · 3.34 KB
/
ci.yml
File metadata and controls
108 lines (96 loc) · 3.34 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
# All actions have a name that will be displayed in the "Actions" page in GitHub.
name: Continuous integration for RunnerPost
# Controls when the action will run.
on:
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "RunnerPost"
nomad:
# The type of runner that the job will run on
name: ${{ matrix.config.name }}
runs-on: ${{ matrix.config.os }}
strategy:
fail-fast: false
matrix:
config:
- {
name: "Windows -- VS2022", artifact: "Windows_VS2022.tar.xz",
os: windows-latest,
build_type: "Release", cc: "cl", cxx: "cl",
environment_script: "C:/Program Files (x86)/Microsoft Visual Studio/2022/Enterprise/VC/Auxiliary/Build/vcvars64.bat"
}
- {
name: "Ubuntu", artifact: "Linux.tar.xz",
os: ubuntu-latest,
build_type: "Release", cc: "gcc", cxx: "g++"
}
- {
name: "MacOS", artifact: "macOS.tar.xz",
os: macos-latest,
build_type: "Release", cc: "clang", cxx: "clang++"
}
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
# Usually this is always needed
- uses: actions/checkout@v5
- uses: actions/setup-python@v5
with:
python-version: '3.14'
- name: Prepare Python environment
run: >-
pip install setuptools wheel cython==0.29.* pytest
- name: Install dependencies on Windows
if: startsWith(matrix.config.name, 'Windows')
run: |
choco install cmake
cmake --version
- name: Install dependencies on Ubuntu
if: startsWith(matrix.config.name, 'Ubuntu')
run: |
sudo apt-get update
sudo apt-get install cmake
cmake --version
gcc --version
- name: Install dependencies on MacOS
if: startsWith(matrix.config.name, 'MacOS')
run: |
brew install cmake
cmake --version
- name: Configure on LinuxType
if: startsWith(matrix.config.name, 'MacOS') || startsWith(matrix.config.name, 'Ubuntu')
shell: bash
run: |
mkdir instdir
mkdir build
cd build
cmake \
-DCMAKE_CC_COMPILER=${{matrix.config.cc}} \
-DCMAKE_CXX_COMPILER=${{matrix.config.cxx}} \
-DBUILD_INTERFACE_PYTHON=ON \
-DBUILD_TESTS=ON \
-DCMAKE_INSTALL_PREFIX=../instdir \
..
- name: Configure on WindowsType
if: startsWith(matrix.config.name, 'Windows')
shell: bash
run: |
mkdir instdir
mkdir build
cd build
cmake .. -DBUILD_INTERFACE_PYTHON=ON -DBUILD_TESTS=ON -DCMAKE_INSTALL_PREFIX=../instdir
- name: Build
shell: bash
run: |
cmake --build build --config ${{matrix.config.build_type}} --clean-first --parallel
- name: Install
shell: bash
run: |
cmake --install build
- name: Tests
shell: bash
run: |
export PATH=`pwd`/build/bin:$PATH
echo $PATH
cd build
ctest -C ${{matrix.config.build_type}} -E outputqueue_unittestname --output-on-failure