-
Notifications
You must be signed in to change notification settings - Fork 9
94 lines (81 loc) · 2.67 KB
/
boost_linux.yml
File metadata and controls
94 lines (81 loc) · 2.67 KB
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: Linux Boost Build
on:
workflow_dispatch:
inputs:
boost_version:
description: "Boost version"
required: true
default: "1.90.0"
workflow_call:
inputs:
boost_version:
description: "Boost version"
required: false
type: string
default: "1.90.0"
jobs:
build-linux:
runs-on: ubuntu-22.04
env:
BOOST_VERSION: ${{ inputs.boost_version }}
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
steps:
- name: Checkout
uses: actions/checkout@v4
# ===============================
# Prepare variables
# ===============================
- name: Prepare Boost variables
run: |
BOOST_VERSION_UNDERSCORE=$(echo "${BOOST_VERSION}" | tr '.' '_')
echo "BOOST_VERSION_UNDERSCORE=$BOOST_VERSION_UNDERSCORE" >> $GITHUB_ENV
# ===============================
# Restore Boost cache
# ===============================
- name: Restore Boost cache
id: boost-cache
uses: actions/cache@v4
with:
path: boost-install
key: boost-${{ runner.os }}-${{ env.BOOST_VERSION }}
# ===============================
# Install dependencies
# ===============================
- name: Install build dependencies
if: steps.boost-cache.outputs.cache-hit != 'true'
run: |
sudo apt-get update
sudo apt-get install -y build-essential wget tar
# ===============================
# Download Boost
# ===============================
- name: Download Boost
if: steps.boost-cache.outputs.cache-hit != 'true'
run: |
wget https://archives.boost.io/release/${BOOST_VERSION}/source/boost_${BOOST_VERSION_UNDERSCORE}.tar.gz
tar -xzf boost_${BOOST_VERSION_UNDERSCORE}.tar.gz
# ===============================
# Build Boost
# ===============================
- name: Build Boost
if: steps.boost-cache.outputs.cache-hit != 'true'
run: |
set -e
cd boost_${BOOST_VERSION_UNDERSCORE}
./bootstrap.sh --prefix=${{ github.workspace }}/boost-install
./b2 release -j$(nproc)
./b2 install
# ===============================
# Verify installation
# ===============================
- name: Verify Boost
run: |
ls -la boost-install/lib
# ===============================
# Upload artifact
# ===============================
- name: Upload Boost artifact
uses: actions/upload-artifact@v4
with:
name: boost-${{ runner.os }}-${{ env.BOOST_VERSION }}
path: boost-install