Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integrate With CI #5

Open
bonedaddy opened this issue Dec 11, 2019 · 4 comments
Open

Integrate With CI #5

bonedaddy opened this issue Dec 11, 2019 · 4 comments
Labels
good first issue Good for newcomers help wanted Extra attention is needed

Comments

@bonedaddy
Copy link
Contributor

Integrate this codebase with Travis CI for automated testing against pull requests, and integrate with dockerhub to automatically build docker images

@bonedaddy bonedaddy added good first issue Good for newcomers help wanted Extra attention is needed labels Dec 11, 2019
@NokiDev
Copy link
Contributor

NokiDev commented Jan 5, 2020

Hi, I'm trying to solve this first issue.
I achieved to write a travis.yml that run a build for "each" supported os/arch
However, there is few failures for now with

  • Android
  • Windows
  • Docker-client
    (See below for specific errors)

I didn't try yet to publish any of the docker image to a docker registry
But I was wondering whether to add it as a make target or doing it in a script. Travis at first sight don't seems to allow to specialized script per job.

You can checkout the .travis.yml here

And build results etc.. on travis

Failure for Windows build

syso -o cmd/anonvpn/out.syso failed to open config file: open syso.json: no such file or directory Makefile:86: recipe for target 'syso' failed

Failure for android build

GOOS=android gomobile build -target=android -tags=" netgo cli android" -o cmd/anonvpn/anonvpn.apk ./cmd/anonvpn/ gomobile: cannot set -o when building non-main package Makefile:70: recipe for target 'android' failed make: *** [android] Error 1

Failure for docker client

Step 15/16 : COPY cvpnserver.ini /opt/go/src/github.com/RTradeLtd/libanonvpn/etc/anonvpn/anonvpn-client.ini COPY failed: stat /var/lib/docker/tmp/docker-builder522714275/cvpnserver.ini: no such file or directory Makefile:313: recipe for target 'docker-client' failed make: *** [docker-client] Error 1

EDIT : Format

@eyedeekay
Copy link
Collaborator

eyedeekay commented Jan 5, 2020

Some of this is because I excluded most of the platform-specific packaging from this release as much of it is obsolete and is going to be removed. The parts that are causing your error need to be re-added.

To fix the windows error, you need to include a syso.json file for the syso program to use, I can add it or if you want to it looks like:

{
  "manifest": {
    "name": "anonvpn.exe",
    "path": "anonvpn.exe.manifest"
  }
}

The other file needed to fix the Windows error is the Windows application manifest, which is an XML file that looks like this:


<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<assemblyIdentity
    version="0.0.32.01"
    name="anonvpn.exe"
    type="win32"
/>
<description>VPN</description>
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
    <security>
        <requestedPrivileges>
            <requestedExecutionLevel level="highestAvailable" uiAccess="false"/>
        </requestedPrivileges>
    </security>
</trustInfo>
</assembly>

It needs to have these so it can request permission to create the VPN TAP devices on Windows.

Android build is a little more mysterious, I can't seem to reproduce it on my work laptop, but my guess is that we need to run gomobile init inside the travis build when we do Android. I would prefer that you not add it to the make android target.

docker-client is obsolete, just get rid of it and I'll remove the target and the dockerfile and update the instructions ASAP.

@eyedeekay
Copy link
Collaborator

@NokiDev
Copy link
Contributor

NokiDev commented Jan 7, 2020

Hi @eyedeekay
Following your post and commit (Thanks for that) I reforked and made several changes.
Everything compiles now for windows linux and OSX.
Android builds keep failing for the same reasons I pointed out in my first post.

I don't have a lot of time actually to debug it correctly but my understanding is that there wasn't any android sdk installed in the previous pipelines.

Following travis documentation I added language: android config but building for android require using trusty distro for which apt packages seems unavailable.
And Ubuntu's trusty package explorer seems to be shutdown so I allowed android jobs to fail to get a build success status.

I repost links here :

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants