Skip to content

Commit e49c3f5

Browse files
committed
Add manylinux build
1 parent 7dd3847 commit e49c3f5

File tree

2 files changed

+84
-0
lines changed

2 files changed

+84
-0
lines changed

.github/workflows/main.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,3 +108,51 @@ jobs:
108108
env:
109109
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
110110

111+
#========================================================================
112+
manylinux_2_28_qhttpserver:
113+
name: "Build the package for Manylinux 2.28"
114+
runs-on: ubuntu-latest
115+
steps:
116+
- name: Checkout code
117+
uses: actions/checkout@v3
118+
- name: Free Disk Space (Ubuntu)
119+
uses: jlumbroso/[email protected]
120+
with:
121+
# this might remove tools that are actually needed,
122+
# if set to "true" but frees about 6 GB
123+
tool-cache: false
124+
# all of these default to true, but feel free to set to
125+
# "false" if necessary for your workflow
126+
android: true
127+
dotnet: true
128+
haskell: true
129+
large-packages: false
130+
swap-storage: true
131+
- name: Build image
132+
run: docker build -f ./Dockerfile-manylinux2.28 -t aymara/qhttpserver-manylinux2.28:build .
133+
- name: Extract package and version number from docker image
134+
id: extract
135+
shell: bash
136+
run: |
137+
dockerImage="aymara/qhttpserver-manylinux2.28:build"
138+
packageDir="/usr/share/apps/qhttpserver/packages/"
139+
cicd/extract_package.sh $dockerImage $packageDir $GITHUB_OUTPUT
140+
- name: Upload nightly build package
141+
if: ${{ !startsWith(github.ref, 'refs/tags/') }}
142+
shell: bash
143+
run: |
144+
tagName=${{ steps.extract.outputs.version }}-nightly
145+
gh release create --prerelease ${tagName} || /bin/true
146+
gh release upload ${tagName} --clobber ./${{ steps.extract.outputs.filename }}
147+
env:
148+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
149+
- name: Upload release package
150+
uses: softprops/action-gh-release@v1
151+
if: ${{ startsWith(github.ref, 'refs/tags/') }}
152+
with:
153+
name: ${{ steps.extract.outputs.version }}
154+
files: |
155+
./${{ steps.extract.outputs.filename }}
156+
env:
157+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
158+

Dockerfile-manylinux2.28

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
FROM aymara/manylinux_2_28_with_qt6.5:latest as aymara_manylinux_2_28_with_qt
2+
3+
ARG MANYLINUX_TAG
4+
FROM quay.io/pypa/manylinux_2_28_x86_64:2022-10-25-fbea779
5+
6+
COPY --from=aymara_manylinux_2_28_with_qt /opt /opt
7+
COPY --from=aymara_manylinux_2_28_with_qt /usr/local /usr/local
8+
9+
RUN yum install -y wget gcc-toolset-10.x86_64 ninja-build --nogpgcheck
10+
11+
RUN install -d /src/qhttpserver
12+
COPY . /src/qhttpserver
13+
#COPY docs /src/qhttpserver
14+
#COPY LICENSE /src/qhttpserver
15+
#COPY examples /src/qhttpserver
16+
#COPY QHttpServerConfig-src.cmake /src/qhttpserver
17+
#COPY README.md /src/qhttpserver
18+
#COPY src /src/qhttpserver
19+
#COPY CMakeLists.txt /src/qhttpserver
20+
#COPY http-parser /src/qhttpserver
21+
#COPY SystemSpecificInformations.cmake /src/qhttpserver
22+
23+
RUN install -d /src/qhttpserver/build
24+
25+
# Build
26+
WORKDIR /src/qhttpserver/build
27+
RUN cmake -G Ninja -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release ..
28+
RUN ninja all && ninja package
29+
RUN echo "export packagefile=`find /src/qhttpserver/build/ -maxdepth 1 -name *.tar.gz`" > /envfile
30+
RUN echo "export fullname=\$(basename -- \$packagefile)" >> /envfile
31+
RUN echo "export extension=\${fullname##*.}" >> /envfile
32+
RUN echo "export filename=\${fullname%.*}" >> /envfile
33+
RUN cat /envfile
34+
RUN source /envfile && install -D ${packagefile} "/usr/share/apps/qhttpserver/packages/${filename}-manylinux_2_28.deb"
35+
36+

0 commit comments

Comments
 (0)