@@ -3,84 +3,94 @@ name: FMI4cpp CI
3
3
on : [ push, workflow_dispatch ]
4
4
5
5
jobs :
6
- conan-on-linux :
6
+
7
+ cmake-on-linux :
7
8
8
9
runs-on : ${{ matrix.os }}
9
- env :
10
- CC : gcc-${{ matrix.compiler_version }}
11
- CXX : g++-${{ matrix.compiler_version }}
12
10
strategy :
13
11
fail-fast : false
14
12
matrix :
15
13
os : [ubuntu-20.04]
16
- compiler_version : [9]
17
14
18
15
steps :
19
- - uses : actions/checkout@v2
16
+ - uses : actions/checkout@v3
20
17
21
18
- name : Install prerequisites
22
19
run : |
23
- sudo pip3 install --upgrade setuptools pip
24
- sudo pip3 install conan
20
+ sudo apt-get update && sudo apt-get install -y --no-install-recommends \
21
+ gcc g++ cmake libzip-dev libpugixml-dev
25
22
26
23
- name : Configure and build
27
24
run : |
28
- cmake . -B build -DFMI4CPP_USING_CONAN=TRUE - DFMI4CPP_BUILD_TESTS=ON -DFMI4CPP_BUILD_EXAMPLES=ON
25
+ cmake . -B build -DFMI4CPP_BUILD_TESTS=ON -DFMI4CPP_BUILD_EXAMPLES=ON -DCMAKE_BUILD_TYPE=Release
29
26
cmake --build build
30
27
31
28
- name : Test
32
29
run : |
33
30
cd build/tests && ctest
34
31
35
32
36
- conan -on-windows :
33
+ vcpkg -on-linux :
37
34
38
35
runs-on : ${{ matrix.os }}
36
+ env :
37
+ CC : gcc-${{ matrix.compiler_version }}
38
+ CXX : g++-${{ matrix.compiler_version }}
39
39
strategy :
40
40
fail-fast : false
41
41
matrix :
42
- os : [windows-2019]
42
+ os : [ubuntu-20.04]
43
+ compiler_version : [9]
43
44
44
45
steps :
45
- - uses : actions/checkout@v2
46
+ - uses : actions/checkout@v3
46
47
47
- - name : Install prerequisites
48
- run : |
49
- pip3 install conan
50
- shell : bash
48
+ - name : Restore artifacts, or run vcpkg, build (and cache artifacts as post step)
49
+ uses : lukka/run-vcpkg@v10
50
+ id : runvcpkg
51
+ with :
52
+ vcpkgDirectory : ' ${{ github.workspace }}/vcpkg'
53
+ vcpkgGitCommitId : ' 12c2a93b4007612b5ffa980c9d2235eb0bcac10f'
54
+ vcpkgJsonGlob : ' vcpkg.json'
55
+ appendedCacheKey : vcpkginstall
51
56
52
57
- name : Configure and build
53
58
run : |
54
- cmake . -B build -A x64 -DFMI4CPP_USING_CONAN=TRUE -DFMI4CPP_BUILD_TESTS=ON -DFMI4CPP_BUILD_EXAMPLES=ON
55
- cmake --build build --config Release
56
- shell : bash
59
+ cmake . -B build -DCMAKE_TOOLCHAIN_FILE="${{ github.workspace }}/vcpkg/scripts/buildsystems/vcpkg.cmake" -DFMI4CPP_BUILD_TESTS=ON -DFMI4CPP_BUILD_EXAMPLES=ON -DCMAKE_BUILD_TYPE=Release
60
+ cmake --build build
57
61
58
62
- name : Test
59
63
run : |
60
- cd build/tests && ctest -C Release
61
- shell : bash
64
+ cd build/tests && ctest
62
65
63
- cmake-on-linux :
66
+
67
+ vcpkg-on-windows :
64
68
65
69
runs-on : ${{ matrix.os }}
66
70
strategy :
67
71
fail-fast : false
68
72
matrix :
69
- os : [ubuntu-20.04 ]
73
+ os : [windows-2019, windows-2022 ]
70
74
71
75
steps :
72
- - uses : actions/checkout@v2
76
+ - uses : actions/checkout@v3
73
77
74
- - name : Install prerequisites
75
- run : |
76
- sudo apt-get install -y --no-install-recommends \
77
- gcc g++ cmake libzip-dev libpugixml-dev
78
+ - name : Restore artifacts, or run vcpkg, build (and cache artifacts as post step)
79
+ uses : lukka/run-vcpkg@v10
80
+ id : runvcpkg
81
+ with :
82
+ vcpkgDirectory : ' ${{ github.workspace }}/vcpkg'
83
+ vcpkgGitCommitId : ' 12c2a93b4007612b5ffa980c9d2235eb0bcac10f'
84
+ vcpkgJsonGlob : ' vcpkg.json'
85
+ appendedCacheKey : vcpkginstall
78
86
79
87
- name : Configure and build
80
88
run : |
81
- cmake . -B build -DFMI4CPP_BUILD_TESTS=ON -DFMI4CPP_BUILD_EXAMPLES=ON
82
- cmake --build build
89
+ cmake . -B build -A x64 -DCMAKE_TOOLCHAIN_FILE="${{ github.workspace }}/vcpkg/scripts/buildsystems/vcpkg.cmake" -DFMI4CPP_BUILD_TESTS=ON -DFMI4CPP_BUILD_EXAMPLES=ON -DCMAKE_BUILD_TYPE=Release
90
+ cmake --build build --config Release
91
+ shell : bash
83
92
84
93
- name : Test
85
94
run : |
86
- cd build/tests && ctest
95
+ cd build/tests && ctest -C Release
96
+ shell : bash
0 commit comments