Isolate build tools step #1102
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
# This file is auto generated, changes should be made to src/* then run build.sh to regenerate this file | |
name: 'build-test' | |
on: [pull_request, push] | |
# secrets: | |
# * GOOGLE_CREDENTIALS - base64 encoded google service account credentials, must be a single line with no whitespace | |
# * RESULTS_SHEET_ID - google sheets id of sheet to upload results to | |
env: | |
SECRET_GOOGLE_CREDENTIALS: ${{ secrets.GOOGLE_CREDENTIALS }} | |
SECRET_RESULTS_SHEET_ID: ${{ secrets.RESULTS_SHEET_ID }} | |
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true | |
jobs: | |
build_and_test_ubuntu_14: | |
name: '${{ matrix.os }}: build and test (install mdns: ${{ matrix.install_mdns }}, use conan: ${{ matrix.use_conan }}, force cpprest asio: ${{ matrix.force_cpprest_asio }}, dns-sd mode: ${{ matrix.dns_sd_mode}}, enable_authorization: ${{ matrix.enable_authorization }})' | |
runs-on: ubuntu-20.04 | |
container: | |
image: ubuntu:14.04 | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-14.04] | |
install_mdns: [true] | |
use_conan: [false] | |
force_cpprest_asio: [false] | |
dns_sd_mode: [multicast] | |
enable_authorization: [true] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: set environment variables | |
shell: bash | |
run: | | |
if [[ "${{ runner.os }}" == "Linux" ]]; then | |
if [[ "${{ matrix.install_mdns }}" == "true" ]]; then | |
echo "BUILD_NAME=${{ matrix.os }}_mdns_${{ matrix.dns_sd_mode }}" >> $GITHUB_ENV | |
else | |
echo "BUILD_NAME=${{ matrix.os }}_avahi_${{ matrix.dns_sd_mode }}" >> $GITHUB_ENV | |
fi | |
elif [[ "${{ matrix.force_cpprest_asio }}" == "true" ]]; then | |
echo "BUILD_NAME=${{ matrix.os }}_asio" >> $GITHUB_ENV | |
else | |
echo "BUILD_NAME=${{ matrix.os }}" >> $GITHUB_ENV | |
fi | |
GITHUB_COMMIT=`echo "${{ github.sha }}" | cut -c1-7` | |
echo "GITHUB_COMMIT=$GITHUB_COMMIT" >> $GITHUB_ENV | |
# github.workspace points to the host path not the docker path, the home directory defaults to the workspace directory | |
echo "GITHUB_WORKSPACE=`pwd`" >> $GITHUB_ENV | |
cd .. | |
echo "RUNNER_WORKSPACE=`pwd`" >> $GITHUB_ENV | |
- name: install build tools | |
run: | | |
apt-get update -q | |
apt-get install -y software-properties-common | |
apt-get --allow-unauthenticated update -q | |
apt-get --allow-unauthenticated install -y curl g++ git make patch zlib1g-dev libssl-dev bsdmainutils dnsutils unzip | |
# ubuntu-14.04 ca-certificates are out of date | |
git config --global http.sslVerify false | |
# build and install openssl | |
curl -OsSk https://www.openssl.org/source/openssl-1.1.1v.tar.gz | |
tar xzf openssl-1.1.1v.tar.gz | |
cd openssl-1.1.1v | |
./config --prefix=/usr/local/custom-openssl --libdir=lib --openssldir=/etc/ssl | |
make -j1 depend | |
make -j8 | |
make install_sw | |
cd .. | |
# install ffi.h, which is required for python build | |
apt install libffi-dev | |
# build and install python | |
curl -sSk https://www.python.org/ftp/python/3.11.5/Python-3.11.5.tar.xz | tar -xJ | |
cd Python-3.11.5 | |
./configure -C --with-openssl=/usr/local/custom-openssl --with-openssl-rpath=auto | |
make -j8 | |
make install | |
update-alternatives --install /usr/bin/python3 python3 /usr/local/bin/python3.11 3 | |
ln -s /usr/local/bin/python3.11 /usr/bin/python | |
curl -sS https://bootstrap.pypa.io/pip/3.6/get-pip.py | python | |
curl -sS https://nodejs.org/dist/v12.16.2/node-v12.16.2-linux-x64.tar.xz | tar -xJ | |
echo "`pwd`/node-v12.16.2-linux-x64/bin" >> $GITHUB_PATH | |