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
15fc1fae
Commit
15fc1fae
authored
1 year ago
by
jkito
Browse files
Options
Downloads
Patches
Plain Diff
[hack] test build on gitlab ci
parent
1462b86a
Branches
main
Branches containing commit
No related tags found
No related merge requests found
Pipeline
#194576
failed
1 year ago
Stage: build
Stage: debian
Stage: vendor
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
.gitlab-ci.yml
+5
-4
5 additions, 4 deletions
.gitlab-ci.yml
docker/Dockerfile
+44
-39
44 additions, 39 deletions
docker/Dockerfile
with
49 additions
and
43 deletions
.gitlab-ci.yml
+
5
−
4
View file @
15fc1fae
...
...
@@ -6,19 +6,20 @@ stages:
-
vendor
build_test
:
image
:
registry.0xacab.org/
leap
/bitmask-vpn:latest
image
:
registry.0xacab.org/
jkito
/bitmask-vpn:latest
stage
:
build
script
:
-
git apply docker/*.patch
-
make generate
-
make test
# TODO missing xcb package in the docker image. investigate what to install to run minimal tests.
# - make test_ui
-
make build
-
make
QMAKE=qmake6
build
tags
:
-
linux
artifacts
:
paths
:
-
'
qt
build/release/riseup-vpn'
-
'
build/
qt/
release/riseup-vpn'
expire_in
:
1 month
# branded_push:
...
...
@@ -55,7 +56,7 @@ build_test:
debian
:
# TODO use a buster builder image, but upgrade golang version for compatibility
image
:
registry.0xacab.org/
leap
/bitmask-vpn:latest
image
:
registry.0xacab.org/
jkito
/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'
...
...
This diff is collapsed.
Click to expand it.
docker/Dockerfile
+
44
−
39
View file @
15fc1fae
# 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.10
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"
ARG
DEBIAN_FRONTEND=noninteractive
RUN
apt-get update
&&
apt-get upgrade
--yes
&&
\
apt-get
install
--yes
--no-install-recommends
\
build-essential
\
...
...
@@ -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
\
...
...
@@ -26,59 +27,63 @@ RUN apt-get update && apt-get upgrade --yes && \
software-properties-common dh-golang
\
jq
\
squashfs-tools
\
qtbase5-dev qttools5-dev-tools qt5-qmake g++ qtdeclarative5-dev qt5-default
\
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
\
libgl1-mesa-dev qml6-module-qt5compat-graphicaleffects qt6-5compat-dev
\
golang-
${
GO_VERSION
}
-go
golang-go golang-golang-x-tools-dev
&&
\
rm
-r
/var/lib/apt/lists/
*
RUN
ln
-s
/usr/lib/qt6/bin/lrelease /usr/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/
#
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 rm -rf /gomods && mkdir -p /gomods/packages
#
WORKDIR /gomods
#
COPY mods/go.* /gomods/
#
COPY mods/packages/ /gomods/packages/
#
RUN go mod download
COPY
builder.sh /
...
...
@@ -89,6 +94,6 @@ RUN locale-gen en_US.UTF-8
ENV
LANG="en_US.UTF-8"
ENV
LANGUAGE="en_US:en"
ENV
LC_ALL="en_US.UTF-8"
ENV
SNAP="/snap/snapcraft/current"
ENV
SNAP_NAME="snapcraft"
ENV
SNAP_ARCH="amd64"
#
ENV SNAP="/snap/snapcraft/current"
#
ENV SNAP_NAME="snapcraft"
#
ENV SNAP_ARCH="amd64"
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