Files
swupd-client/scripts/github_actions/build_ci.bash
William Douglas 52ae6dadc1 Update rst2man path from Ubuntu
Correct the path where the rst2man script lives for CI to find it.

Signed-off-by: William Douglas <william.douglas@intel.com>
2023-02-17 12:58:05 -08:00

29 lines
1.1 KiB
Bash
Executable File

#!/bin/bash
# Install all dependencies available on ubuntu-latest from github actions to
# build swupd and run all tests.
# Builds swupd with configuration needed to run swupd tests
set -e
CORES=2
# Install dependencies from ubuntu
sudo apt-get install python3-docutils
sudo apt-get install check
sudo apt-get install bats
# Use rst2man from python3
sudo ln -s /usr/bin/rst2man /usr/bin/rst2man.py
# Build Swupd
autoreconf --verbose --warnings=none --install --force
./configure CFLAGS="$CFLAGS -fsanitize=address -Werror" --prefix=/usr --with-fallback-capaths="$PWD"/swupd_test_certificates --with-systemdsystemunitdir=/usr/lib/systemd/system --with-config-file-path="$PWD"/testconfig --enable-debug
make -j$CORES
# Needed to initialize the host for auto-update. Without these steps auto-update
# within a --path would just not work
sudo mkdir -p /usr/lib/systemd/system/
sudo cp data/swupd-update.service /usr/lib/systemd/system/
sudo cp data/swupd-update.timer /usr/lib/systemd/system/
sudo systemctl enable swupd-update.timer
sudo systemctl restart swupd-update.timer