update lintian #704
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: Upcoming | |
on: | |
push: | |
branches: | |
- upcoming/** | |
jobs: | |
upcoming: | |
runs-on: ubuntu-24.04 | |
permissions: | |
contents: write | |
issues: write | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Free Disk Space (Ubuntu) | |
uses: jlumbroso/free-disk-space@main | |
with: | |
# this might remove tools that are actually needed, | |
# if set to "true" but frees about 6 GB | |
tool-cache: false | |
# all of these default to true, but feel free to set to | |
# "false" if necessary for your workflow | |
android: true | |
dotnet: true | |
haskell: true | |
large-packages: true | |
docker-images: true | |
swap-storage: true | |
- name: Env variables | |
id: env | |
run: | | |
sudo apt install yq -y | |
TAG_NAME=$(echo ${{ github.ref }} | sed 's/refs\/heads\///') | |
FOLDER=$(echo $TAG_NAME | sed 's/^[^\/]*\///') | |
if [ ! -d "$TAG_NAME" ]; then | |
# if the folder does not exist we switched to merge | |
echo "Switching to before merge" | |
TAG_NAME="releases/$FOLDER" | |
fi | |
if [ ! -d "$TAG_NAME" ]; then | |
echo "TAG_NAME folder does not exist. Neither with upcoming or releases" | |
exit 1 | |
fi | |
# Extract the second and third directories from the tag name | |
CODENAME=$(echo $TAG_NAME | cut -d'/' -f2) | |
TARGET_ARCH=$(echo $TAG_NAME | cut -d'/' -f3) | |
PACKAGE_NAME=$(echo $TAG_NAME | cut -d'/' -f4) | |
BUILD_ARCH=$(tomlq '.build_env.arch' $TAG_NAME/pkg-builder.toml | sed 's/"//g') | |
VERSION_NUMBER=$(echo $TAG_NAME | cut -d'/' -f5) | |
VERSION_NUMBER_WITHOUT_REVISON=$(echo $VERSION_NUMBER | cut -d'-' -f1) | |
BUILD_DIR=$(echo "/home/runner/.pkg-builder/packages/$CODENAME/$PACKAGE_NAME-$VERSION_NUMBER") | |
# Write outputs to GITHUB_OUTPUT environment file | |
echo "tag_name=$TAG_NAME" >> $GITHUB_OUTPUT | |
echo "codename=$CODENAME" >> $GITHUB_OUTPUT | |
echo "package_name=$PACKAGE_NAME" >> $GITHUB_OUTPUT | |
echo "version_number=$VERSION_NUMBER" >> $GITHUB_OUTPUT | |
echo "version_number_without_revision=$VERSION_NUMBER_WITHOUT_REVISON" >> $GITHUB_OUTPUT | |
echo "build_dir=$BUILD_DIR" >> $GITHUB_OUTPUT | |
echo "build_arch=$BUILD_ARCH" >> $GITHUB_OUTPUT | |
echo "target_arch=$TARGET_ARCH" >> $GITHUB_OUTPUT | |
# values | |
echo "tag_name=$TAG_NAME" | |
echo "codename=$CODENAME" | |
echo "build_arch=$BUILD_ARCH" | |
echo "target_arch=$TARGET_ARCH" | |
echo "package_name=$PACKAGE_NAME" | |
echo "version_number=$VERSION_NUMBER" | |
echo "version_number_without_revision=$VERSION_NUMBER_WITHOUT_REVISON" | |
echo "build_dir=$BUILD_DIR" | |
- name: Sbuild setup | |
run: | | |
sudo apt update | |
# Note this is an older version of sbuild, no need to patch it, yet | |
sudo apt install -y debhelper schroot ubuntu-dev-tools autopkgtest vmdb2 qemu-system-x86 | |
sudo apt install -y pkg-config libssl-dev uidmap | |
sudo apt install -y libfilesys-df-perl libmime-lite-perl | |
# change this into actually built version and cache it | |
wget https://github.com/eth-pkg/sbuild-ubuntu/releases/download/0.85-6-1/sbuild_0.85.6_all.deb | |
wget https://github.com/eth-pkg/sbuild-ubuntu/releases/download/0.85-6-1/libsbuild-perl_0.85.6_all.deb | |
sudo dpkg -i sbuild_0.85.6_all.deb libsbuild-perl_0.85.6_all.deb || true | |
- name: Checkout dependency repository | |
uses: actions/checkout@v4 | |
with: | |
repository: eth-pkg/pkg-builder | |
ref: main | |
path: pkg-builder | |
- name: Install pkg-builder | |
run: | | |
cd pkg-builder | |
cargo build --release | |
mkdir -p ${HOME}/.local/bin | |
mv target/release/pkg-builder ${HOME}/.local/bin | |
# add to path the prebuilt debcrafter binaries as well | |
cp bin_dependencies/debcrafter_* ${HOME}/.local/bin | |
chmod +x ${HOME}/.local/bin/pkg-builder | |
chmod +x ${HOME}/.local/bin/debcrafter_* | |
echo "${HOME}/.local/bin" >> $GITHUB_PATH | |
- name: Create chroot env | |
run: | | |
cd ${{ steps.env.outputs.tag_name }} | |
#sudo ln -s /usr/share/debootstrap/scripts/gutsy /usr/share/debootstrap/scripts/noble || true | |
pkg-builder env create | |
echo "${HOME}/.cache/sbuild/${{ steps.env.outputs.codename }}-amd64.tar.gz" >> $GITHUB_PATH | |
- name: package | |
run: | | |
cd ${{ steps.env.outputs.tag_name }} | |
pkg-builder package --run-piuparts false --run-autopkgtest false --run-lintian true | |
echo "${HOME}/.pkg-builder/packages/${{steps.env.outputs.codename}}/${{steps.env.outputs.package_name}}-${{steps.env.outputs.version_number}}" >> $GITHUB_PATH | |
- name: Save .deb | |
uses: actions/upload-artifact@v4 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
path: ${{ steps.env.outputs.build_dir }}/${{steps.env.outputs.package_name}}_${{steps.env.outputs.version_number}}_${{steps.env.outputs.target_arch}}.deb | |
name: ${{steps.env.outputs.package_name}}_${{steps.env.outputs.version_number}}_${{steps.env.outputs.target_arch}}.deb | |
compression-level: 0 | |
# - name: piuparts | |
# if: steps.env.outputs.codename != 'noble' | |
# run: | | |
# # installing debian-archive-keyring fails on ubuntu LTS, not sure why, but it says it is already installed | |
# # sudo apt install -y debian-archive-keyring | |
# sudo apt install piuparts | |
# cd ${{ steps.env.outputs.tag_name }} | |
# ${HOME}/.local/bin/pkg-builder piuparts | |
# - name: autopkgtest | |
# # also does not work, keeps failing on ubuntu noble | |
# # TODO will need to add package caching for autopkgtest, but this is a huge task, delaying, and releasing for now | |
# if: ${{ steps.env.outputs.codename != 'noble' && steps.env.outputs.package_name != 'ethereum-genesis-generator' }} | |
# run: | | |
# sudo cp -R ${HOME}/.pkg-builder /root | |
# apt list --installed autopkgtest | |
# cd ${{ steps.env.outputs.tag_name }} | |
# sudo ${HOME}/.local/bin/pkg-builder autopkgtest | |
- name: verify | |
run: | | |
cd ${{ steps.env.outputs.tag_name }} | |
${HOME}/.local/bin/pkg-builder verify --no-package true |