Skip to content

Commit 9a3b2b8

Browse files
krobeluskoutcher
authored andcommitted
Switch from Travis CI to GitHub Actions
Closes #1061
1 parent 2b3c6be commit 9a3b2b8

File tree

5 files changed

+74
-43
lines changed

5 files changed

+74
-43
lines changed

.github/workflows/linux.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Linux
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
ci:
7+
runs-on: ubuntu-20.04
8+
9+
strategy:
10+
matrix:
11+
compiler: [clang, gcc]
12+
tig_build: [autoconf, "config.make"]
13+
include:
14+
- name: Address Sanitizer
15+
compiler: clang
16+
tig_build: "address-sanitizer"
17+
18+
- name: Valgrind
19+
compiler: gcc
20+
tig_build: valgrind
21+
22+
steps:
23+
- uses: actions/checkout@v2
24+
- name: Test Tig
25+
shell: 'script -q -e -c "sh {0}"' # Workaround to get a TTY, see https://github.com/gfx/example-github-actions-with-tty
26+
run: |
27+
set -ex
28+
export LANG=en_US.utf8
29+
sudo apt update
30+
sudo DEBIAN_FRONTEND=noninteractive apt -yq install --no-install-recommends \
31+
asciidoc valgrind xmlto
32+
CC=${{ matrix.compiler }} TIG_BUILD=${{ matrix.tig_build }} tools/travis.sh

.github/workflows/macos.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: macOS
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
7+
jobs:
8+
install:
9+
runs-on: macos-latest
10+
11+
strategy:
12+
matrix:
13+
compiler: [clang, gcc]
14+
15+
steps:
16+
- name: Patch
17+
run: |
18+
cd "$(brew --repo homebrew/core)" && patch -p1 <<\EOF
19+
diff --git a/Formula/tig.rb b/Formula/tig.rb
20+
index 2e8c125660..f76d6bca1c 100644
21+
--- a/Formula/tig.rb
22+
+++ b/Formula/tig.rb
23+
@@ -26,9 +26,11 @@ class Tig < Formula
24+
depends_on "readline"
25+
26+
def install
27+
+ ENV.deparallelize
28+
system "./autogen.sh" if build.head?
29+
system "./configure", "--prefix=#{prefix}", "--sysconfdir=#{etc}"
30+
system "make"
31+
+ system "make", "test"
32+
# Ensure the configured `sysconfdir` is used during runtime by
33+
# installing in a separate step.
34+
system "make", "install", "sysconfdir=#{pkgshare}/examples"
35+
EOF
36+
- name: Install latest Tig
37+
shell: 'script -q typescript sh {0}' # Workaround to get a TTY, see https://github.com/gfx/example-github-actions-with-tty
38+
run: HOMEBREW_CC=${{ matrix.compiler }} HOMEBREW_NO_AUTO_UPDATE=1 brew install --HEAD tig

.travis.yml

Lines changed: 0 additions & 40 deletions
This file was deleted.

README.adoc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@ Tig: text-mode interface for Git
22
================================
33
:docext: adoc
44

5-
image:https://secure.travis-ci.org/jonas/tig.svg?branch=master[Travis Build,link=https://travis-ci.org/jonas/tig]
5+
image:https://github.com/jonas/tig/workflows/Linux/badge.svg[Linux CI,link=https://github.com/jonas/tig/actions?query=workflow%3A.github%2Fworkflows%2Flinux.yml]
6+
image:https://github.com/jonas/tig/workflows/macOS/badge.svg[macOS CI,link=https://github.com/jonas/tig/actions?query=workflow%3A.github%2Fworkflows%2Fmacos.yml]
67
image:https://ci.appveyor.com/api/projects/status/jxt1uf52o7r0a8r7/branch/master?svg=true[AppVeyor Build,link=https://ci.appveyor.com/project/fonseca/tig]
78
image:https://badges.gitter.im/Join%20Chat.svg[Join Chat,link="https://gitter.im/jonas/tig?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge"]
89

test/tools/libtest.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -812,7 +812,7 @@ run_test_cases()
812812
tigrc "$(cat < "$name-tigrc")"
813813
fi
814814
if [ -e "$name-before" ]; then
815-
test_exec_work_dir "$SHELL" "$HOME/$name-before"
815+
test_exec_work_dir "${SHELL:-/bin/sh}" "$HOME/$name-before"
816816
fi
817817
(
818818
if [ -e "$name-cwd" ]; then
@@ -828,7 +828,7 @@ run_test_cases()
828828
test_tig $(if [ -e "$name-args" ]; then cat < "$name-args"; fi)
829829
)
830830
if [ -e "$name-after" ]; then
831-
test_exec_work_dir "$SHELL" "$HOME/$name-after"
831+
test_exec_work_dir "${SHELL:-/bin/sh}" "$HOME/$name-after"
832832
fi
833833

834834
assert_equals "$name.screen" < "$name.expected"

0 commit comments

Comments
 (0)