-
Notifications
You must be signed in to change notification settings - Fork 34
48 lines (44 loc) · 1.48 KB
/
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
# Basic compilation and unit testing via GitHub Actions.
# Full CI testing is also run internally by Modelon (via Jenkinsfile.groovy).
on:
push:
pull_request:
permissions:
contents: read
jobs:
linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install system
run: sudo apt-get update -y && sudo apt-get -y install cmake
- name: Build
run: |
cmake -DCMAKE_INSTALL_PREFIX=~/.local -DFMILIB_GENERATE_DOXYGEN_DOC=0 -B build_cmake .
cmake --build build_cmake --target install --parallel 4
- name: Test
run: ctest --test-dir build_cmake --output-on-failure
- name: External test
run: |
cd Test/test_installation
cmake -DFMIL_HOME=~/.local .
cmake --build .
ctest --output-on-failure
windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: Build
shell: cmd
run: |
cmake -DCMAKE_INSTALL_PREFIX=%CD:\=/%/build_cmake/install -DFMILIB_GENERATE_DOXYGEN_DOC=0 -B build_cmake . || exit 1
cmake --build build_cmake --target install --parallel 4 || exit 1
- name: Test
run: ctest --test-dir build_cmake --output-on-failure -C Release --timeout 200
- name: External test
shell: cmd
run: |
cd Test/test_installation
cmake -DFMIL_HOME=%CD:\=/%/../../build_cmake/install .
cmake --build .
ctest --output-on-failure