Build E2SAR dependency artifacts #23
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build E2SAR dependency artifacts | |
on: | |
workflow_dispatch: | |
env: | |
GRPC_VER: 1.54.1 | |
BOOST_VER: 1.85.0 | |
E2SAR_VER: 0.1.2 | |
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 "git@github.com:" # 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 |