Skip to content

Commit 14de588

Browse files
fix cmake action
1 parent 20d237f commit 14de588

File tree

1 file changed

+50
-7
lines changed

1 file changed

+50
-7
lines changed

.github/workflows/cmake.yml

Lines changed: 50 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,17 +18,60 @@ jobs:
1818

1919
steps:
2020
- uses: actions/checkout@v3
21-
22-
- name: Init submodules
23-
run: git submodule init
24-
25-
- name: Update submodules
26-
run: git submodule update
21+
22+
- name: create tmp dir
23+
run: mkdir tmp
24+
25+
- name: update
26+
run: |
27+
sudo apt update
28+
sudo apt upgrade -y
29+
30+
- name: install cxxopts
31+
run: |
32+
git clone https://github.com/jarro2783/cxxopts.git tmp/cxxopts
33+
cd tmp/cxxopts
34+
git checkout $(git tag | grep -P '^v\d+\.\d+\.\d+$' | sort | tail -1)
35+
cmake -B build . -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCLANG_FORMAT=OFF -DCOMPILER_WARNINGS=OFF -DCLANG_TIDY=OFF
36+
cmake --build build
37+
sudo cmake --install build
38+
cd -
39+
40+
- name: install cxxshm
41+
run: |
42+
git clone https://github.com/NikolasK-source/cxxshm.git tmp/cxxshm
43+
cd tmp/cxxshm
44+
git checkout $(git tag | grep -P '^v\d+\.\d+\.\d+$' | sort | tail -1)
45+
cmake -B build . -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCLANG_FORMAT=OFF -DCOMPILER_WARNINGS=OFF -DCLANG_TIDY=OFF
46+
cmake --build build
47+
sudo cmake --install build
48+
cd -
49+
50+
- name: install cxxsemaphore
51+
run: |
52+
git clone https://github.com/NikolasK-source/cxxsemaphore.git tmp/cxxsemaphore
53+
cd tmp/cxxsemaphore
54+
git checkout $(git tag | grep -P '^v\d+\.\d+\.\d+$' | sort | tail -1)
55+
cmake -B build . -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCLANG_FORMAT=OFF -DCOMPILER_WARNINGS=OFF -DCLANG_TIDY=OFF
56+
cmake --build build
57+
sudo cmake --install build
58+
cd -
59+
60+
- name: install libmodbus
61+
run: |
62+
git clone https://github.com/stephane/libmodbus.git tmp/libmodbus
63+
cd tmp/libmodbus
64+
git checkout $(git tag | grep -P '^v\d+\.\d+\.\d+$' | sort | tail -1)
65+
autoreconf --install --symlink --force
66+
./configure
67+
make
68+
sudo make install
69+
cd -
2770
2871
- name: Configure CMake
2972
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
3073
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
31-
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCLANG_FORMAT=OFF -DCOMPILER_WARNINGS=OFF
74+
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCLANG_FORMAT=OFF -DCOMPILER_WARNINGS=OFF -DCLANG_TIDY=OFF -DBUILD_DOC=OFF
3275

3376
- name: Build
3477
# Build your program with the given configuration

0 commit comments

Comments
 (0)