-
Notifications
You must be signed in to change notification settings - Fork 206
149 lines (129 loc) · 5.4 KB
/
boost_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
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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
name: Build Boost
on: [push]
jobs:
build_windows:
if: ${{false}}
runs-on: windows-2019
steps:
- name: Create Build Environment
shell: cmd
run: |
mkdir ${{runner.workspace}}\boost_prebuild
- name: Download
shell: powershell
run: |
$Url = "https://boostorg.jfrog.io/artifactory/main/release/1.75.0/source/boost_1_75_0.zip"
(New-Object System.Net.WebClient).DownloadFile($Url, "$env:TEMP\boost_1_75_0.zip")
Expand-Archive -Path "$env:TEMP\boost_1_75_0.zip" -DestinationPath ${{runner.workspace}}/boost
- name: Bootstrap
shell: cmd
run: |
cd ${{runner.workspace}}\boost\boost_1_75_0
.\bootstrap.bat
- name: Build and install
shell: cmd
run: |
cd ${{runner.workspace}}\boost\boost_1_75_0
.\b2 install --prefix=${{runner.workspace}}\boost_prebuild address-model=64 variant=release threading=multi link=static runtime-link=static,shared --with-headers --with-filesystem --with-program_options --with-thread --with-regex --with-log --with-locale --with-coroutine --with-date_time --with-json --with-container
- uses: actions/upload-artifact@v2
with:
name: boost_prebuild_windows-2019
path: ${{runner.workspace}}\boost_prebuild
if-no-files-found: error
build_ubuntu:
if: ${{false}}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-18.04, ubuntu-20.04]
steps:
- name: Create Build Environment
shell: bash
run: |
mkdir ${{runner.workspace}}/boost_prebuild
sudo apt-get update
- name: Create Build Environment [ubuntu 16.04]
shell: bash
if: matrix.os == 'ubuntu-16.04'
run: |
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt-get update
sudo apt-get install g++-7
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-7 60 --slave /usr/bin/g++ g++ /usr/bin/g++-7
sudo update-alternatives --set gcc "/usr/bin/gcc-7"
- name: Download
shell: bash
run: |
wget -q https://boostorg.jfrog.io/artifactory/main/release/1.75.0/source/boost_1_75_0.tar.gz
tar -xvf boost_1_75_0.tar.gz > /dev/null
mv ./boost_1_75_0 ${{runner.workspace}}/boost
- name: Bootstrap
shell: bash
run: |
cd ${{runner.workspace}}/boost
./bootstrap.sh
- name: Build
shell: bash
run: |
cd ${{runner.workspace}}/boost
./b2 --target=static
- name: Install
shell: bash
run: |
cd ${{runner.workspace}}/boost
./b2 install --prefix=${{runner.workspace}}/boost_prebuild
- uses: actions/upload-artifact@v2
with:
name: boost_prebuild_${{matrix.os}}
path: ${{runner.workspace}}/boost_prebuild
if-no-files-found: error
build_osx:
#if: ${{false}}
runs-on: macos-12
steps:
- name: Create Build Environment
shell: bash
run: |
mkdir ${{runner.workspace}}/boost_prebuild
- name: Download
shell: bash
run: |
wget -q https://boostorg.jfrog.io/artifactory/main/release/1.78.0/source/boost_1_78_0.tar.gz
tar -xvf boost_1_78_0.tar.gz > /dev/null
# cp -R ./boost_1_78_0 ${{runner.workspace}}/boost_arm
mv ./boost_1_78_0 ${{runner.workspace}}/boost
- name: Bootstrap
shell: bash
run: |
cd ${{runner.workspace}}/boost
./bootstrap.sh
# cd ${{runner.workspace}}/boost_arm
# ./bootstrap.sh
- name: Build
shell: bash
run: |
# cd ${{runner.workspace}}/boost_arm
# ./b2 cxxstd=14 toolset=clang-darwin target-os=darwin architecture=arm abi=aapcs cxxflags="-arch arm64" cflags="-arch arm64" linkflags="-arch arm64" --target=static --without-iostreams
# mkdir -p arm64 && cp stage/lib/*.a arm64 && cp stage/lib/*.dylib arm64
cd ${{runner.workspace}}/boost
./b2 cxxstd=14 toolset=clang-darwin target-os=darwin architecture=x86 cxxflags="-arch x86_64" cflags="-arch x86_64" linkflags="-arch x86_64" abi=sysv binary-format=mach-o --target=static --without-iostreams
# mkdir x86_64 && cp stage/lib/*.a x86_64 && cp stage/lib/*.dylib x86_64
- name: Install
shell: bash
run: |
# cd ${{runner.workspace}}/boost_arm
# ./b2 install --prefix=${{runner.workspace}}/boost_prebuild_arm cxxstd=14
cd ${{runner.workspace}}/boost
./b2 install --prefix=${{runner.workspace}}/boost_prebuild cxxstd=14
# mkdir ${{runner.workspace}}/boost_prebuild/include/
# mkdir ${{runner.workspace}}/boost_prebuild/lib/
# cp -R ./boost ${{runner.workspace}}/boost_prebuild/include/
# find ${{runner.workspace}}/boost_prebuild_arm/lib -type f -print0 | while IFS= read -r -d $'\0' file; do lipo -create -output ${{runner.workspace}}/boost_prebuild/lib/$(basename "$file") "$file" ${{runner.workspace}}/boost_prebuild_x86_64/lib/$(basename "$file"); done;
- name: Pack
shell: bash
run: tar -zcvf boost_prebuild.tar.gz ${{runner.workspace}}/boost_prebuild
- uses: actions/upload-artifact@v2
with:
name: boost_prebuild_macos-11
path: boost_prebuild.tar.gz
if-no-files-found: error