aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakob Unterwurzacher2021-07-29 12:12:49 +0200
committerJakob Unterwurzacher2021-07-29 12:36:05 +0200
commit6f0ed4b8c400cd53ccb42eb83c52ead483646b78 (patch)
tree7e2e90890b15f09ce675b64bbff6801cdcc629fc
parentdb81614cd660372c836e8c5b1cf975d0df5dbbd0 (diff)
github ci: Add Github Actions CI
Add Github Actions and delete defunct Travis CI.
-rw-r--r--.github/workflows/ci.yml33
-rw-r--r--.travis.yml43
-rw-r--r--Makefile22
-rw-r--r--README.md2
4 files changed, 56 insertions, 44 deletions
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
new file mode 100644
index 0000000..c1b509d
--- /dev/null
+++ b/.github/workflows/ci.yml
@@ -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
diff --git a/.travis.yml b/.travis.yml
deleted file mode 100644
index 9cfc238..0000000
--- a/.travis.yml
+++ /dev/null
@@ -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
diff --git a/Makefile b/Makefile
index bdc05cf..8720678 100644
--- a/Makefile
+++ b/Makefile
@@ -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
diff --git a/README.md b/README.md
index 503c037..7f72973 100644
--- a/README.md
+++ b/README.md
@@ -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)