fix(crypto): use better OpenSSL error messages #59
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
on: | |
push: {} | |
pull_request: {} | |
name: Build | |
jobs: | |
build: | |
strategy: | |
matrix: | |
cmake-preset: | |
- linux # normal linux tests | |
- linux-openssl # tests compiling OpenSSL | |
- linux-sanitize | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Cache CMake build/dl folder | |
uses: actions/cache@v3 | |
with: | |
path: ./build/dl | |
key: ${{ runner.os }}-${{ matrix.cmake-preset }}-${{ hashFiles( 'lib/*' ) }} | |
- name: Configure | |
run: | | |
cmake --preset "${{ matrix.cmake-preset }}" | |
- name: Build | |
run: | | |
cmake --build --preset "${{ matrix.cmake-preset }}" | |
- name: Test | |
run: | | |
ctest --preset "${{ matrix.cmake-preset }}" --output-on-failure | |
- name: Install to ${{ runner.temp }}/brski-${{ matrix.cmake-preset }}/ | |
run: | | |
cmake --install "build/${{ matrix.cmake-preset }}" --prefix "${{ runner.temp }}/brski-${{ matrix.cmake-preset }}" | |
- name: Escape invalid chars in artifact name | |
id: escape_preset | |
run: | | |
preset='${{ matrix.cmake-preset }}' | |
# replace `/` with `-` | |
escaped_preset="${preset////-}" | |
echo "::set-output name=ESCAPED_CMAKE_PRESET::${escaped_preset}" | |
- name: Archive Install Output | |
uses: actions/upload-artifact@v3 | |
with: | |
name: brski-build-${{ steps.escape_preset.outputs.ESCAPED_CMAKE_PRESET }} | |
retention-days: 7 | |
path: | | |
${{ runner.temp }}/brski-${{ matrix.cmake-preset }}/ | |
build-deb: | |
name: Build Debian Package | |
# building a deb is super slow, but we're a public repo now, so it's free!! | |
runs-on: ubuntu-22.04 | |
strategy: | |
matrix: | |
architecture: [arm64, amd64] | |
distribution: | |
- jammy # uses libssl3 | |
permissions: | |
contents: write # needed for publishing release artifact | |
env: | |
OTHER_MIRROR: | |
deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports ${{ matrix.distribution }} main universe | deb [arch=amd64] http://archive.ubuntu.com/ubuntu ${{ matrix.distribution }} main universe | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Create pbuilder cache dir | |
# The actions/cache action does not have permissions to create the pbuilder | |
# cache folder if it doesn't exist | |
run: sudo mkdir -m777 -p /var/cache/pbuilder/ | |
- name: Cache pbuilder base | |
id: cache-pbuilder-base | |
uses: actions/cache@v3 | |
with: | |
path: | | |
/var/cache/pbuilder/base.tgz | |
key: ${{ runner.os }}-${{ matrix.distribution }}-${{ matrix.architecture }} | |
# Sometimes the cache step just freezes forever | |
# so put a limit on it so that we can restart it earlier on failure | |
timeout-minutes: 10 | |
- name: Set apt mirror | |
# GitHub Actions apt proxy is super unstable | |
# see https://github.com/actions/runner-images/issues/7048 | |
run: | | |
# make sure there is a `\t` between URL and `priority:*` attributes | |
printf 'http://azure.archive.ubuntu.com/ubuntu priority:1\n' | sudo tee /etc/apt/mirrors.txt | |
curl http://mirrors.ubuntu.com/mirrors.txt | sudo tee --append /etc/apt/mirrors.txt | |
sudo sed -i 's/http:\/\/azure.archive.ubuntu.com\/ubuntu\//mirror+file:\/etc\/apt\/mirrors.txt/' /etc/apt/sources.list | |
- name: Install dependencies | |
run: | | |
sudo apt-get update && sudo apt-get install pbuilder debhelper -y | |
- name: Setup pdebuilderrc for cross-compiling | |
env: | |
PBUILDER_RC: | | |
# Enable network access, since `cmake` downloads dependencies | |
USENETWORK=yes | |
# Faster than default, and is requried if we want to do cross-compiling | |
PBUILDERSATISFYDEPENDSCMD="/usr/lib/pbuilder/pbuilder-satisfydepends-apt" | |
run: | | |
echo "$PBUILDER_RC" | sudo tee -a /etc/pbuilderrc | |
- name: Build pbuilder base.tgz | |
if: steps.cache-pbuilder-base.outputs.cache-hit != 'true' | |
run: | | |
sudo pbuilder create --debootstrapopts --variant=buildd --distribution ${{ matrix.distribution }} --mirror "" --othermirror "$OTHER_MIRROR" | |
- name: Build .deb | |
run: | | |
mkdir -p '${{ runner.temp }}/pbuilder/result' | |
pdebuild --buildresult '${{ runner.temp }}/pbuilder/result' --debbuildopts "-us -uc" -- --override-config --distribution ${{ matrix.distribution }} --mirror "" --othermirror "$OTHER_MIRROR" --host-arch ${{ matrix.architecture }} | |
- name: Archive built debs | |
uses: actions/upload-artifact@v3 | |
with: | |
name: brski-built-debs | |
retention-days: 7 | |
path: | | |
${{ runner.temp }}/pbuilder/result/*.deb |