Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
bitmask-vpn
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
leap
bitmask-vpn
Commits
141120fb
Commit
141120fb
authored
1 year ago
by
jkito
Browse files
Options
Downloads
Patches
Plain Diff
[ci] minimal build in ubuntu23.04 on gitlab ci
parent
2e685282
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!170
Updates to Qt6.6 and various misc fixes for window and macOS
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
.gitlab-ci.yml
+31
-33
31 additions, 33 deletions
.gitlab-ci.yml
docker/Dockerfile
+40
-41
40 additions, 41 deletions
docker/Dockerfile
docker/builder.sh
+1
-1
1 addition, 1 deletion
docker/builder.sh
with
72 additions
and
75 deletions
.gitlab-ci.yml
+
31
−
33
View file @
141120fb
---
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
:
-
'
qt
build/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
This diff is collapsed.
Click to expand it.
docker/Dockerfile
+
40
−
41
View file @
141120fb
# An image to build and package the BitmaskVPN (RiseupVPN and other branded builds)
# (c) LEAP Encryption Access Project 2018-2021
FROM
ubuntu:2
0
.04
as
builder
FROM
ubuntu:2
3
.04
as
builder
MAINTAINER
LEAP Encryption Access Project <info@leap.se>
ARG
GO_VERSION=1.1
6
ARG
GO_VERSION=1.
2
1
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 python
3
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 /
...
...
This diff is collapsed.
Click to expand it.
docker/builder.sh
+
1
−
1
View file @
141120fb
...
...
@@ -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"
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment