Skip to content

Commit

Permalink
DEB builder fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
pepone committed Feb 4, 2025
1 parent c35ea75 commit a188f10
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 29 deletions.
22 changes: 12 additions & 10 deletions .github/actions/build-deb-package/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,28 +19,30 @@ runs:
using: "composite"
steps:
- name: Build Docker Image
run: docker build -f ${{ inputs.dockerfile_path }} -t ice-debian-package-builder .
run: docker build --pull -f ${{ inputs.dockerfile_path }} -t ice-debian-package-builder .
shell: bash
working-directory: packaging/dpkg

- name: Run Package Build with Mounted Source
run: |
mkdir -p output
mkdir -p ${{RUNNER_TEMP}}/build
docker run --rm \
-v $PWD/../../../ice:/workspace/ice \
-v $PWD/output:/workspace/build \
-v ${{ env.GITHUB_WORKSPACE }}:/workspace/ice \
-v ${{ env.RUNNER_TEMP }}/build:/workspace/build \
-e ICE_VERSION=${{ inputs.ice_version }} \
-e DEB_BUILD_OPTIONS="${{ inputs.deb_build_options }}" \
--entrypoint /workspace/ice/packaging/dpkg/build-package.sh \
ice-debian-package-builder
working-directory: packaging/dpkg
shell: bash

- name: Upload Artifacts
uses: actions/upload-artifact@v4
with:
name: debian-packages-${{ inputs.os }}
path: |
packaging/dpkg/output/*.deb
packaging/dpkg/output/*.dsc
packaging/dpkg/output/*.tar.gz
packaging/dpkg/output/*.changes
packaging/dpkg/output/*.buildinfo
${{RUNNER_TEMP}}/build/*.deb
${{RUNNER_TEMP}}/build/*.dsc
${{RUNNER_TEMP}}/build/*.tar.gz
${{RUNNER_TEMP}}/build/*.changes
${{RUNNER_TEMP}}/build/*.buildinfo
11 changes: 4 additions & 7 deletions packaging/dpkg/build-package.sh
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,16 @@ if [ -z "$ICE_VERSION" ]; then
exit 1
fi

# Set working directory
cd /workspace

# Generate the upstream tarball
echo "Creating tarball for ICE_VERSION=$ICE_VERSION"
tar -czf zeroc-ice_${ICE_VERSION}.orig.tar.gz --exclude=debian -C /workspace/ice .
tar -czf /workspace/build/zeroc-ice_${ICE_VERSION}.orig.tar.gz --exclude=debian --exclude=.build -C /workspace/ice .

# Create build directory and unpack
mkdir -p build
cd build
mkdir -p /workspace/build/ice
cd /workspace/build/ice
tar xzf ../zeroc-ice_${ICE_VERSION}.orig.tar.gz

# Copy Debian packaging files and build
cp -rfv ../ice/packaging/dpkg/debian .
cp -rfv /workspace/ice/packaging/dpkg/debian .
dpkg-buildpackage -S
dpkg-buildpackage -b -uc -us
12 changes: 0 additions & 12 deletions packaging/dpkg/docker/ubuntu-24.04/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,3 @@ RUN apt-get update && apt-get install -y \
build-essential \
&& rm -rf /var/lib/apt/lists/* \
&& apt-get clean

# Set working directory
WORKDIR /workspace

# Copy build script into the container
COPY build-package.sh /usr/local/bin/build-package.sh

# Make the script executable
RUN chmod +x /usr/local/bin/build-package.sh

# Set the default command to run the build script (can be overridden)
ENTRYPOINT ["/usr/local/bin/build-package.sh"]

0 comments on commit a188f10

Please sign in to comment.