Skip to content

Commit cf8aeca

Browse files
authored
Merge pull request #145 from mujin/savebackup_githubaction
Add github action to ensure build [VC2010] [custom build]
2 parents 5eb1220 + c228740 commit cf8aeca

File tree

2 files changed

+91
-0
lines changed

2 files changed

+91
-0
lines changed

.github/workflows/build_linux.yaml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Build Linux
2+
3+
on:
4+
push:
5+
6+
jobs:
7+
build:
8+
runs-on: ${{ matrix.os }}
9+
strategy:
10+
matrix:
11+
os: [ubuntu-20.04]
12+
architecture: ["x64"]
13+
14+
steps:
15+
- uses: actions/checkout@v3
16+
- name: Set up APT
17+
if: ${{ matrix.os == 'ubuntu-20.04' || matrix.os == 'ubuntu-22.04' }}
18+
run: |
19+
sudo apt-get update -y
20+
sudo apt-get -y install g++ cmake-data cmake ninja-build libzmq3-dev liblog4cxx-dev libboost-filesystem-dev libboost-system-dev libboost-thread-dev libboost-date-time-dev libboost-program-options-dev libcurl4-openssl-dev
21+
- name: Install RapidJSON
22+
run: |
23+
set -e
24+
git clone https://github.com/Tencent/rapidjson.git && mkdir rapidjson/build
25+
cd rapidjson/build
26+
# there are no stable version available
27+
cmake .. -GNinja -DRAPIDJSON_HAS_STDSTRING=ON -DRAPIDJSON_BUILD_DOC=OFF -DRAPIDJSON_BUILD_EXAMPLES=OFF -DRAPIDJSON_BUILD_TESTS=OFF
28+
ninja -j4 && sudo ninja install
29+
cd ../..
30+
- name: Install
31+
run: |
32+
set -e
33+
mkdir -p build
34+
cd build
35+
cmake .. -GNinja -DOPT_SAMPLES=OFF -DOPT_BUILD_TESTS=OFF
36+
ninja -j4 && sudo ninja install
37+
cd ..
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: Build Windows
2+
3+
on:
4+
push:
5+
6+
jobs:
7+
build:
8+
runs-on: ${{ matrix.os }}
9+
strategy:
10+
matrix:
11+
os: [windows-2022]
12+
architecture: ["x64"]
13+
14+
steps:
15+
- uses: actions/checkout@v3
16+
- uses: microsoft/setup-msbuild@v1.1
17+
- name: Install Visual C++ 2010
18+
run: |
19+
MsiExec.exe /passive '/X{F0C3E5D1-1ADE-321E-8167-68EF0DE699A5}'
20+
MsiExec.exe /passive '/X{1D8E6291-B0D5-35EC-8441-6616F567A0F7}'
21+
choco install windows-sdk-7.1 -f -y --version 7.1.7600.20220204
22+
choco install KB2519277 -f -y
23+
- name: Add VC2010 path
24+
# https://stackoverflow.com/questions/24775363/how-to-build-with-v90-platform-toolset-in-vs2012-without-vs2008-using-windows-s/25671529#25671529
25+
run: echo "C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
26+
- name: Put ammintrin.h
27+
# https://stackoverflow.com/questions/30485525/missing-ammintrin-h-when-compiling-hadoop-on-windows
28+
# Usually VS2010 -> Windows7.1SDK -> VS2010SP1 -> KB2519277 installation, but skipping VS2010 might have issues...
29+
run: curl -L -o "C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ammintrin.h" http://www.mathworks.com/matlabcentral/answers/uploaded_files/735/ammintrin.m
30+
- name: Install RapidJSON
31+
run: |
32+
git clone https://github.com/Tencent/rapidjson.git && mkdir rapidjson\build
33+
cd rapidjson\build
34+
# there are no stable version available
35+
# but take the last version without -targets.cmake
36+
git checkout 516d0473949fdcf0a6dc9fbb40fa92b3b85db184
37+
cmake .. -G 'Visual Studio 17 2022' -A x64 -T Windows7.1SDK -DRAPIDJSON_HAS_STDSTRING=ON -DRAPIDJSON_BUILD_DOC=OFF -DRAPIDJSON_BUILD_EXAMPLES=OFF -DRAPIDJSON_BUILD_TESTS=OFF
38+
msbuild ALL_BUILD.vcxproj /p:Configuration=Release
39+
cd ..\..
40+
- name: Install libzmq
41+
run: |
42+
git clone https://github.com/zeromq/libzmq.git && mkdir libzmq\build
43+
cd libzmq\build
44+
git checkout v4.3.5
45+
cmake .. -G 'Visual Studio 17 2022' -A x64 -T Windows7.1SDK -DBUILD_TESTS=OFF
46+
msbuild ALL_BUILD.vcxproj /p:Configuration=Release
47+
cd ..\..
48+
- name: Install
49+
run: |
50+
mkdir -p build
51+
cd build
52+
cmake .. -G 'Visual Studio 17 2022' -A x64 -T Windows7.1SDK -DCMAKE_CXX_STANDARD=11 "-DZeroMQ_DIR=${PWD}\..\libzmq\build" -DCMAKE_CONFIGURATION_TYPES=Release -DOPT_SAMPLES=OFF -DOPT_BUILD_TESTS=OFF
53+
msbuild ALL_BUILD.vcxproj /p:Configuration=Release
54+
cd ..

0 commit comments

Comments
 (0)