github ci: Add Github Actions CI

Add Github Actions and delete defunct Travis CI.
This commit is contained in:
Jakob Unterwurzacher 2021-07-29 12:12:49 +02:00
parent db81614cd6
commit 6f0ed4b8c4
4 changed files with 56 additions and 44 deletions

33
.github/workflows/ci.yml vendored Normal file
View File

@ -0,0 +1,33 @@
name: CI
on:
push:
pull_request:
schedule:
- cron: '0 12 * * *' # Every day noon UTC
jobs:
build:
runs-on: ubuntu-latest
steps:
# Looks like Github Actions leaks fds to child processes
# https://github.com/actions/runner/issues/1188
- run: ls -l /proc/self/fd
- uses: actions/checkout@v2
with:
fetch-depth: 0 # Make "git describe" work
# CI platform specific setup steps happen here
- run: sudo apt-get install -qq fuse3 libssl-dev
# Build & upload static binary
- run: ./build-without-openssl.bash
- uses: actions/upload-artifact@v2
with:
name: gocryptfs static binary
path: gocryptfs
# Actual test steps are in the Makefile
- run: make ci

View File

@ -1,43 +0,0 @@
language: go
os: linux
# fuse on travis
sudo: required
dist: bionic # Ubuntu 18.04 "Bionic", https://docs.travis-ci.com/user/reference/bionic/
env:
- GO111MODULE=on
git:
depth: 300
# Build with the lastest relevant Go versions
# Relevance is determined from:
# * https://golang.org/dl/
# * https://packages.debian.org/search?keywords=golang&searchon=names&exact=1&suite=all&section=all
# * https://packages.ubuntu.com/search?keywords=golang&searchon=names&exact=1&suite=all&section=all
go:
- 1.11.x # Debian 10 "Buster"
- 1.12.x # Ubuntu 19.10
- 1.13.x # Debian 11 "Bullseye"
- stable
before_install:
- sudo apt-get install -qq fuse
- sudo modprobe fuse
- sudo chmod 666 /dev/fuse
- sudo chown root:$USER /etc/fuse.conf
script:
- openssl version
- df -Th / /tmp
- env GO111MODULE=on go build
- ./build-without-openssl.bash
- ./build.bash
- ./gocryptfs -speed
- ./test.bash
- make root_test
- ./crossbuild.bash
- echo "rebuild with locked dependencies"
- go mod vendor
- ./build.bash -mod=vendor

View File

@ -23,3 +23,25 @@ install:
install -Dm644 -t "$(DESTDIR)/usr/share/man/man1/" Documentation/gocryptfs.1
install -Dm644 -t "$(DESTDIR)/usr/share/man/man1/" Documentation/gocryptfs-xray.1
install -Dm644 -t "$(DESTDIR)/usr/share/licenses/gocryptfs" LICENSE
.phony: ci
ci:
uname -a ; go version ; openssl version
df -Th / /tmp /var/tmp
./build-without-openssl.bash
./build.bash
./test.bash
make root_test
./crossbuild.bash
echo "Rebuild with locked dependencies"
# Download dependencies to "vendor" directory
go mod vendor
# Delete global cache
go clean -modcache
# GOPROXY=off makes sure we fail instead of making network requests
# (we should not need any!)
GOPROXY=off ./build.bash -mod=vendor
# Delete "vendor" dir
git clean -dxff

View File

@ -1,5 +1,5 @@
[![gocryptfs](Documentation/gocryptfs-logo.png)](https://nuetzlich.net/gocryptfs/)
[![Build Status](https://travis-ci.org/rfjakob/gocryptfs.svg?branch=master)](https://travis-ci.org/rfjakob/gocryptfs)
[![CI](https://github.com/rfjakob/gocryptfs/actions/workflows/ci.yml/badge.svg)](https://github.com/rfjakob/gocryptfs/actions/workflows/ci.yml)
[![MIT License](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)
[![Go Report Card](https://goreportcard.com/badge/github.com/rfjakob/gocryptfs)](https://goreportcard.com/report/github.com/rfjakob/gocryptfs)
[![Latest release](https://img.shields.io/github/release/rfjakob/gocryptfs.svg)](https://github.com/rfjakob/gocryptfs/releases)