Skip to content

Commit 3de6a0a

Browse files
authored
Merge pull request #814 from libgit2/actions
Move the bulk of CI to Actions
2 parents fbf2b4b + 74e1569 commit 3de6a0a

File tree

3 files changed

+55
-5
lines changed

3 files changed

+55
-5
lines changed

.github/workflows/ci.yml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: Rugged CI
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches:
7+
- master
8+
- maint/*
9+
10+
jobs:
11+
build:
12+
strategy:
13+
fail-fast: false
14+
matrix:
15+
ruby: [ '2.3.7', '2.4.6', '2.5.5', '2.6.2' ]
16+
os: [ ubuntu-18.04, macOS-10.14 ]
17+
18+
runs-on: ${{ matrix.os }}
19+
20+
name: Ruby ${{ matrix.ruby }} on ${{ matrix.os }}
21+
steps:
22+
- uses: actions/checkout@master
23+
- name: update submodule
24+
run: git submodule update --init
25+
- name: Install Linux packages
26+
if: runner.os == 'Linux'
27+
run: |
28+
sudo apt update
29+
sudo apt install -y cmake libssh2-1-dev openssh-client openssh-server
30+
- name: Install macOS packages
31+
if: runner.os == 'macOS'
32+
run: ./vendor/libgit2/azure-pipelines/setup-osx.sh
33+
- name: Set up Ruby on Linux
34+
if: runner.os == 'Linux'
35+
uses: actions/setup-ruby@v1
36+
with:
37+
version: ${{ matrix.ruby }}
38+
- name: Set up Ruby on macOS
39+
if: runner.os == 'macOS'
40+
run: |
41+
brew install rbenv
42+
rbenv install ${{ matrix.ruby }}
43+
rbenv local ${{ matrix.ruby }}
44+
- name: run build
45+
run: |
46+
if [ -x rbenv ]; then eval "$(rbenv init -)"; fi
47+
ruby --version
48+
gem install bundler
49+
bundle install --path vendor
50+
./script/travisbuild

.travis.yml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,7 @@ os:
66
- osx
77

88
rvm:
9-
- 2.3.3
10-
- 2.4.0
11-
- 2.5.0
12-
- 2.6
139
- ruby-head
14-
- rbx-2
1510

1611
addons:
1712
apt:

script/travisbuild

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,15 @@
11
#!/bin/sh
22

3+
set -ex
4+
35
# Create a test repo which we can use for the online tests
46
mkdir $HOME/_temp
57
git init --bare $HOME/_temp/test.git
68
git daemon --listen=localhost --export-all --enable=receive-pack --base-path=$HOME/_temp $HOME/_temp 2>/dev/null &
79

10+
# On Actions we start with 777 which means sshd won't let us in
11+
chmod 750 $HOME
12+
813
ssh-keygen -t rsa -f ~/.ssh/rugged_test_rsa -N "" -q
914
cat ~/.ssh/rugged_test_rsa.pub >>~/.ssh/authorized_keys
1015
ssh-keyscan -t rsa localhost >>~/.ssh/known_hosts

0 commit comments

Comments
 (0)