Skip to content

Commit

Permalink
using 22.04 for runner steps
Browse files Browse the repository at this point in the history
  • Loading branch information
filipecosta90 committed Feb 10, 2025
1 parent e93f9ad commit 80334c7
Showing 1 changed file with 8 additions and 48 deletions.
56 changes: 8 additions & 48 deletions .github/workflows/common-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,15 @@ on:
required: false
default: '[{"dist": "focal", "arch": "i386"}, {"dist": "jammy", "arch": "i386"}, {"dist": "noble", "arch": "i386"}]'
type: string
build_runner:
description: "os in which build steps run on"
required: false
default: "ubuntu:22.04"
type: string

jobs:
build-source-package:
runs-on: ubuntu-latest
runs-on: inputs.build_runner
continue-on-error: true
strategy:
matrix:
Expand Down Expand Up @@ -98,7 +103,7 @@ jobs:
memtier-benchmark_*.tar.*
build-binary-package:
runs-on: ubuntu-latest
runs-on: inputs.build_runner
environment: build
strategy:
matrix:
Expand Down Expand Up @@ -127,58 +132,13 @@ jobs:
env:
APT_SIGNING_KEY: ${{ secrets.APT_SIGNING_KEY }}

- name: Fix APT and Dependencies
run: |
sudo apt-get update --fix-missing
sudo apt-get install --reinstall apt libapt-pkg6.0 -y
sudo dpkg --configure -a
sudo apt-get install -f -y
sudo ldconfig
- name: Upgrade libstdc++6 for Compatibility
run: |
sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y || true
sudo apt-get update
sudo apt-get install -y libstdc++6
sudo ldconfig
- name: Install dependencies
run: |
sudo apt-get update && \
sudo apt-get install -y \
sbuild schroot debootstrap
sudo sbuild-adduser $USER
- name: Create Chroot if Missing
run: |
if ! schroot -l | grep -q "${{ matrix.dist }}-${{ matrix.arch }}-sbuild"; then
echo "Chroot does not exist, setting it up..."
sudo mkdir -p /var/lib/schroot/chroots
sudo sbuild-createchroot --arch=${{ matrix.arch }} ${{ matrix.dist }} /var/lib/schroot/chroots/${{ matrix.dist }}-${{ matrix.arch }}-sbuild http://deb.debian.org/debian || true
fi
- name: Ensure libapt-pkg.so.6.0 is Available in Chroot
run: |
sudo chroot /var/lib/schroot/chroots/${{ matrix.dist }}-${{ matrix.arch }}-sbuild bash -c "
if [ ! -f \"/usr/lib/x86_64-linux-gnu/libapt-pkg.so.6.0\" ]; then
echo 'libapt-pkg.so.6.0 is missing! Trying to reinstall...'
apt-get install --reinstall apt libapt-pkg6.0 -y
fi
"
- name: Install Cross-Build Essentials
if: matrix.arch != 'amd64'
run: |
sudo apt-get install -y crossbuild-essential-${{ matrix.arch }}
- name: Upgrade glibc in Chroot
run: |
sudo chroot /var/lib/schroot/chroots/${{ matrix.dist }}-${{ matrix.arch }}-sbuild bash -c "
apt-get update
apt-get install -y libc6 libstdc++6
ldconfig
"
- name: Prepare sbuild environment
run: sudo ./debian/setup_sbuild.sh ${{ matrix.dist }} ${{ env.BUILD_ARCH }}
- name: Get source package
Expand Down Expand Up @@ -207,7 +167,7 @@ jobs:
*.deb
smoke-test-packages:
runs-on: ubuntu-latest
runs-on: inputs.build_runner
needs: build-binary-package
env:
ARCH: amd64
Expand Down

0 comments on commit 80334c7

Please sign in to comment.