-
Notifications
You must be signed in to change notification settings - Fork 0
89 lines (76 loc) · 3.36 KB
/
builddeps.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
name: Build E2SAR dependency artifacts
on:
workflow_dispatch:
env:
GRPC_VER: 1.54.1
BOOST_VER: 1.85.0
E2SAR_VER: 0.1.1
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-20.04, ubuntu-22.04, ubuntu-24.04]
steps:
- name: Set up environment
run: |
if [[ ${{ matrix.os }} == *"ubuntu"* ]]; then
sudo apt-get -yq update
sudo apt-get -yq install python3-pip build-essential autoconf cmake libtool pkg-config libglib2.0-dev ninja-build openssl libssl-dev libsystemd-dev protobuf-compiler libre2-dev
elif [[ ${{ matrix.os }} == *"rocky"* ]]; then
sudo yum -yq install epel-release
sudo yum -yq --enablerepo=devel update
sudo yum -yq --enablerepo=devel install gcc gcc-c++ kernel-devel make
sudo yum -yq --enablerepo=devel install python3-pip autoconf cmake libtool pkg-config ninja-build openssl protobuf-compiler glib2-devel re2-devel libquadmath-devel python39-devel python39
fi
- name: Set up authentication for HTTPS
run: |
git config --global url."https://github.com/".insteadOf "[email protected]:" # Force HTTPS to use PAT
- name: Create install directories
run: |
mkdir -p package/usr/local/include/
mkdir -p package/usr/local/lib
mkdir -p package/usr/local/lib64
- name: Checkout gRPC
uses: actions/checkout@v3
with:
repository: grpc/grpc
path: grpc
ref: v${{ env.GRPC_VER }}
submodules: true
- name: Build grpc
run: |
# note that with this, all prefixes in pkgconfig files will be ${IDIR} instead of /usr/local
# which is what is normally needed. This is OK to build e2sar, but not OK if you want to biuld
# debs out of these. We will fix in in the other workflow.
export IDIR=`pwd`/package/usr/local
mkdir -p grpc/cmake/build
pushd grpc/cmake/build
cmake -DgRPC_INSTALL=ON -DgRPC_BUILD_TESTS=OFF -DCMAKE_INSTALL_PREFIX=${IDIR} -DBUILD_SHARED_LIBS=ON ../..
make -j 4
make install
popd
- name: Download and build boost
if: steps.cache.outputs.cache-hit != 'true'
run: |
export IDIR=`pwd`/package/usr/local
# produce 1_85_0 from 1.85.0
export BOOST_SUB_VER=`echo ${{ env.BOOST_VER }} | sed s/\\\./_/g`
echo Preparing to download from https://archives.boost.io/release/${{ env.BOOST_VER }}/source/boost_${BOOST_SUB_VER}.tar.gz
wget -q https://archives.boost.io/release/${{ env.BOOST_VER }}/source/boost_${BOOST_SUB_VER}.tar.gz
echo Downloaded source, untarring
tar -zxf boost_${BOOST_SUB_VER}.tar.gz
echo Descending into build directory boost_${BOOST_SUB_VER} and starting build
ls .
cd boost_${BOOST_SUB_VER}
./bootstrap.sh
./b2
./b2 install --prefix=${IDIR}
- name: Tar the packaged files
run: |
tar -zcf package-e2sar-deps-${{ env.E2SAR_VER }}.tar.gz package/
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: ${{ matrix.os }}-package-e2sar-deps-${{ env.E2SAR_VER }}
path: package-e2sar-deps-${{ env.E2SAR_VER }}.tar.gz