Skip to content
Snippets Groups Projects
Commit 141120fb authored by jkito's avatar jkito :skull:
Browse files

[ci] minimal build in ubuntu23.04 on gitlab ci

parent 2e685282
No related branches found
No related tags found
1 merge request!170Updates to Qt6.6 and various misc fixes for window and macOS
---
stages:
- build
- push
- debian
- vendor
build_test:
image: registry.0xacab.org/leap/bitmask-vpn:latest
image: registry.0xacab.org/jkito/bitmask-vpn:latest
stage: build
script:
- make generate
- make test
- patch -p1 < docker/*.patch
# TODO missing xcb package in the docker image. investigate what to install to run minimal tests.
# - make test_ui
- make build
......@@ -18,7 +16,7 @@ build_test:
- linux
artifacts:
paths:
- 'qtbuild/release/riseup-vpn'
- 'build/qt/release/riseup-vpn'
expire_in: 1 month
# branded_push:
......@@ -53,32 +51,32 @@ build_test:
# - echo "Triggering CI pipeline on https://0xacab.org/leap/riseup-vpn_package/pipelines"
# - "curl -X POST -F token=$RISEUP_VPN_DEB_TRIGGER_TOKEN -F ref=master https://0xacab.org/api/v4/projects/1916/trigger/pipeline"
debian:
# TODO use a buster builder image, but upgrade golang version for compatibility
image: registry.0xacab.org/leap/bitmask-vpn:latest
stage: debian
script:
- 'PROVIDER="riseup" make vendor && rm -rf .build && mkdir -p .build && rm -f *.deb && cp -dR * .build/. && cd .build && debuild -us -uc'
artifacts:
paths:
- '*.deb'
# debian:
# # TODO use a buster builder image, but upgrade golang version for compatibility
# image: registry.0xacab.org/leap/bitmask-vpn:latest
# stage: debian
# script:
# - 'PROVIDER="riseup" make vendor && rm -rf .build && mkdir -p .build && rm -f *.deb && cp -dR * .build/. && cd .build && debuild -us -uc'
# artifacts:
# paths:
# - '*.deb'
vendorize:
image: registry.0xacab.org/leap/bitmask-vpn:latest
stage: vendor
script:
#- TODO build_all_providers script can be rescued when we achieve to bring back xbuild for win/osx.
# For now it only makes sense to build the snap.
#- 'PROVIDERS="riseup calyx" make build_all_providers'
- 'PROVIDER="riseup" make vendor && make package_snap'
artifacts:
name: installers-$CI_COMMIT_REF_NAME
paths:
- 'deploy/*.snap'
# - 'deploy/RiseupVPN-*.exe'
# - 'deploy/RiseupVPN-*.pkg'
# - 'deploy/riseup-vpn_*.deb'
# - 'deploy/CalyxVPN-*.exe'
# - 'deploy/CalyxVPN-*.pkg'
# - 'deploy/calyx-vpn_*.deb'
expire_in: 1 month
# vendorize:
# image: registry.0xacab.org/leap/bitmask-vpn:latest
# stage: vendor
# script:
# #- TODO build_all_providers script can be rescued when we achieve to bring back xbuild for win/osx.
# # For now it only makes sense to build the snap.
# #- 'PROVIDERS="riseup calyx" make build_all_providers'
# - 'PROVIDER="riseup" make vendor && make package_snap'
# artifacts:
# name: installers-$CI_COMMIT_REF_NAME
# paths:
# - 'deploy/*.snap'
# # - 'deploy/RiseupVPN-*.exe'
# # - 'deploy/RiseupVPN-*.pkg'
# # - 'deploy/riseup-vpn_*.deb'
# # - 'deploy/CalyxVPN-*.exe'
# # - 'deploy/CalyxVPN-*.pkg'
# # - 'deploy/calyx-vpn_*.deb'
# expire_in: 1 month
# An image to build and package the BitmaskVPN (RiseupVPN and other branded builds)
# (c) LEAP Encryption Access Project 2018-2021
FROM ubuntu:20.04 as builder
FROM ubuntu:23.04 as builder
MAINTAINER LEAP Encryption Access Project <info@leap.se>
ARG GO_VERSION=1.16
ARG GO_VERSION=1.21
LABEL Description="An image to build Bitmask Lite" Vendor="LEAP" Version="1.2"
ENV OSXSDK_SHA256="631b4144c6bf75bf7a4d480d685a9b5bda10ee8d03dbf0db829391e2ef858789" \
PATH="$PATH:/osxcross/target/bin:/usr/lib/go-${GO_VERSION}/bin"
PATH="$PATH:/osxcross/target/bin:/usr/lib/go-${GO_VERSION}/bin" \
QMAKE=qmake6
ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get upgrade --yes && \
......@@ -17,7 +18,7 @@ RUN apt-get update && apt-get upgrade --yes && \
git curl wget \
libappindicator3-dev libgtk-3-dev \
webkit2gtk-4.0 \
mingw-w64 upx-ucl python snapd \
mingw-w64 upx-ucl python3 snapd \
unzip sudo locales \
devscripts fakeroot debhelper \
clang llvm-dev libxml2-dev uuid-dev \
......@@ -25,60 +26,58 @@ RUN apt-get update && apt-get upgrade --yes && \
xz-utils bzip2 gzip sed cpio libbz2-dev \
software-properties-common dh-golang \
jq \
squashfs-tools \
qtbase5-dev qttools5-dev-tools qt5-qmake g++ qtdeclarative5-dev qt5-default \
golang-${GO_VERSION}-go golang-go golang-golang-x-tools-dev && \
squashfs-tools libgl-dev \
qml-module-qtquick-controls2 libqt6qml6 libqt6svg6-dev qt6-l10n-tools \
qt6-tools-dev qt6-tools-dev-tools qt6-base-dev qt6-base-dev-tools \
qt6-declarative-dev qt6-declarative-dev-tools \
qml6-module-qt5compat-graphicaleffects libqt6core5compat6 libqt6core5compat6-dev \
golang-${GO_VERSION}-go golang-golang-x-tools-dev && \
rm -r /var/lib/apt/lists/*
RUN ln -s $(qmake6 -query "QT_INSTALL_BINS")/lrelease /usr/local/bin/lrelease
# osx cross compiling
RUN git clone https://github.com/tpoechtrager/osxcross && \
cd osxcross/tarballs && \
wget https://s3.dockerproject.org/darwin/v2/MacOSX10.10.sdk.tar.xz && \
echo "${OSXSDK_SHA256} *MacOSX10.10.sdk.tar.xz" | sha256sum -c - && \
cd .. && UNATTENDED=1 ./build.sh && \
ln -s /osxcross/target/SDK/MacOSX10.10.sdk/usr/include/objc/NSObjCRuntime.h /osxcross/target/SDK/MacOSX10.10.sdk/usr/include/objc/NSObjcRuntime.h
#RUN git clone https://github.com/tpoechtrager/osxcross && \
# cd osxcross/tarballs && \
# wget https://s3.dockerproject.org/darwin/v2/MacOSX10.10.sdk.tar.xz && \
# echo "${OSXSDK_SHA256} *MacOSX10.10.sdk.tar.xz" | sha256sum -c - && \
# cd .. && UNATTENDED=1 ./build.sh && \
# ln -s /osxcross/target/SDK/MacOSX10.10.sdk/usr/include/objc/NSObjCRuntime.h /osxcross/target/SDK/MacOSX10.10.sdk/usr/include/objc/NSObjcRuntime.h
# bomutils (for osx packaging)
RUN git clone https://github.com/hogliux/bomutils && \
cd bomutils && make && sudo make install
#RUN git clone https://github.com/hogliux/bomutils && \
# cd bomutils && make && sudo make install
# xar (for osx packaging)
RUN git clone https://github.com/VantaInc/xar && \
cd xar/xar && \
./autogen.sh && ./configure && \
make && sudo make install
#RUN git clone https://github.com/VantaInc/xar && \
# cd xar/xar && \
# ./autogen.sh && ./configure && \
# make && sudo make install
# Grab the core18 and core20 snap (which snapcraft uses as a base) from the stable channel
# and unpack it in the proper place, to speed up snapcraft builds in the containers.
RUN curl -L $(curl -H 'X-Ubuntu-Series: 16' 'https://api.snapcraft.io/api/v1/snaps/details/core18' | jq '.download_url' -r) --output core18.snap
RUN mkdir -p /snap/core18
RUN unsquashfs -d /snap/core18/current core18.snap
RUN curl -L $(curl -H 'X-Ubuntu-Series: 16' 'https://api.snapcraft.io/api/v1/snaps/details/core20' | jq '.download_url' -r) --output core20.snap
RUN mkdir -p /snap/core20
RUN unsquashfs -d /snap/core20/current core20.snap
# RUN curl -L $(curl -H 'X-Ubuntu-Series: 16' 'https://api.snapcraft.io/api/v1/snaps/details/core18' | jq '.download_url' -r) --output core18.snap
# RUN mkdir -p /snap/core18
# RUN unsquashfs -d /snap/core18/current core18.snap
# RUN curl -L $(curl -H 'X-Ubuntu-Series: 16' 'https://api.snapcraft.io/api/v1/snaps/details/core20' | jq '.download_url' -r) --output core20.snap
# RUN mkdir -p /snap/core20
# RUN unsquashfs -d /snap/core20/current core20.snap
# Grab the snapcraft snap from the stable channel and unpack it in the proper
# place.
RUN curl -L $(curl -H 'X-Ubuntu-Series: 16' 'https://api.snapcraft.io/api/v1/snaps/details/snapcraft?channel=stable' | jq '.download_url' -r) --output snapcraft.snap
RUN mkdir -p /snap/snapcraft
RUN unsquashfs -d /snap/snapcraft/current snapcraft.snap
# RUN curl -L $(curl -H 'X-Ubuntu-Series: 16' 'https://api.snapcraft.io/api/v1/snaps/details/snapcraft?channel=stable' | jq '.download_url' -r) --output snapcraft.snap
# RUN mkdir -p /snap/snapcraft
# RUN unsquashfs -d /snap/snapcraft/current snapcraft.snap
# Create a snapcraft runner (TODO: move version detection to the core of
# snapcraft).
RUN mkdir -p /snap/bin
RUN echo "#!/bin/sh" > /snap/bin/snapcraft
RUN snap_version="$(awk '/^version:/{print $2}' /snap/snapcraft/current/meta/snap.yaml)" && echo "export SNAP_VERSION=\"$snap_version\"" >> /snap/bin/snapcraft
RUN echo 'exec "$SNAP/usr/bin/python3" "$SNAP/bin/snapcraft" "$@"' >> /snap/bin/snapcraft
RUN chmod +x /snap/bin/snapcraft
RUN ln -s /snap/bin/snapcraft /bin/
# cache go modules
RUN rm -rf /gomods && mkdir -p /gomods/packages
WORKDIR /gomods
COPY mods/go.* /gomods/
COPY mods/packages/ /gomods/packages/
RUN go mod download
# RUN mkdir -p /snap/bin
# RUN echo "#!/bin/sh" > /snap/bin/snapcraft
# RUN snap_version="$(awk '/^version:/{print $2}' /snap/snapcraft/current/meta/snap.yaml)" && echo "export SNAP_VERSION=\"$snap_version\"" >> /snap/bin/snapcraft
# RUN echo 'exec "$SNAP/usr/bin/python3" "$SNAP/bin/snapcraft" "$@"' >> /snap/bin/snapcraft
# RUN chmod +x /snap/bin/snapcraft
# RUN ln -s /snap/bin/snapcraft /bin/
COPY builder.sh /
......
......@@ -6,7 +6,7 @@ export DESTDIR="${HOSTDIR}"/deploy/
rm -rf "${GUESTDIR}"
cp -r "${HOSTDIR}" "${GUESTDIR}"
cd "${GUESTDIR}"
make prepare
make vendor
case $TYPE in
snap)
echo "[+] Building SNAP"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment