Skip to content

Commit

Permalink
Merge remote-tracking branch 'autobuild/devel' into testing
Browse files Browse the repository at this point in the history
# Conflicts:
#	lib/apaka/packaging/templates/etc-pbuilderrc
  • Loading branch information
2maz committed Aug 26, 2023
2 parents 4bc442d + b92f88c commit a074e27
Show file tree
Hide file tree
Showing 6 changed files with 52 additions and 35 deletions.
25 changes: 0 additions & 25 deletions .github/workflows/test.yml

This file was deleted.

19 changes: 19 additions & 0 deletions .github/workflows/test_ubuntu-20.04.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: ubuntu-20.04
on: [push]
jobs:
unittests:
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Branch name
shell: bash
run: echo "branch=$(echo ${GITHUB_REF#refs/heads/})" >> $GITHUB_OUTPUT
id: current_branch

- name: Build 20.04
run: docker build -t apaka/ubuntu-20.04 -f Dockerfile.ubuntu-20.04 . --build-arg PKG_BRANCH=${{ steps.current_branch.outputs.branch }}

- name: Test-on-ubuntu:20.04
run: docker run --privileged apaka/ubuntu-20.04 /bin/sh -c "cd /home/docker/apaka/; BUNDLE_GEMFILE=/home/docker/apaka/test/workspace/.autoproj/Gemfile rake test"
19 changes: 19 additions & 0 deletions .github/workflows/test_ubuntu-22.04.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: ubuntu-22.04
on: [push]
jobs:
unittests:
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Branch name
shell: bash
run: echo "branch=$(echo ${GITHUB_REF#refs/heads/})" >> $GITHUB_OUTPUT
id: current_branch

- name: Build 22.04
run: docker build -t apaka/ubuntu-22.04 -f Dockerfile.ubuntu-22.04 . --build-arg PKG_BRANCH=${{ steps.current_branch.outputs.branch }}

- name: Test-on-ubuntu:22.04
run: docker run --privileged apaka/ubuntu-22.04 /bin/sh -c "cd /home/docker/apaka/; BUNDLE_GEMFILE=/home/docker/apaka/test/workspace/.autoproj/Gemfile rake test"
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# apaka: Automated PAcKaging for Autoproj
[![Build Status](https://github.com/rock-core/tools-apaka/actions/workflows/test.yml/badge.svg?branch=testing)](https://github.com/rock-core/tools-apaka/actions/workflows/test.yml)

[![ubuntu-20.04](https://github.com/rock-core/tools-apaka/actions/workflows/test_ubuntu/20.04.yml/badge.svg)](https://github.com/rock-core/tools-apaka/actions/workflows/test_ubuntu-20.04.yml)
[![ubuntu-22.04](https://github.com/rock-core/tools-apaka/actions/workflows/test_ubuntu-22.04.yml/badge.svg)](https://github.com/rock-core/tools-apaka/actions/workflows/test_ubuntu-22.04.yml)

* https://github.com/rock-core/tools-apaka

Expand Down
2 changes: 1 addition & 1 deletion lib/apaka/packaging/autoproj2adaptor.rb
Original file line number Diff line number Diff line change
Expand Up @@ -561,7 +561,7 @@ def dependencies(pkg, with_rock_release_prefix = true)
version = $1
end

name = name.gsub(/[<>=]=?.*$/,"")
name = name.gsub(/[ <>=]=?.*$/,"")

extra_gems << [name, version]
non_native_dependencies << [name, version]
Expand Down
18 changes: 11 additions & 7 deletions lib/apaka/packaging/templates/etc-pbuilderrc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/sh
set -ex
set -e

echo "Reading pbuilder /etc/pbuilderrc"

Expand All @@ -9,13 +9,17 @@ DEBIAN_DISTS="sid wheezy jessie stretch buster bullseye bookworm"
# debhelper-compat required with Starting with bulleye and focal
DIST_REQUIRES_NO_DEBHELPER="trusty vivid wily xenial yakkety zesty artful bionic wheezy jessie stretch buster"

if [ "x${DIST}" = "x" ] && [ "x${DISTRIBUTION}" != "x" ]; then
if [ -z ${DIST} ] && [ -n ${DISTRIBUTION} ]; then
echo "warning: DIST is not set, using DISTRIBUTION=${DISTRIBUTION}"
DIST=$DISTRIBUTION
elif [ "x${DIST}" != "x" ] && [ "x${DISTRIBUTION}" = "x" ]; then
elif [ -n ${DIST} ] && [ -n ${DISTRIBUTION} ]; then
echo "warning: DIST (${DIST}) and DISTRIBUTION (${DISTRIBUTION}) are both set. The value of DIST will be used."
DISTRIBUTION=$DIST
elif [ -n ${DIST} ] && [ -z ${DISTRIBUTION} ]; then
echo "warning: DISTRIBUTION is not set, using DIST=${DIST}"
DISTRIBUTION=$DIST
elif [ "x${DIST}" = "x" ] && [ "x${DISTRIBUTION}" = "x" ]; then
else
# no default distribution, let it fail
DIST=$(lsb_release -sc)
echo "warning: no distribution set -- using default: ${DIST}"
fi
Expand Down Expand Up @@ -47,8 +51,8 @@ if [ "$DIST_TYPE" == "ubuntu" ]; then
# The port mirror site provides arm64, armel, armhf
MIRRORSITE=http://ports.ubuntu.com/ubuntu-ports
fi
OTHERMIRROR="deb $MIRRORSITE $DIST-updates $COMPONENTS"

OTHERMIRROR="deb $MIRRORSITE $DIST-updates $COMPONENTS"
DEBOOTSTRAPOPTS=("${DEBOOTSTRAPOPTS[@]}" --components=main,restricted,universe,multiverse)
EXTRA_PACKAGES+="ruby-all-dev,"

Expand Down Expand Up @@ -94,7 +98,7 @@ fi
EXTRA_PACKAGES+="apt,apt-utils,cmake,dh-autoreconf,libgl1-mesa-dev,libboost-dev,yard,gem2deb,perl-openssl-defaults"
DEBOOTSTRAPOPTS+=("--include=$EXTRA_PACKAGES")

echo "DIST: ${DIST}"
echo "DISTRIBUTION: ${DISTRIBUTION} (DIST: ${DIST})"
echo "ARCH: ${ARCH}"
echo "COMPONENTS: ${COMPONENTS}"
echo "DIST_TYPE: ${DIST_TYPE}"
Expand Down

0 comments on commit a074e27

Please sign in to comment.