Newer
Older
wg-portal / .travis.yml
@Christoph Haas Christoph Haas on 25 Feb 2021 1 KB WIP: dont use gox
language: go
dist: bionic
sudo: required
go:
  - 1.16.x # Latest go version
env:
  - GO111MODULE=on
addons:
  apt:
    packages:
      - gcc-multilib

before_install:
  - # skip

install:
  - # skip

script:
  - go get -t -v ./...
  - diff -u <(echo -n) <(gofmt -d .)
  - go vet $(go list ./... | grep -v /vendor/)
  - sudo -E apt-get -yq --no-install-suggests --no-install-recommends --force-yes install gcc-arm-linux-gnueabi libc6-dev-armel-cross gcc-arm-linux-gnueabihf libc6-dev-armhf-cross gcc-aarch64-linux-gnu libc6-dev-arm64-cross
  - make build
  - make build-cross-plat

deploy:
  provider: releases
  skip_cleanup: true # Important, otherwise the build output would be purged.
  api_key:
    # *encrypted* GitHub key, as the output of the Travis CI CLI tool
    secure: TODO...
  file:
    - dist/wg-portal_linux_amd64
    - dist/wg-portal_linux_arm64
    - dist/wg-portal_linux_arm
    - dist/wg-portal.env
    - dist/wg-portal.service
  on:
    repo: h44z/wg-portal
    tags: true # The deployment happens only if the commit has a tag.