-
Notifications
You must be signed in to change notification settings - Fork 111
94 lines (89 loc) · 3.4 KB
/
continuous-integration-workflow.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
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
name: Continuous Integration Build
on:
workflow_dispatch: # Allow manual triggers
pull_request:
branches: [ master ]
#push:
# branches: [ master ]
jobs:
ubuntu-build:
name: Ubuntu Build
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: recursive
- name: Create build directory and run CMake
run: |
sudo apt-get -y update
sudo apt-get -y install freeglut3-dev libboost-dev
cmake -S . -B cmake_build_dir -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=cmake_install_dir -DCOIN_BUILD_AWESOME_DOCUMENTATION=ON
- name: Build project
run: cmake --build cmake_build_dir --target install --config Release -- -j4
- name: Run tests
run: ctest -C Release -VV
working-directory: cmake_build_dir
- name: Create Artifacts
uses: actions/upload-artifact@v3
with:
name: Ubuntu-Artifacts
path: cmake_install_dir/
if: always()
- name: Deploy Awesome Dcoumentation to Github Pages
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: cmake_build_dir/html_awesome
windows-build:
name: Windows Build
runs-on: windows-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: recursive
- name: Create build directory and run CMake
shell: cmd
run: |
mkdir cmake_download_dir
set DOWNLOAD_FILE_BOOST=boost_1_72_0.zip
set DOWNLOAD_ADDRESS_BOOST=https://sourceforge.net/projects/boost/files/boost/1.72.0/boost_1_72_0.zip/download
echo download file %DOWNLOAD_FILE_BOOST% from address %DOWNLOAD_ADDRESS_BOOST%
curl -L -o %DOWNLOAD_FILE_BOOST% %DOWNLOAD_ADDRESS_BOOST%
7z x %DOWNLOAD_FILE_BOOST% -ocmake_download_dir
cmake -S . -B cmake_build_dir -G "Visual Studio 17 2022" -A x64 -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=cmake_install_dir -DBOOST_ROOT=cmake_download_dir/boost_1_72_0
- name: Build project
run: cmake --build cmake_build_dir --target INSTALL --config Release -- /nologo /verbosity:minimal /maxcpucount:2 /property:MultiProcessorCompilation=true
- name: Run tests
run: ctest -C Release -VV
working-directory: cmake_build_dir
- name: Create Artifacts
uses: actions/upload-artifact@v3
with:
name: Windows-Artifacts
path: cmake_install_dir/
if: always()
macos-build:
name: MacOS Build
runs-on: macos-14
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: recursive
- name: Create build directory and run CMake
run: |
brew install boost
cmake -S . -B cmake_build_dir -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=cmake_install_dir -DCMAKE_CXX_STANDARD=11
- name: Build project
run: cmake --build cmake_build_dir --target install --config Release -- -j4
- name: Run tests
run: ctest -C Release -VV
working-directory: cmake_build_dir
- name: Create Artifacts
uses: actions/upload-artifact@v3
with:
name: MacOS-Artifacts
path: cmake_install_dir/
if: always()