Skip to content

Commit

Permalink
Add manylinux build
Browse files Browse the repository at this point in the history
  • Loading branch information
kleag committed Apr 19, 2024
1 parent 7dd3847 commit e49c3f5
Show file tree
Hide file tree
Showing 2 changed files with 84 additions and 0 deletions.
48 changes: 48 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -108,3 +108,51 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

#========================================================================
manylinux_2_28_qhttpserver:
name: "Build the package for Manylinux 2.28"
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Free Disk Space (Ubuntu)
uses: jlumbroso/[email protected]
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: false
swap-storage: true
- name: Build image
run: docker build -f ./Dockerfile-manylinux2.28 -t aymara/qhttpserver-manylinux2.28:build .
- name: Extract package and version number from docker image
id: extract
shell: bash
run: |
dockerImage="aymara/qhttpserver-manylinux2.28:build"
packageDir="/usr/share/apps/qhttpserver/packages/"
cicd/extract_package.sh $dockerImage $packageDir $GITHUB_OUTPUT
- name: Upload nightly build package
if: ${{ !startsWith(github.ref, 'refs/tags/') }}
shell: bash
run: |
tagName=${{ steps.extract.outputs.version }}-nightly
gh release create --prerelease ${tagName} || /bin/true
gh release upload ${tagName} --clobber ./${{ steps.extract.outputs.filename }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Upload release package
uses: softprops/action-gh-release@v1
if: ${{ startsWith(github.ref, 'refs/tags/') }}
with:
name: ${{ steps.extract.outputs.version }}
files: |
./${{ steps.extract.outputs.filename }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

36 changes: 36 additions & 0 deletions Dockerfile-manylinux2.28
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
FROM aymara/manylinux_2_28_with_qt6.5:latest as aymara_manylinux_2_28_with_qt

ARG MANYLINUX_TAG
FROM quay.io/pypa/manylinux_2_28_x86_64:2022-10-25-fbea779

COPY --from=aymara_manylinux_2_28_with_qt /opt /opt
COPY --from=aymara_manylinux_2_28_with_qt /usr/local /usr/local

RUN yum install -y wget gcc-toolset-10.x86_64 ninja-build --nogpgcheck

RUN install -d /src/qhttpserver
COPY . /src/qhttpserver
#COPY docs /src/qhttpserver
#COPY LICENSE /src/qhttpserver
#COPY examples /src/qhttpserver
#COPY QHttpServerConfig-src.cmake /src/qhttpserver
#COPY README.md /src/qhttpserver
#COPY src /src/qhttpserver
#COPY CMakeLists.txt /src/qhttpserver
#COPY http-parser /src/qhttpserver
#COPY SystemSpecificInformations.cmake /src/qhttpserver

RUN install -d /src/qhttpserver/build

# Build
WORKDIR /src/qhttpserver/build
RUN cmake -G Ninja -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release ..
RUN ninja all && ninja package
RUN echo "export packagefile=`find /src/qhttpserver/build/ -maxdepth 1 -name *.tar.gz`" > /envfile
RUN echo "export fullname=\$(basename -- \$packagefile)" >> /envfile
RUN echo "export extension=\${fullname##*.}" >> /envfile
RUN echo "export filename=\${fullname%.*}" >> /envfile
RUN cat /envfile
RUN source /envfile && install -D ${packagefile} "/usr/share/apps/qhttpserver/packages/${filename}-manylinux_2_28.deb"


0 comments on commit e49c3f5

Please sign in to comment.