Skip to content

Update boost_build.yml #66

Update boost_build.yml

Update boost_build.yml #66

Workflow file for this run

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